Deployment/DaemonSet: Template topologySpreadConstraints
. (#10259)
This commit is contained in:
parent
da9c5730f6
commit
4869c8b462
3 changed files with 17 additions and 7 deletions
|
@ -202,7 +202,7 @@ spec:
|
||||||
affinity: {{ toYaml .Values.controller.affinity | nindent 8 }}
|
affinity: {{ toYaml .Values.controller.affinity | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.topologySpreadConstraints }}
|
{{- if .Values.controller.topologySpreadConstraints }}
|
||||||
topologySpreadConstraints: {{ toYaml .Values.controller.topologySpreadConstraints | nindent 8 }}
|
topologySpreadConstraints: {{ tpl (toYaml .Values.controller.topologySpreadConstraints) $ | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: {{ template "ingress-nginx.serviceAccountName" . }}
|
serviceAccountName: {{ template "ingress-nginx.serviceAccountName" . }}
|
||||||
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
|
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
|
||||||
|
|
|
@ -209,7 +209,7 @@ spec:
|
||||||
affinity: {{ toYaml .Values.controller.affinity | nindent 8 }}
|
affinity: {{ toYaml .Values.controller.affinity | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.topologySpreadConstraints }}
|
{{- if .Values.controller.topologySpreadConstraints }}
|
||||||
topologySpreadConstraints: {{ toYaml .Values.controller.topologySpreadConstraints | nindent 8 }}
|
topologySpreadConstraints: {{ tpl (toYaml .Values.controller.topologySpreadConstraints) $ | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: {{ template "ingress-nginx.serviceAccountName" . }}
|
serviceAccountName: {{ template "ingress-nginx.serviceAccountName" . }}
|
||||||
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
|
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
|
||||||
|
|
|
@ -248,12 +248,22 @@ controller:
|
||||||
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
|
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
|
||||||
##
|
##
|
||||||
topologySpreadConstraints: []
|
topologySpreadConstraints: []
|
||||||
# - maxSkew: 1
|
# - labelSelector:
|
||||||
# topologyKey: topology.kubernetes.io/zone
|
|
||||||
# whenUnsatisfiable: DoNotSchedule
|
|
||||||
# labelSelector:
|
|
||||||
# matchLabels:
|
# matchLabels:
|
||||||
# app.kubernetes.io/instance: ingress-nginx-internal
|
# app.kubernetes.io/name: '{{ include "ingress-nginx.name" . }}'
|
||||||
|
# app.kubernetes.io/instance: '{{ .Release.Name }}'
|
||||||
|
# app.kubernetes.io/component: controller
|
||||||
|
# topologyKey: topology.kubernetes.io/zone
|
||||||
|
# maxSkew: 1
|
||||||
|
# whenUnsatisfiable: ScheduleAnyway
|
||||||
|
# - labelSelector:
|
||||||
|
# matchLabels:
|
||||||
|
# app.kubernetes.io/name: '{{ include "ingress-nginx.name" . }}'
|
||||||
|
# app.kubernetes.io/instance: '{{ .Release.Name }}'
|
||||||
|
# app.kubernetes.io/component: controller
|
||||||
|
# topologyKey: kubernetes.io/hostname
|
||||||
|
# maxSkew: 1
|
||||||
|
# whenUnsatisfiable: ScheduleAnyway
|
||||||
|
|
||||||
# -- `terminationGracePeriodSeconds` to avoid killing pods before we are ready
|
# -- `terminationGracePeriodSeconds` to avoid killing pods before we are ready
|
||||||
## wait up to five minutes for the drain of connections
|
## wait up to five minutes for the drain of connections
|
||||||
|
|
Loading…
Reference in a new issue