File tree 4 files changed +16
-2
lines changed
4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,26 @@ spec:
24
24
{{ toYaml .Values.podAnnotations | indent 8 }}
25
25
{{- end }}
26
26
spec :
27
+ # runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
27
28
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
28
29
{{- with .Values.controller.affinity }}
29
30
affinity :
30
31
{{ toYaml . | indent 8 }}
31
32
{{- end }}
32
- {{- else if .Values.controller.runOnControlPlane}}
33
+ {{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster }}
33
34
affinity :
34
35
nodeAffinity :
35
36
requiredDuringSchedulingIgnoredDuringExecution :
36
37
nodeSelectorTerms :
37
38
- matchExpressions :
39
+ {{- if .Values.controller.runOnControlPlane}}
38
40
- key : node-role.kubernetes.io/control-plane
39
41
operator : Exists
42
+ {{- end}}
43
+ {{- if .Values.controller.runOnMaster}}
44
+ - key : node-role.kubernetes.io/master
45
+ operator : Exists
46
+ {{- end}}
40
47
{{- end }}
41
48
hostNetwork : true
42
49
dnsPolicy : {{ .Values.controller.dnsPolicy }}
Original file line number Diff line number Diff line change @@ -24,19 +24,26 @@ spec:
24
24
{{ toYaml .Values.podAnnotations | indent 8 }}
25
25
{{- end }}
26
26
spec :
27
+ # runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
27
28
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
28
29
{{- with .Values.controller.affinity }}
29
30
affinity :
30
31
{{ toYaml . | indent 8 }}
31
32
{{- end }}
32
- {{- else if .Values.controller.runOnControlPlane}}
33
+ {{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster }}
33
34
affinity :
34
35
nodeAffinity :
35
36
requiredDuringSchedulingIgnoredDuringExecution :
36
37
nodeSelectorTerms :
37
38
- matchExpressions :
39
+ {{- if .Values.controller.runOnControlPlane}}
38
40
- key : node-role.kubernetes.io/control-plane
39
41
operator : Exists
42
+ {{- end}}
43
+ {{- if .Values.controller.runOnMaster}}
44
+ - key : node-role.kubernetes.io/master
45
+ operator : Exists
46
+ {{- end}}
40
47
{{- end }}
41
48
hostNetwork : true
42
49
dnsPolicy : {{ .Values.controller.dnsPolicy }}
You can’t perform that action at this time.
0 commit comments