Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.d/5-internal/nginz-zone-topology
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add zone-level topologySpreadConstraints to nginz deployment so pods are spread evenly across availability zones, ensuring traffic reaches all AZs when zone-aware routing is in use.
topologySpreadConstraints are now configurable via values.yaml (defaulting to zone + hostname spreading), allowing chart users to customise pod scheduling without patching the chart.
9 changes: 3 additions & 6 deletions charts/nginz/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ spec:
fluentbit.io/parser-nginz: nginz
spec:
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: nginz
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: nginz
image: "{{ .Values.images.nginz.repository }}:{{ .Values.images.nginz.tag }}"
Expand Down
13 changes: 13 additions & 0 deletions charts/nginz/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ config:
wsPort: 8081
useProxyProtocol: true
terminationGracePeriodSeconds: 90
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "topology.kubernetes.io/zone"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: nginz
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: nginz
nginx_conf:
dns_resolver: kube-dns
cluster_domain: cluster.local
Expand Down