File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,26 @@ spec:
2424{{ toYaml .Values.podAnnotations | indent 8 }}
2525{{- end }}
2626 spec :
27+ # runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
2728 {{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
2829 {{- with .Values.controller.affinity }}
2930 affinity :
3031 {{ toYaml . | indent 8 }}
3132 {{- end }}
32- {{- else if .Values.controller.runOnControlPlane}}
33+ {{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster }}
3334 affinity :
3435 nodeAffinity :
3536 requiredDuringSchedulingIgnoredDuringExecution :
3637 nodeSelectorTerms :
3738 - matchExpressions :
39+ {{- if .Values.controller.runOnControlPlane}}
3840 - key : node-role.kubernetes.io/control-plane
3941 operator : Exists
42+ {{- end}}
43+ {{- if .Values.controller.runOnMaster}}
44+ - key : node-role.kubernetes.io/master
45+ operator : Exists
46+ {{- end}}
4047 {{- end }}
4148 hostNetwork : true
4249 dnsPolicy : {{ .Values.controller.dnsPolicy }}
Original file line number Diff line number Diff line change @@ -24,19 +24,26 @@ spec:
2424{{ toYaml .Values.podAnnotations | indent 8 }}
2525{{- end }}
2626 spec :
27+ # runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
2728 {{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
2829 {{- with .Values.controller.affinity }}
2930 affinity :
3031 {{ toYaml . | indent 8 }}
3132 {{- end }}
32- {{- else if .Values.controller.runOnControlPlane}}
33+ {{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster }}
3334 affinity :
3435 nodeAffinity :
3536 requiredDuringSchedulingIgnoredDuringExecution :
3637 nodeSelectorTerms :
3738 - matchExpressions :
39+ {{- if .Values.controller.runOnControlPlane}}
3840 - key : node-role.kubernetes.io/control-plane
3941 operator : Exists
42+ {{- end}}
43+ {{- if .Values.controller.runOnMaster}}
44+ - key : node-role.kubernetes.io/master
45+ operator : Exists
46+ {{- end}}
4047 {{- end }}
4148 hostNetwork : true
4249 dnsPolicy : {{ .Values.controller.dnsPolicy }}
You can’t perform that action at this time.
0 commit comments