Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom annotations into GatewayClass and NginxGateway manifests #1993

Merged
merged 12 commits into from
Jun 3, 2024
4 changes: 3 additions & 1 deletion charts/nginx-gateway-fabric/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,18 @@ kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/downlo
The following tables lists the configurable parameters of the NGINX Gateway Fabric chart and their default values.

| Parameter | Description | Default Value |
| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| ------------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| `nginxGateway.image.repository` | The repository for the NGINX Gateway Fabric image. | ghcr.io/nginxinc/nginx-gateway-fabric |
| `nginxGateway.image.tag` | The tag for the NGINX Gateway Fabric image. | edge |
| `nginxGateway.image.pullPolicy` | The `imagePullPolicy` for the NGINX Gateway Fabric image. | Always |
| `nginxGateway.lifecycle` | The `lifecycle` of the nginx-gateway container. | {} |
| `nginxGateway.extraVolumeMounts` | Extra `volumeMounts` for the nginxGateway container. | {} |
| `nginxGateway.gatewayClassName` | The name of the GatewayClass for the NGINX Gateway Fabric deployment. | nginx |
| `nginxGateway.gatewayClassAnnotat` | Set of custom annotations for GatewayClass objects. | {} |
sgavrylenko marked this conversation as resolved.
Show resolved Hide resolved
| `nginxGateway.gatewayControllerName` | The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain is gateway.nginx.org. | gateway.nginx.org/nginx-gateway-controller |
| `nginxGateway.kind` | The kind of the NGINX Gateway Fabric installation - currently, only Deployment is supported. | deployment |
| `nginxGateway.config` | The dynamic configuration for the control plane that is contained in the NginxGateway resource | [See nginxGateway.config section](values.yaml) |
| `nginxGateway.Annotations` | Set of custom annotations for NginxGateway objects. | {} |
sgavrylenko marked this conversation as resolved.
Show resolved Hide resolved
| `nginxGateway.readinessProbe.enable` | Enable the /readyz endpoint on the control plane. | true |
| `nginxGateway.readinessProbe.port` | Port in which the readiness endpoint is exposed. | 8081 |
| `nginxGateway.readinessProbe.initialDelaySeconds` | The number of seconds after the Pod has started before the readiness probes are initiated. | 3 |
Expand Down
6 changes: 6 additions & 0 deletions charts/nginx-gateway-fabric/templates/gatewayclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ metadata:
name: {{ .Values.nginxGateway.gatewayClassName }}
labels:
{{- include "nginx-gateway.labels" . | nindent 4 }}
{{- if .Values.nginxGateway.gatewayClassAnnotations }}
annotations:
{{- range $key, $value := .Values.nginxGateway.gatewayClassAnnotations }}
{{ printf "%s: %s" $key $value }}
{{- end }}
lucacome marked this conversation as resolved.
Show resolved Hide resolved
{{- end }}
spec:
controllerName: {{ .Values.nginxGateway.gatewayControllerName }}
{{- if .Values.nginx.config }}
Expand Down
6 changes: 6 additions & 0 deletions charts/nginx-gateway-fabric/templates/nginxgateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-gateway.labels" . | nindent 4 }}
{{- if .Values.nginxGateway.configAnnotations }}
annotations:
{{- range $key, $value := .Values.nginxGateway.configAnnotations }}
{{ printf "%s: %s" $key $value }}
{{- end }}
{{- end }}
spec:
{{- toYaml .Values.nginxGateway.config | nindent 2 }}
8 changes: 8 additions & 0 deletions charts/nginx-gateway-fabric/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ nginxGateway:
## Fabric must have a unique corresponding GatewayClass resource. NGINX Gateway Fabric only processes resources that
## belong to its class - i.e. have the "gatewayClassName" field resource equal to the class.
gatewayClassName: nginx
## Set of custom annotations for GatewayClass objects, e.g:
## gatewayClassAnnotations:
## someKey: someValue
gatewayClassAnnotations: {}
## The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain
## is gateway.nginx.org.
gatewayControllerName: gateway.nginx.org/nginx-gateway-controller
Expand All @@ -13,6 +17,10 @@ nginxGateway:
logging:
## Log level. Supported values "info", "debug", "error".
level: info
## Set of custom annotations for NginxGateway objects, e.g:
## configAnnotations:
## someKey: someValue
configAnnotations: {}
## The number of replicas of the NGINX Gateway Fabric Deployment.
replicaCount: 1
## The configuration for leader election.
Expand Down