Skip to content

Commit 9909cef

Browse files
committed
Add support for deployment labels to helm chart
1 parent 4c51b05 commit 9909cef

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

charts/nginx-gateway-fabric/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
285285
| `nginxGateway.image.repository` | The NGINX Gateway Fabric image to use | string | `"ghcr.io/nginx/nginx-gateway-fabric"` |
286286
| `nginxGateway.image.tag` | | string | `"edge"` |
287287
| `nginxGateway.kind` | The kind of the NGINX Gateway Fabric installation - currently, only deployment is supported. | string | `"deployment"` |
288+
| `nginxGateway.labels` | Labels to be added to the controller Deployment | object | `{}` |
288289
| `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` |
289290
| `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 "". |
290291
| `nginxGateway.lifecycle` | The lifecycle of the nginx-gateway container. | object | `{}` |

charts/nginx-gateway-fabric/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ metadata:
66
namespace: {{ .Release.Namespace }}
77
labels:
88
{{- include "nginx-gateway.labels" . | nindent 4 }}
9+
{{- with .Values.nginxGateway.labels }}
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
912
spec:
1013
replicas: {{ .Values.nginxGateway.replicaCount }}
1114
selector:
@@ -15,6 +18,9 @@ spec:
1518
metadata:
1619
labels:
1720
{{- include "nginx-gateway.selectorLabels" . | nindent 8 }}
21+
{{- with .Values.nginxGateway.labels }}
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
1824
{{- if or .Values.nginxGateway.podAnnotations .Values.metrics.enable }}
1925
annotations:
2026
{{- if .Values.nginxGateway.podAnnotations }}

charts/nginx-gateway-fabric/values.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,12 @@
456456
"required": [],
457457
"title": "kind"
458458
},
459+
"labels": {
460+
"description": "Labels to be added to the controller Deployment",
461+
"required": [],
462+
"title": "labels",
463+
"type": "object"
464+
},
459465
"leaderElection": {
460466
"description": "The configuration for leader election.",
461467
"properties": {

charts/nginx-gateway-fabric/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ nginxGateway:
2121
# -- Set of custom annotations for the NGINX Gateway Fabric pods.
2222
podAnnotations: {}
2323

24+
# -- Labels to be added to the controller Deployment
25+
labels: {}
26+
2427
# -- Set of custom annotations for GatewayClass objects.
2528
gatewayClassAnnotations: {}
2629

0 commit comments

Comments
 (0)