Skip to content

Commit

Permalink
Helm Chart: Add support for tolerations (#1192)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
oWretch authored Oct 31, 2023
1 parent 62ec2da commit febd0a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions deploy/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ The following tables lists the configurable parameters of the NGINX Gateway Fabr
| `nginx.image.pullPolicy` | The `imagePullPolicy` for the NGINX image. | Always |
| `nginx.lifecycle` | The `lifecycle` of the nginx container. | {} |
| `terminationGracePeriodSeconds` | The termination grace period of the NGINX Gateway Fabric pod. | 30 |
| `tolerations` | The `tolerations` of the NGINX Gateway Fabric pod. | [] |
| `affinity` | The `affinity` of the NGINX Gateway Fabric pod. | {} |
| `serviceAccount.annotations` | The `annotations` for the ServiceAccount used by the NGINX Gateway Fabric deployment. | {} |
| `serviceAccount.name` | Name of the ServiceAccount used by the NGINX Gateway Fabric deployment. | Autogenerated |
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ spec:
securityContext:
fsGroup: 1001
runAsNonRoot: true
{{- if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 6 }}
{{- end }}
volumes:
- name: nginx-conf
emptyDir: {}
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ nginx:
## The termination grace period of the NGINX Gateway Fabric pod.
terminationGracePeriodSeconds: 30

## Tolerations for the NGINX Gateway Fabric pod.
tolerations: []

## The affinity of the NGINX Gateway Fabric pod.
affinity: {}

Expand Down

0 comments on commit febd0a9

Please sign in to comment.