|
26 | 26 | annotations: |
27 | 27 | checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} |
28 | 28 | checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} |
| 29 | + {{- if .Values.automaticZonePlacement.enabled }} |
| 30 | + automatic-zone-placement/fqdn: {{ .Values.automaticZonePlacement.fqdn | quote }} |
| 31 | + {{- end }} |
29 | 32 | {{- with .Values.podAnnotations }} |
30 | 33 | {{- toYaml . | nindent 8 }} |
31 | 34 | {{- end }} |
@@ -316,25 +319,35 @@ spec: |
316 | 319 | {{- end }} |
317 | 320 | {{- end }} |
318 | 321 | topologySpreadConstraints: |
| 322 | +{{- if .Values.automaticZonePlacement.enabled }} |
| 323 | +{{- if .Values.automaticZonePlacement.spreadInstancesTypes }} |
| 324 | + - labelSelector: |
| 325 | + matchLabels: |
| 326 | + app.kubernetes.io/instance: {{ .Release.Name }} |
| 327 | + app.kubernetes.io/component: "worker" |
| 328 | + matchLabelKeys: |
| 329 | + - pod-template-hash |
| 330 | + maxSkew: 1 |
| 331 | + topologyKey: node.kubernetes.io/instance-type |
| 332 | + whenUnsatisfiable: ScheduleAnyway |
| 333 | +{{- end }} |
| 334 | +{{- else }} |
319 | 335 | - labelSelector: |
320 | 336 | matchLabels: |
321 | 337 | app.kubernetes.io/instance: {{ .Release.Name }} |
322 | 338 | app.kubernetes.io/component: "worker" |
323 | | - {{- if semverCompare ">=1.27-0" $.Capabilities.KubeVersion.GitVersion }} |
324 | 339 | matchLabelKeys: |
325 | 340 | - pod-template-hash |
326 | | - {{- end }} |
327 | 341 | maxSkew: 1 |
328 | 342 | topologyKey: topology.kubernetes.io/zone |
329 | 343 | whenUnsatisfiable: ScheduleAnyway |
| 344 | +{{- end }} |
330 | 345 | - labelSelector: |
331 | 346 | matchLabels: |
332 | 347 | app.kubernetes.io/instance: {{ .Release.Name }} |
333 | 348 | app.kubernetes.io/component: "worker" |
334 | | - {{- if semverCompare ">=1.27-0" $.Capabilities.KubeVersion.GitVersion }} |
335 | 349 | matchLabelKeys: |
336 | 350 | - pod-template-hash |
337 | | - {{- end }} |
338 | 351 | maxSkew: 1 |
339 | 352 | topologyKey: kubernetes.io/hostname |
340 | 353 | whenUnsatisfiable: DoNotSchedule |
0 commit comments