Skip to content

Commit febd0a9

Browse files
authored
Helm Chart: Add support for tolerations (#1192)
Problem: There's no way to configure tolerations for the NGINX Gateway Fabric Pod in the helm chart. Solution: Add support for tolerations to be supplied if required. If not provided, there is no change to the deployment
1 parent 62ec2da commit febd0a9

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

deploy/helm-chart/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ The following tables lists the configurable parameters of the NGINX Gateway Fabr
226226
| `nginx.image.pullPolicy` | The `imagePullPolicy` for the NGINX image. | Always |
227227
| `nginx.lifecycle` | The `lifecycle` of the nginx container. | {} |
228228
| `terminationGracePeriodSeconds` | The termination grace period of the NGINX Gateway Fabric pod. | 30 |
229+
| `tolerations` | The `tolerations` of the NGINX Gateway Fabric pod. | [] |
229230
| `affinity` | The `affinity` of the NGINX Gateway Fabric pod. | {} |
230231
| `serviceAccount.annotations` | The `annotations` for the ServiceAccount used by the NGINX Gateway Fabric deployment. | {} |
231232
| `serviceAccount.name` | Name of the ServiceAccount used by the NGINX Gateway Fabric deployment. | Autogenerated |

deploy/helm-chart/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ spec:
143143
securityContext:
144144
fsGroup: 1001
145145
runAsNonRoot: true
146+
{{- if .Values.tolerations }}
147+
tolerations:
148+
{{- toYaml .Values.tolerations | nindent 6 }}
149+
{{- end }}
146150
volumes:
147151
- name: nginx-conf
148152
emptyDir: {}

deploy/helm-chart/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ nginx:
6161
## The termination grace period of the NGINX Gateway Fabric pod.
6262
terminationGracePeriodSeconds: 30
6363

64+
## Tolerations for the NGINX Gateway Fabric pod.
65+
tolerations: []
66+
6467
## The affinity of the NGINX Gateway Fabric pod.
6568
affinity: {}
6669

0 commit comments

Comments
 (0)