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

Helm Chart: Support extra volume mounts #1193

Merged
merged 19 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deploy/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ The following tables lists the configurable parameters of the NGINX Gateway Fabr
| `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. | {} |
| `nginx.extraVolumeMounts` | Extra `volumeMounts` for the nginxGateway container. | {} |
oWretch marked this conversation as resolved.
Show resolved Hide resolved
| `nginxGateway.gatewayClassName` | The name of the GatewayClass for the NGINX Gateway Fabric deployment. | nginx |
| `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 |
Expand All @@ -225,6 +226,7 @@ The following tables lists the configurable parameters of the NGINX Gateway Fabr
| `nginx.image.tag` | The tag for the NGINX image. | edge |
| `nginx.image.pullPolicy` | The `imagePullPolicy` for the NGINX image. | Always |
| `nginx.lifecycle` | The `lifecycle` of the nginx container. | {} |
| `nginx.extraVolumeMounts` | Extra `volumeMounts` for the nginx container. | {} |
| `terminationGracePeriodSeconds` | The termination grace period of the NGINX Gateway Fabric pod. | 30 |
| `affinity` | The `affinity` of the NGINX Gateway Fabric pod. | {} |
| `serviceAccount.annotations` | The `annotations` for the ServiceAccount used by the NGINX Gateway Fabric deployment. | {} |
Expand All @@ -237,3 +239,4 @@ The following tables lists the configurable parameters of the NGINX Gateway Fabr
| `metrics.disable` | Disable exposing metrics in the Prometheus format. | false |
| `metrics.port` | Set the port where the Prometheus metrics are exposed. Format: [1024 - 65535] | 9113 |
| `metrics.secure` | Enable serving metrics via https. By default metrics are served via http. Please note that this endpoint will be secured with a self-signed certificate. | false |
| `extraVolumes` | Extra `volumes` to be mounted into the containers. | [] |
oWretch marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 9 additions & 0 deletions deploy/helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ spec:
mountPath: /etc/nginx/secrets
- name: nginx-run
mountPath: /var/run/nginx
{{- with .Values.nginxGateway.extraVolumeMounts }}
oWretch marked this conversation as resolved.
Show resolved Hide resolved
{{ toYaml . | nindent 8 }}
{{- end }}
- image: {{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
name: nginx
Expand Down Expand Up @@ -133,6 +136,9 @@ spec:
mountPath: /var/cache/nginx
- name: nginx-lib
mountPath: /var/lib/nginx
{{- with .Values.nginx.extraVolumeMounts }}
oWretch marked this conversation as resolved.
Show resolved Hide resolved
{{ toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- if .Values.affinity }}
affinity:
Expand All @@ -154,4 +160,7 @@ spec:
emptyDir: {}
- name: nginx-lib
emptyDir: {}
{{- with .Values.extraVolumes }}
oWretch marked this conversation as resolved.
Show resolved Hide resolved
{{ toYaml . | nindent 6 }}
{{- end }}
{{- end }}
25 changes: 17 additions & 8 deletions deploy/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ nginxGateway:
## The lifecycle of the nginx-gateway container.
lifecycle: {}

# extraVolumeMounts are the additional volume mounts.
oWretch marked this conversation as resolved.
Show resolved Hide resolved
extraVolumeMounts: []

nginx:
## The NGINX image to use
image:
Expand All @@ -58,6 +61,9 @@ nginx:
## The lifecycle of the nginx container.
lifecycle: {}

# extraVolumeMounts are the additional volume mounts.
oWretch marked this conversation as resolved.
Show resolved Hide resolved
extraVolumeMounts: []

## The termination grace period of the NGINX Gateway Fabric pod.
terminationGracePeriodSeconds: 30

Expand All @@ -83,14 +89,14 @@ service:
## A list of ports to expose through the NGINX Gateway Fabric service. Update it to match the listener ports from
## your Gateway resource. Follows the conventional Kubernetes yaml syntax for service ports.
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
- port: 443
targetPort: 443
protocol: TCP
name: https
- port: 80
oWretch marked this conversation as resolved.
Show resolved Hide resolved
targetPort: 80
protocol: TCP
name: http
- port: 443
targetPort: 443
protocol: TCP
name: https

metrics:
## Enable exposing metrics in the Prometheus format.
Expand All @@ -100,3 +106,6 @@ metrics:
## Enable serving metrics via https. By default metrics are served via http.
## Please note that this endpoint will be secured with a self-signed certificate.
secure: false

# extraVolumes for the extraVolumeMounts. Useful to mount internal root certificates for example.
oWretch marked this conversation as resolved.
Show resolved Hide resolved
extraVolumes: []