From e0935250ebdba4d0c9261abcb3da9ee565f538e3 Mon Sep 17 00:00:00 2001 From: leandrocostam Date: Thu, 1 Feb 2024 16:22:31 -0300 Subject: [PATCH] Add support to define nodeSelector for the NGINX Gateway Fabric pod. --- deploy/helm-chart/README.md | 1 + deploy/helm-chart/templates/deployment.yaml | 4 ++++ deploy/helm-chart/values.yaml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/deploy/helm-chart/README.md b/deploy/helm-chart/README.md index 320b636e34..65bfd82e18 100644 --- a/deploy/helm-chart/README.md +++ b/deploy/helm-chart/README.md @@ -301,6 +301,7 @@ The following tables lists the configurable parameters of the NGINX Gateway Fabr | `nginx.extraVolumeMounts` | Extra `volumeMounts` for the nginx container. | {} | | `terminationGracePeriodSeconds` | The termination grace period of the NGINX Gateway Fabric pod. | 30 | | `tolerations` | The `tolerations` of the NGINX Gateway Fabric pod. | [] | +| `nodeSelector` | The `nodeSelector` 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 | diff --git a/deploy/helm-chart/templates/deployment.yaml b/deploy/helm-chart/templates/deployment.yaml index baa9bb35b7..bb5a64c4f0 100644 --- a/deploy/helm-chart/templates/deployment.yaml +++ b/deploy/helm-chart/templates/deployment.yaml @@ -156,6 +156,10 @@ spec: tolerations: {{- toYaml .Values.tolerations | nindent 6 }} {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: + {{- toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} volumes: - name: nginx-conf emptyDir: {} diff --git a/deploy/helm-chart/values.yaml b/deploy/helm-chart/values.yaml index 81b973a175..65984a450f 100644 --- a/deploy/helm-chart/values.yaml +++ b/deploy/helm-chart/values.yaml @@ -73,6 +73,9 @@ terminationGracePeriodSeconds: 30 ## Tolerations for the NGINX Gateway Fabric pod. tolerations: [] +## The nodeSelector of the NGINX Gateway Fabric pod. +nodeSelector: {} + ## The affinity of the NGINX Gateway Fabric pod. affinity: {}