diff --git a/charts/nginx-gateway-fabric/README.md b/charts/nginx-gateway-fabric/README.md index 3dce9a4ac7..697c78f51f 100644 --- a/charts/nginx-gateway-fabric/README.md +++ b/charts/nginx-gateway-fabric/README.md @@ -300,6 +300,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri | `nginxGateway.snippetsFilters.enable` | Enable SnippetsFilters feature. SnippetsFilters allow inserting NGINX configuration into the generated NGINX config for HTTPRoute and GRPCRoute resources. | bool | `false` | | `nodeSelector` | The nodeSelector of the NGINX Gateway Fabric pod. | object | `{}` | | `service.annotations` | The annotations of the NGINX Gateway Fabric service. | object | `{}` | +| `service.labels` | The additional labels of the NGINX Gateway Fabric service. | object | `{}` | | `service.create` | Creates a service to expose the NGINX Gateway Fabric pods. | bool | `true` | | `service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | string | `"Local"` | | `service.loadBalancerIP` | The static IP address for the load balancer. Requires service.type set to LoadBalancer. | string | `""` | diff --git a/charts/nginx-gateway-fabric/templates/service.yaml b/charts/nginx-gateway-fabric/templates/service.yaml index a80686dc7e..4d6c61f69a 100644 --- a/charts/nginx-gateway-fabric/templates/service.yaml +++ b/charts/nginx-gateway-fabric/templates/service.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "nginx-gateway.labels" . | nindent 4 }} + {{- with .Values.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- if .Values.service.annotations }} annotations: {{ toYaml .Values.service.annotations | indent 4 }} diff --git a/charts/nginx-gateway-fabric/values.schema.json b/charts/nginx-gateway-fabric/values.schema.json index 5ef6236304..beae5f8499 100644 --- a/charts/nginx-gateway-fabric/values.schema.json +++ b/charts/nginx-gateway-fabric/values.schema.json @@ -604,6 +604,12 @@ "title": "annotations", "type": "object" }, + "labels": { + "description": "The additional labels of the NGINX Gateway Fabric service.", + "required": [], + "title": "labels", + "type": "object" + }, "create": { "default": true, "description": "Creates a service to expose the NGINX Gateway Fabric pods.", diff --git a/charts/nginx-gateway-fabric/values.yaml b/charts/nginx-gateway-fabric/values.yaml index c817fb76b7..ff1128c6aa 100644 --- a/charts/nginx-gateway-fabric/values.yaml +++ b/charts/nginx-gateway-fabric/values.yaml @@ -330,6 +330,9 @@ service: # -- The annotations of the NGINX Gateway Fabric service. annotations: {} + # -- The additional labels of the NGINX Gateway Fabric service. + labels: {} + # -- The static IP address for the load balancer. Requires service.type set to LoadBalancer. loadBalancerIP: ""