diff --git a/charts/nginx-gateway-fabric/README.md b/charts/nginx-gateway-fabric/README.md index f52c09aba0..3dce9a4ac7 100644 --- a/charts/nginx-gateway-fabric/README.md +++ b/charts/nginx-gateway-fabric/README.md @@ -285,6 +285,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri | `nginxGateway.image.repository` | The NGINX Gateway Fabric image to use | string | `"ghcr.io/nginx/nginx-gateway-fabric"` | | `nginxGateway.image.tag` | | string | `"edge"` | | `nginxGateway.kind` | The kind of the NGINX Gateway Fabric installation - currently, only deployment is supported. | string | `"deployment"` | +| `nginxGateway.labels` | Set of labels to be added for NGINX Gateway Fabric deployment. | object | `{}` | | `nginxGateway.leaderElection.enable` | Enable leader election. Leader election is used to avoid multiple replicas of the NGINX Gateway Fabric reporting the status of the Gateway API resources. If not enabled, all replicas of NGINX Gateway Fabric will update the statuses of the Gateway API resources. | bool | `true` | | `nginxGateway.leaderElection.lockName` | The name of the leader election lock. A Lease object with this name will be created in the same Namespace as the controller. | string | Autogenerated if not set or set to "". | | `nginxGateway.lifecycle` | The lifecycle of the nginx-gateway container. | object | `{}` | diff --git a/charts/nginx-gateway-fabric/templates/deployment.yaml b/charts/nginx-gateway-fabric/templates/deployment.yaml index ce727ac027..25d0547f3a 100644 --- a/charts/nginx-gateway-fabric/templates/deployment.yaml +++ b/charts/nginx-gateway-fabric/templates/deployment.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "nginx-gateway.labels" . | nindent 4 }} + {{- with .Values.nginxGateway.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.nginxGateway.replicaCount }} selector: @@ -15,6 +18,9 @@ spec: metadata: labels: {{- include "nginx-gateway.selectorLabels" . | nindent 8 }} + {{- with .Values.nginxGateway.labels }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- if or .Values.nginxGateway.podAnnotations .Values.metrics.enable }} annotations: {{- if .Values.nginxGateway.podAnnotations }} diff --git a/charts/nginx-gateway-fabric/values.schema.json b/charts/nginx-gateway-fabric/values.schema.json index 73a02d292d..5ef6236304 100644 --- a/charts/nginx-gateway-fabric/values.schema.json +++ b/charts/nginx-gateway-fabric/values.schema.json @@ -456,6 +456,12 @@ "required": [], "title": "kind" }, + "labels": { + "description": "Set of labels to be added for NGINX Gateway Fabric deployment.", + "required": [], + "title": "labels", + "type": "object" + }, "leaderElection": { "description": "The configuration for leader election.", "properties": { diff --git a/charts/nginx-gateway-fabric/values.yaml b/charts/nginx-gateway-fabric/values.yaml index 2fe06c966c..c817fb76b7 100644 --- a/charts/nginx-gateway-fabric/values.yaml +++ b/charts/nginx-gateway-fabric/values.yaml @@ -21,6 +21,9 @@ nginxGateway: # -- Set of custom annotations for the NGINX Gateway Fabric pods. podAnnotations: {} + # -- Set of labels to be added for NGINX Gateway Fabric deployment. + labels: {} + # -- Set of custom annotations for GatewayClass objects. gatewayClassAnnotations: {}