File tree Expand file tree Collapse file tree 8 files changed +162
-7
lines changed Expand file tree Collapse file tree 8 files changed +162
-7
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,38 @@ spec:
43
43
{{- with .Values.konnectivityAgent.tolerations }}
44
44
{{- toYaml . | nindent 6 }}
45
45
{{- end }}
46
+ {{- if or .Values.konnectivityServer.affinity .Values.konnectivityServer.podAntiAffinity }}
47
+ affinity :
48
+ {{- with .Values.konnectivityServer.affinity }}
49
+ {{- toYaml . | nindent 8 }}
50
+ {{- end }}
51
+ {{- if eq .Values.konnectivityServer.podAntiAffinity "hard" }}
52
+ podAntiAffinity :
53
+ requiredDuringSchedulingIgnoredDuringExecution :
54
+ - topologyKey : " {{ .Values.konnectivityServer.podAntiAffinityTopologyKey }}"
55
+ labelSelector :
56
+ matchLabels :
57
+ app : {{ $fullName }}-konnectivity-server
58
+ {{- else if eq .Values.konnectivityServer.podAntiAffinity "soft" }}
59
+ podAntiAffinity :
60
+ preferredDuringSchedulingIgnoredDuringExecution :
61
+ - weight : 1
62
+ podAffinityTerm :
63
+ topologyKey : " {{ .Values.konnectivityServer.podAntiAffinityTopologyKey }}"
64
+ labelSelector :
65
+ matchLabels :
66
+ app : {{ $fullName }}-konnectivity-server
67
+ {{- end }}
68
+ {{- end }}
69
+ {{- with .Values.konnectivityServer.image.pullSecrets }}
70
+ imagePullSecrets :
71
+ {{- toYaml . | nindent 10 }}
72
+ {{- end }}
46
73
containers :
47
74
- name : konnectivity-agent
48
75
{{- with .Values.konnectivityAgent.image }}
49
76
image : " {{ .repository }}{{ if .digest }}@{{ .digest }}{{ else }}:{{ .tag }}{{ end }}"
77
+ imagePullPolicy : {{ .pullPolicy }}
50
78
{{- end }}
51
79
command :
52
80
- /proxy-agent
Original file line number Diff line number Diff line change 39
39
tolerations :
40
40
{{- toYaml . | nindent 6 }}
41
41
{{- end }}
42
- {{- with .Values.admin.affinity }}
42
+ {{- if or .Values.admin.affinity .Values.admin.podAntiAffinity }}
43
43
affinity :
44
+ {{- with .Values.admin.affinity }}
44
45
{{- toYaml . | nindent 8 }}
46
+ {{- end }}
47
+ {{- if eq .Values.admin.podAntiAffinity "hard" }}
48
+ podAntiAffinity :
49
+ requiredDuringSchedulingIgnoredDuringExecution :
50
+ - topologyKey : " {{ .Values.admin.podAntiAffinityTopologyKey }}"
51
+ labelSelector :
52
+ matchLabels :
53
+ app : {{ $fullName }}-admin
54
+ {{- else if eq .Values.admin.podAntiAffinity "soft" }}
55
+ podAntiAffinity :
56
+ preferredDuringSchedulingIgnoredDuringExecution :
57
+ - weight : 1
58
+ podAffinityTerm :
59
+ topologyKey : " {{ .Values.admin.podAntiAffinityTopologyKey }}"
60
+ labelSelector :
61
+ matchLabels :
62
+ app : {{ $fullName }}-admin
63
+ {{- end }}
45
64
{{- end }}
46
65
{{- with .Values.admin.image.pullSecrets }}
47
66
imagePullSecrets :
Original file line number Diff line number Diff line change 41
41
tolerations :
42
42
{{- toYaml . | nindent 6 }}
43
43
{{- end }}
44
- {{- with .Values.apiServer.affinity }}
44
+ {{- if or .Values.apiServer.affinity .Values.apiServer.podAntiAffinity }}
45
45
affinity :
46
+ {{- with .Values.apiServer.affinity }}
46
47
{{- toYaml . | nindent 8 }}
48
+ {{- end }}
49
+ {{- if eq .Values.apiServer.podAntiAffinity "hard" }}
50
+ podAntiAffinity :
51
+ requiredDuringSchedulingIgnoredDuringExecution :
52
+ - topologyKey : " {{ .Values.apiServer.podAntiAffinityTopologyKey }}"
53
+ labelSelector :
54
+ matchLabels :
55
+ app : {{ $fullName }}-apiserver
56
+ {{- else if eq .Values.apiServer.podAntiAffinity "soft" }}
57
+ podAntiAffinity :
58
+ preferredDuringSchedulingIgnoredDuringExecution :
59
+ - weight : 1
60
+ podAffinityTerm :
61
+ topologyKey : " {{ .Values.apiServer.podAntiAffinityTopologyKey }}"
62
+ labelSelector :
63
+ matchLabels :
64
+ app : {{ $fullName }}-apiserver
65
+ {{- end }}
47
66
{{- end }}
48
67
{{- with .Values.apiServer.image.pullSecrets }}
49
68
imagePullSecrets :
Original file line number Diff line number Diff line change 39
39
tolerations :
40
40
{{- toYaml . | nindent 6 }}
41
41
{{- end }}
42
- {{- with .Values.controllerManager.affinity }}
42
+ {{- if or .Values.controllerManager.affinity .Values.controllerManager.podAntiAffinity }}
43
43
affinity :
44
+ {{- with .Values.controllerManager.affinity }}
44
45
{{- toYaml . | nindent 8 }}
46
+ {{- end }}
47
+ {{- if eq .Values.controllerManager.podAntiAffinity "hard" }}
48
+ podAntiAffinity :
49
+ requiredDuringSchedulingIgnoredDuringExecution :
50
+ - topologyKey : " {{ .Values.controllerManager.podAntiAffinityTopologyKey }}"
51
+ labelSelector :
52
+ matchLabels :
53
+ app : {{ $fullName }}-controller-manager
54
+ {{- else if eq .Values.controllerManager.podAntiAffinity "soft" }}
55
+ podAntiAffinity :
56
+ preferredDuringSchedulingIgnoredDuringExecution :
57
+ - weight : 1
58
+ podAffinityTerm :
59
+ topologyKey : " {{ .Values.controllerManager.podAntiAffinityTopologyKey }}"
60
+ labelSelector :
61
+ matchLabels :
62
+ app : {{ $fullName }}-controller-manager
63
+ {{- end }}
45
64
{{- end }}
46
65
{{- with .Values.controllerManager.image.pullSecrets }}
47
66
imagePullSecrets :
Original file line number Diff line number Diff line change @@ -42,11 +42,29 @@ spec:
42
42
tolerations :
43
43
{{- toYaml . | nindent 6 }}
44
44
{{- end }}
45
- {{- with .Values.etcd.affinity }}
45
+ {{- if or .Values.etcd.affinity .Values.etcd.podAntiAffinity }}
46
46
affinity :
47
+ {{- with .Values.etcd.affinity }}
47
48
{{- toYaml . | nindent 8 }}
49
+ {{- end }}
50
+ {{- if eq .Values.etcd.podAntiAffinity "hard" }}
51
+ podAntiAffinity :
52
+ requiredDuringSchedulingIgnoredDuringExecution :
53
+ - topologyKey : " {{ .Values.etcd.podAntiAffinityTopologyKey }}"
54
+ labelSelector :
55
+ matchLabels :
56
+ app : {{ $fullName }}-etcd
57
+ {{- else if eq .Values.etcd.podAntiAffinity "soft" }}
58
+ podAntiAffinity :
59
+ preferredDuringSchedulingIgnoredDuringExecution :
60
+ - weight : 1
61
+ podAffinityTerm :
62
+ topologyKey : " {{ .Values.etcd.podAntiAffinityTopologyKey }}"
63
+ labelSelector :
64
+ matchLabels :
65
+ app : {{ $fullName }}-etcd
66
+ {{- end }}
48
67
{{- end }}
49
-
50
68
{{- with .Values.etcd.image.pullSecrets }}
51
69
imagePullSecrets :
52
70
{{- toYaml . | nindent 10 }}
Original file line number Diff line number Diff line change 39
39
tolerations :
40
40
{{- toYaml . | nindent 6 }}
41
41
{{- end }}
42
- {{- with .Values.konnectivityServer.affinity }}
42
+ {{- if or .Values.konnectivityServer.affinity .Values.konnectivityServer.podAntiAffinity }}
43
43
affinity :
44
+ {{- with .Values.konnectivityServer.affinity }}
44
45
{{- toYaml . | nindent 8 }}
46
+ {{- end }}
47
+ {{- if eq .Values.konnectivityServer.podAntiAffinity "hard" }}
48
+ podAntiAffinity :
49
+ requiredDuringSchedulingIgnoredDuringExecution :
50
+ - topologyKey : " {{ .Values.konnectivityServer.podAntiAffinityTopologyKey }}"
51
+ labelSelector :
52
+ matchLabels :
53
+ app : {{ $fullName }}-konnectivity-server
54
+ {{- else if eq .Values.konnectivityServer.podAntiAffinity "soft" }}
55
+ podAntiAffinity :
56
+ preferredDuringSchedulingIgnoredDuringExecution :
57
+ - weight : 1
58
+ podAffinityTerm :
59
+ topologyKey : " {{ .Values.konnectivityServer.podAntiAffinityTopologyKey }}"
60
+ labelSelector :
61
+ matchLabels :
62
+ app : {{ $fullName }}-konnectivity-server
63
+ {{- end }}
45
64
{{- end }}
46
65
{{- with .Values.konnectivityServer.image.pullSecrets }}
47
66
imagePullSecrets :
Original file line number Diff line number Diff line change 39
39
tolerations :
40
40
{{- toYaml . | nindent 6 }}
41
41
{{- end }}
42
- {{- with .Values.scheduler.affinity }}
42
+ {{- if or .Values.scheduler.affinity .Values.scheduler.podAntiAffinity }}
43
43
affinity :
44
+ {{- with .Values.scheduler.affinity }}
44
45
{{- toYaml . | nindent 8 }}
46
+ {{- end }}
47
+ {{- if eq .Values.scheduler.podAntiAffinity "hard" }}
48
+ podAntiAffinity :
49
+ requiredDuringSchedulingIgnoredDuringExecution :
50
+ - topologyKey : " {{ .Values.scheduler.podAntiAffinityTopologyKey }}"
51
+ labelSelector :
52
+ matchLabels :
53
+ app : {{ $fullName }}-scheduler
54
+ {{- else if eq .Values.scheduler.podAntiAffinity "soft" }}
55
+ podAntiAffinity :
56
+ preferredDuringSchedulingIgnoredDuringExecution :
57
+ - weight : 1
58
+ podAffinityTerm :
59
+ topologyKey : " {{ .Values.scheduler.podAntiAffinityTopologyKey }}"
60
+ labelSelector :
61
+ matchLabels :
62
+ app : {{ $fullName }}-scheduler
63
+ {{- end }}
45
64
{{- end }}
46
65
{{- with .Values.scheduler.image.pullSecrets }}
47
66
imagePullSecrets :
Original file line number Diff line number Diff line change 39
39
podAnnotations : {}
40
40
nodeSelector : {}
41
41
tolerations : []
42
+ podAntiAffinity : soft
43
+ podAntiAffinityTopologyKey : kubernetes.io/hostname
42
44
affinity : {}
43
45
extraEnv : []
44
46
sidecars : []
@@ -89,6 +91,8 @@ apiServer:
89
91
podAnnotations : {}
90
92
nodeSelector : {}
91
93
tolerations : []
94
+ podAntiAffinity : soft
95
+ podAntiAffinityTopologyKey : kubernetes.io/hostname
92
96
affinity : {}
93
97
extraEnv : []
94
98
sidecars : []
@@ -130,6 +134,8 @@ controllerManager:
130
134
podAnnotations : {}
131
135
nodeSelector : {}
132
136
tolerations : []
137
+ podAntiAffinity : soft
138
+ podAntiAffinityTopologyKey : kubernetes.io/hostname
133
139
affinity : {}
134
140
extraEnv : []
135
141
sidecars : []
@@ -168,6 +174,8 @@ scheduler:
168
174
podAnnotations : {}
169
175
nodeSelector : {}
170
176
tolerations : []
177
+ podAntiAffinity : soft
178
+ podAntiAffinityTopologyKey : kubernetes.io/hostname
171
179
affinity : {}
172
180
extraEnv : []
173
181
sidecars : []
@@ -211,6 +219,8 @@ admin:
211
219
podAnnotations : {}
212
220
nodeSelector : {}
213
221
tolerations : []
222
+ podAntiAffinity : soft
223
+ podAntiAffinityTopologyKey : kubernetes.io/hostname
214
224
affinity : {}
215
225
extraEnv : []
216
226
sidecars : []
@@ -246,6 +256,8 @@ konnectivityServer:
246
256
podAnnotations : {}
247
257
nodeSelector : {}
248
258
tolerations : []
259
+ podAntiAffinity : soft
260
+ podAntiAffinityTopologyKey : kubernetes.io/hostname
249
261
affinity : {}
250
262
extraEnv : []
251
263
sidecars : []
@@ -289,6 +301,8 @@ konnectivityAgent:
289
301
podAnnotations : {}
290
302
nodeSelector : {}
291
303
tolerations : []
304
+ podAntiAffinity : soft
305
+ podAntiAffinityTopologyKey : kubernetes.io/hostname
292
306
affinity : {}
293
307
extraEnv : []
294
308
sidecars : []
You can’t perform that action at this time.
0 commit comments