Skip to content

Commit

Permalink
Allow to set environment variables to Nginx container (#566)
Browse files Browse the repository at this point in the history
Signed-off-by: François Ménabé <[email protected]>
Co-authored-by: JesseBot <[email protected]>
  • Loading branch information
fmenabe and jessebot authored May 31, 2024
1 parent e39ca2a commit 7394c10
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 4.6.8
version: 4.6.9
appVersion: 29.0.0
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
1 change: 1 addition & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ The following table lists the configurable parameters of the nextcloud chart and
| `nginx.config.custom` | Specify a custom config for nginx | `{}` |
| `nginx.resources` | nginx resources | `{}` |
| `nginx.securityContext` | Optional security context for the nginx container | `nil` |
| `nginx.extraEnv` | Optional environment variables for the nginx container | `nil` |
| `lifecycle.postStartCommand` | Specify deployment lifecycle hook postStartCommand | `nil` |
| `lifecycle.preStopCommand` | Specify deployment lifecycle hook preStopCommand | `nil` |
| `redis.enabled` | Whether to install/use redis for locking | `false` |
Expand Down
4 changes: 4 additions & 0 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ spec:
- name: {{ .Chart.Name }}-nginx
image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}"
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
{{- with .Values.nginx.extraEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
protocol: TCP
Expand Down
5 changes: 5 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ nginx:
# runAsNonRoot: true
# readOnlyRootFilesystem: true

## Extra environment variables
extraEnv: []
# - name: SOME_ENV
# value: ENV_VALUE

internalDatabase:
enabled: true
name: nextcloud
Expand Down

0 comments on commit 7394c10

Please sign in to comment.