Skip to content

Commit f14a981

Browse files
authored
Merge pull request #6154 from jetersen/fix/6055
chart: add `topologySpreadConstraint` to controller
2 parents 9e4c31e + 4733e7c commit f14a981

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

charts/ingress-nginx/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: ingress-nginx
3-
version: 2.15.0
3+
version: 2.16.0
44
appVersion: 0.35.0
55
home: https://github.com/kubernetes/ingress-nginx
66
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer

charts/ingress-nginx/templates/controller-daemonset.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ spec:
223223
{{- end }}
224224
{{- if .Values.controller.affinity }}
225225
affinity: {{ toYaml .Values.controller.affinity | nindent 8 }}
226+
{{- end }}
227+
{{- if .Values.controller.topologySpreadConstraints }}
228+
topologySpreadConstraints: {{ toYaml .Values.controller.topologySpreadConstraints | nindent 8 }}
226229
{{- end }}
227230
serviceAccountName: {{ template "ingress-nginx.serviceAccountName" . }}
228231
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}

charts/ingress-nginx/templates/controller-deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ spec:
227227
{{- end }}
228228
{{- if .Values.controller.affinity }}
229229
affinity: {{ toYaml .Values.controller.affinity | nindent 8 }}
230+
{{- end }}
231+
{{- if .Values.controller.topologySpreadConstraints }}
232+
topologySpreadConstraints: {{ toYaml .Values.controller.topologySpreadConstraints | nindent 8 }}
230233
{{- end }}
231234
serviceAccountName: {{ template "ingress-nginx.serviceAccountName" . }}
232235
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}

charts/ingress-nginx/values.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,17 @@ controller:
209209
# - controller
210210
# topologyKey: "kubernetes.io/hostname"
211211

212+
## Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
213+
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
214+
##
215+
topologySpreadConstraints: []
216+
# - maxSkew: 1
217+
# topologyKey: failure-domain.beta.kubernetes.io/zone
218+
# whenUnsatisfiable: DoNotSchedule
219+
# labelSelector:
220+
# matchLabels:
221+
# app.kubernetes.io/instance: ingress-nginx-internal
222+
212223
## terminationGracePeriodSeconds
213224
## wait up to five minutes for the drain of connections
214225
##

0 commit comments

Comments
 (0)