Skip to content

Commit 105a5e3

Browse files
authored
Feature/topology spread constraints (#2703)
Problem: Currently the helm chart does not allow us to configure topologySpreadConstraints. Solution: Add topologySpreadConstraints option to the helm chart
1 parent c33f907 commit 105a5e3

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

charts/nginx-gateway-fabric/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
307307
| `serviceAccount.name` | The name of the service account of the NGINX Gateway Fabric pods. Used for RBAC. | string | Autogenerated if not set or set to "" |
308308
| `terminationGracePeriodSeconds` | The termination grace period of the NGINX Gateway Fabric pod. | int | `30` |
309309
| `tolerations` | Tolerations for the NGINX Gateway Fabric pod. | list | `[]` |
310+
| `topologySpreadConstraints` | The topology spread constraints for the NGINX Gateway Fabric pod. | list | `[]` |
310311

311312
----------------------------------------------
312313
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)

charts/nginx-gateway-fabric/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ spec:
2929
{{- end }}
3030
{{- end }}
3131
spec:
32+
{{- if .Values.topologySpreadConstraints }}
33+
topologySpreadConstraints:
34+
{{- toYaml .Values.topologySpreadConstraints | nindent 8 }}
35+
{{- end }}
3236
initContainers:
3337
- name: copy-nginx-config
3438
image: {{ .Values.nginxGateway.image.repository }}:{{ default .Chart.AppVersion .Values.nginxGateway.image.tag }}

charts/nginx-gateway-fabric/values.schema.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,15 @@
676676
"required": [],
677677
"title": "tolerations",
678678
"type": "array"
679+
},
680+
"topologySpreadConstraints": {
681+
"description": "The topology spread constraints for the NGINX Gateway Fabric pod.",
682+
"items": {
683+
"required": []
684+
},
685+
"required": [],
686+
"title": "topologySpreadConstraints",
687+
"type": "array"
679688
}
680689
},
681690
"required": [],

charts/nginx-gateway-fabric/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ nodeSelector: {}
260260
# -- The affinity of the NGINX Gateway Fabric pod.
261261
affinity: {}
262262

263+
# -- The topology spread constraints for the NGINX Gateway Fabric pod.
264+
topologySpreadConstraints: []
265+
263266
serviceAccount:
264267
# -- Set of custom annotations for the NGINX Gateway Fabric service account.
265268
annotations: {}

0 commit comments

Comments
 (0)