Allow user to specify priority class and tolerations for Longhorn UI, Driver, Manager

Now that we only watch/update managed components, we should allow
user to specify Helm values for user deployed components (manager,
driver, UI).

Longhorn #2120

Signed-off-by: Phan Le <phan.le@rancher.com>
This commit is contained in:
Phan Le 2021-03-15 12:12:28 -07:00 committed by David Ko
parent b4af43d454
commit 50f2783ab0
6 changed files with 65 additions and 0 deletions

View File

@ -86,7 +86,14 @@ spec:
imagePullSecrets:
- name: {{ .Values.privateRegistry.registrySecret }}
{{- end }}
{{- if .Values.longhornManager.priorityClass }}
priorityClassName: {{ .Values.longhornManager.priorityClass | quote}}
{{- end }}
serviceAccountName: longhorn-service-account
{{- if .Values.longhornManager.tolerations }}
tolerations:
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
{{- end }}
updateStrategy:
rollingUpdate:
maxUnavailable: "100%"

View File

@ -87,6 +87,13 @@ spec:
{{- if .Values.privateRegistry.registrySecret }}
imagePullSecrets:
- name: {{ .Values.privateRegistry.registrySecret }}
{{- end }}
{{- if .Values.longhornDriver.priorityClass }}
priorityClassName: {{ .Values.longhornDriver.priorityClass | quote}}
{{- end }}
{{- if .Values.longhornDriver.tolerations }}
tolerations:
{{ toYaml .Values.longhornDriver.tolerations | indent 6 }}
{{- end }}
serviceAccountName: longhorn-service-account
securityContext:

View File

@ -31,6 +31,13 @@ spec:
imagePullSecrets:
- name: {{ .Values.privateRegistry.registrySecret }}
{{- end }}
{{- if .Values.longhornUI.priorityClass }}
priorityClassName: {{ .Values.longhornUI.priorityClass | quote}}
{{- end }}
{{- if .Values.longhornUI.tolerations }}
tolerations:
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
{{- end }}
---
kind: Service
apiVersion: v1

View File

@ -34,4 +34,11 @@ spec:
imagePullSecrets:
- name: {{ .Values.privateRegistry.registrySecret }}
{{- end }}
{{- if .Values.longhornManager.priorityClass }}
priorityClassName: {{ .Values.longhornManager.priorityClass | quote}}
{{- end }}
serviceAccountName: longhorn-service-account
{{- if .Values.longhornManager.tolerations }}
tolerations:
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
{{- end }}

View File

@ -35,4 +35,11 @@ spec:
imagePullSecrets:
- name: {{ .Values.privateRegistry.registrySecret }}
{{- end }}
{{- if .Values.longhornManager.priorityClass }}
priorityClassName: {{ .Values.longhornManager.priorityClass | quote}}
{{- end }}
serviceAccountName: longhorn-service-account
{{- if .Values.longhornManager.tolerations }}
tolerations:
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
{{- end }}

View File

@ -104,6 +104,36 @@ privateRegistry:
registryPasswd: ~
registrySecret: ~
longhornManager:
priorityClass: ~
tolerations: []
## If you want to set tolerations for Longhorn Manager DaemonSet, delete the `[]` in the line above
## and uncomment this example block
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"
longhornDriver:
priorityClass: ~
tolerations: []
## If you want to set tolerations for Longhorn Manager DaemonSet, delete the `[]` in the line above
## and uncomment this example block
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"
longhornUI:
priorityClass: ~
tolerations: []
## If you want to set tolerations for Longhorn Manager DaemonSet, delete the `[]` in the line above
## and uncomment this example block
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little