From 58472e29226ca533f1dcca4d35a8be3338e494a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20P=C3=B6hner?= <10630407+groundhog2k@users.noreply.github.com> Date: Wed, 22 Dec 2021 19:13:55 +0100 Subject: [PATCH] Investigate Nextcloud warning about read-only file-sys for redis config (#758) --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/README.md | 2 +- charts/nextcloud/templates/deployment.yaml | 33 ++++++++++++++++------ 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 06bc5d17..0b05850d 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -8,7 +8,7 @@ maintainers: - name: groundhog2k # This is the chart version. -version: 0.9.0 +version: 0.9.1 # This is the version number of the application being deployed. appVersion: "23.0.0-apache" diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 8085d58e..4119b05c 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -1,6 +1,6 @@ # Nextcloud -   +   A Helm chart for Nextcloud on Kubernetes diff --git a/charts/nextcloud/templates/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index 135e8c17..9de39d7d 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -49,6 +49,26 @@ spec: volumeMounts: - mountPath: /var/datavolume name: nextcloud-data-vol + - name: {{ .Chart.Name }}-initconfd + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ['sh', '-c', 'cp -R /usr/local/etc/php/conf.d/* /confd && chmod 660 /confd/*'] + volumeMounts: + - mountPath: /confd + name: confd + - mountPath: /usr/local/etc/php/conf.d/custom.ini + subPath: custom.ini + name: extended + - mountPath: /usr/local/etc/php/conf.d/memory-limit.ini + subPath: memory-limit.ini + name: extended + - mountPath: /usr/local/etc/php/conf.d/redis-session.ini + subPath: redis-session.ini + name: extended containers: - name: {{ .Chart.Name }} {{- with .Values.securityContext }} @@ -138,15 +158,8 @@ spec: - mountPath: /etc/apache2/000-default.conf subPath: 000-default.conf name: extended - - mountPath: /usr/local/etc/php/conf.d/custom.ini - subPath: custom.ini - name: extended - - mountPath: /usr/local/etc/php/conf.d/memory-limit.ini - subPath: memory-limit.ini - name: extended - - mountPath: /usr/local/etc/php/conf.d/redis-session.ini - subPath: redis-session.ini - name: extended + - mountPath: /usr/local/etc/php/conf.d + name: confd {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -164,6 +177,8 @@ spec: emptyDir: {} - name: run emptyDir: {} + - name: confd + emptyDir: {} - name: extended configMap: name: {{ include "nextcloud.fullname" . }}-extended -- GitLab