From 7394c10b3dc518cb7ad33f96e62ee20acb539f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20M=C3=A9nab=C3=A9?= Date: Fri, 31 May 2024 08:54:09 +0200 Subject: [PATCH] Allow to set environment variables to Nginx container (#566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Ménabé Co-authored-by: JesseBot --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/README.md | 1 + charts/nextcloud/templates/deployment.yaml | 4 ++++ charts/nextcloud/values.yaml | 5 +++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 243346f3..d4d18917 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -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: diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 6581b09c..4df1a770 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -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` | diff --git a/charts/nextcloud/templates/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index be3aeea9..83546f42 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -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 diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 8a0868dd..b2e7d28a 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -245,6 +245,11 @@ nginx: # runAsNonRoot: true # readOnlyRootFilesystem: true + ## Extra environment variables + extraEnv: [] + # - name: SOME_ENV + # value: ENV_VALUE + internalDatabase: enabled: true name: nextcloud