Merge pull request #823 from andyzhangx/runOnControlPlane-snapshot
feat: support runOnControlPlane on csi-snapshot-controller
This commit is contained in:
commit
6b69b9b282
Binary file not shown.
@ -46,6 +46,27 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
kubernetes.io/os: linux
|
||||||
|
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
|
||||||
|
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
|
||||||
|
{{- with .Values.controller.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
{{- if .Values.controller.runOnControlPlane}}
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: Exists
|
||||||
|
{{- end}}
|
||||||
|
{{- if .Values.controller.runOnMaster}}
|
||||||
|
- key: node-role.kubernetes.io/master
|
||||||
|
operator: Exists
|
||||||
|
{{- end}}
|
||||||
|
{{- end }}
|
||||||
priorityClassName: {{ .Values.externalSnapshotter.priorityClassName }}
|
priorityClassName: {{ .Values.externalSnapshotter.priorityClassName }}
|
||||||
securityContext:
|
securityContext:
|
||||||
seccompProfile:
|
seccompProfile:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user