Allow user to set node selector for system managed components, manager, UI, driver deployer
This feature allow user to deploy Longhorn only on a specific set of nodes Longhorn #2199 Signed-off-by: Phan Le <phan.le@rancher.com>
This commit is contained in:
parent
5918e89fcd
commit
47a34c4b36
@ -304,26 +304,6 @@ The available modes are:
|
||||
type: int
|
||||
min: 0
|
||||
default: 300
|
||||
- variable: defaultSettings.taintToleration
|
||||
label: Kubernetes Taint Toleration
|
||||
description: "To dedicate nodes to store Longhorn replicas and reject other general workloads, set tolerations for Longhorn and add taints for the storage nodes.
|
||||
All Longhorn volumes should be detached before modifying toleration settings.
|
||||
We recommend setting tolerations during Longhorn deployment because the Longhorn system cannot be operated during the update.
|
||||
Multiple tolerations can be set here, and these tolerations are separated by semicolon. For example:
|
||||
* `key1=value1:NoSchedule; key2:NoExecute`
|
||||
* `:` this toleration tolerates everything because an empty key with operator `Exists` matches all keys, values and effects
|
||||
* `key1=value1:` this toleration has empty effect. It matches all effects with key `key1`
|
||||
Because `kubernetes.io` is used as the key of all Kubernetes default tolerations, it should not be used in the toleration settings.
|
||||
WARNING: DO NOT CHANGE THIS SETTING WITH ATTACHED VOLUMES!"
|
||||
group: "Longhorn Default Settings"
|
||||
type: string
|
||||
default: ""
|
||||
- variable: defaultSettings.priorityClass
|
||||
label: Priority Class
|
||||
description: "The name of the Priority Class to set on the Longhorn workloads. This can help prevent Longhorn workloads from being evicted under Node Pressure. WARNING: DO NOT CHANGE THIS SETTING WITH ATTACHED VOLUMES."
|
||||
group: "Longhorn Default Settings"
|
||||
type: string
|
||||
default: ""
|
||||
- variable: defaultSettings.autoSalvage
|
||||
label: Automatic salvage
|
||||
description: "If enabled, volumes will be automatically salvaged when all the replicas become faulty e.g. due to network disconnection. Longhorn will try to figure out which replica(s) are usable, then use them for the volume. By default true."
|
||||
|
@ -96,6 +96,10 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornManager.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.longhornManager.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: "100%"
|
||||
|
@ -21,6 +21,7 @@ data:
|
||||
default-longhorn-static-storage-class: {{ .Values.defaultSettings.defaultLonghornStaticStorageClass }}
|
||||
backupstore-poll-interval: {{ .Values.defaultSettings.backupstorePollInterval }}
|
||||
taint-toleration: {{ .Values.defaultSettings.taintToleration }}
|
||||
system-managed-components-node-selector: {{ .Values.defaultSettings.systemManagedComponentsNodeSelector }}
|
||||
priority-class: {{ .Values.defaultSettings.priorityClass }}
|
||||
auto-salvage: {{ .Values.defaultSettings.autoSalvage }}
|
||||
auto-delete-pod-when-volume-detached-unexpectedly: {{ .Values.defaultSettings.autoDeletePodWhenVolumeDetachedUnexpectedly }}
|
||||
|
@ -94,6 +94,10 @@ spec:
|
||||
{{- if .Values.longhornDriver.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.longhornDriver.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornDriver.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.longhornDriver.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
securityContext:
|
||||
|
@ -38,6 +38,10 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornUI.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.longhornManager.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
|
@ -42,3 +42,7 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornManager.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.longhornManager.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
|
@ -43,3 +43,7 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornManager.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.longhornManager.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
|
@ -82,6 +82,7 @@ defaultSettings:
|
||||
defaultLonghornStaticStorageClass: ~
|
||||
backupstorePollInterval: ~
|
||||
taintToleration: ~
|
||||
systemManagedComponentsNodeSelector: ~
|
||||
priorityClass: ~
|
||||
autoSalvage: ~
|
||||
autoDeletePodWhenVolumeDetachedUnexpectedly: ~
|
||||
@ -116,26 +117,41 @@ longhornManager:
|
||||
# operator: "Equal"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule"
|
||||
nodeSelector: {}
|
||||
## If you want to set node selector for Longhorn Manager DaemonSet, delete the `{}` in the line above
|
||||
## and uncomment this example block
|
||||
# label-key1: "label-value1"
|
||||
# label-key2: "label-value2"
|
||||
|
||||
longhornDriver:
|
||||
priorityClass: ~
|
||||
tolerations: []
|
||||
## If you want to set tolerations for Longhorn Manager DaemonSet, delete the `[]` in the line above
|
||||
## If you want to set tolerations for Longhorn Driver Deployer Deployment, delete the `[]` in the line above
|
||||
## and uncomment this example block
|
||||
# - key: "key"
|
||||
# operator: "Equal"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule"
|
||||
nodeSelector: {}
|
||||
## If you want to set node selector for Longhorn Driver Deployer Deployment, delete the `{}` in the line above
|
||||
## and uncomment this example block
|
||||
# label-key1: "label-value1"
|
||||
# label-key2: "label-value2"
|
||||
|
||||
longhornUI:
|
||||
priorityClass: ~
|
||||
tolerations: []
|
||||
## If you want to set tolerations for Longhorn Manager DaemonSet, delete the `[]` in the line above
|
||||
## If you want to set tolerations for Longhorn UI Deployment, delete the `[]` in the line above
|
||||
## and uncomment this example block
|
||||
# - key: "key"
|
||||
# operator: "Equal"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule"
|
||||
nodeSelector: {}
|
||||
## If you want to set node selector for Longhorn UI Deployment, delete the `{}` in the line above
|
||||
## and uncomment this example block
|
||||
# label-key1: "label-value1"
|
||||
# label-key2: "label-value2"
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
|
Loading…
Reference in New Issue
Block a user