From 2c89e6f6a0517df59c43a416c69fb731ffdf214e Mon Sep 17 00:00:00 2001 From: CEE Date: Wed, 3 Jan 2024 02:29:49 +0900 Subject: [PATCH] nginx conf --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/templates/_helpers.tpl | 2 ++ charts/nextcloud/templates/nextcloud-deployment.yaml | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 11b5b06..2a195b9 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 4.5.38 +version: 4.5.39 appVersion: 28.0.1 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/templates/_helpers.tpl b/charts/nextcloud/templates/_helpers.tpl index 3f5630f..e1a2593 100644 --- a/charts/nextcloud/templates/_helpers.tpl +++ b/charts/nextcloud/templates/_helpers.tpl @@ -154,6 +154,8 @@ Create volume mounts for the nextcloud container as well as the cron sidecar con {{- define "nextcloud.volumeMounts" -}} - name: nextcloud-config mountPath: /var/www/html/config/ +- name: nextcloud-nginx-config + mountPath: /etc/nginx/conf.d/ {{/* files >>> */}} diff --git a/charts/nextcloud/templates/nextcloud-deployment.yaml b/charts/nextcloud/templates/nextcloud-deployment.yaml index 2d1668d..450d53f 100644 --- a/charts/nextcloud/templates/nextcloud-deployment.yaml +++ b/charts/nextcloud/templates/nextcloud-deployment.yaml @@ -151,6 +151,8 @@ spec: - name: fpm-volume-permission image: busybox imagePullPolicy: IfNotPresent + # 33, 82 + {{ $chown_no := ternary "88:88" "33:33" .Values.nginx.enabled -}} command: [ 'chown','-R', '33:33', {{ .Values.persistence.nextcloudData.mountPath | squote }}, {{ .Values.persistence.nextcloudCustomApps.mountPath | squote }} ] securityContext: runAsUser: 0 @@ -266,6 +268,13 @@ spec: {{- toYaml . | nindent 8 }} {{- else }} {{- end }}{{/* end-with podSecurityContext */}} + {{- if .Values.nginx.enabled }} + # Will mount configuration files as www-data (id: 82) for nextcloud + fsGroup: 82 + {{- else }} + # Will mount configuration files as www-data (id: 33) for nextcloud + fsGroup: 33 + {{- end }} {{- if .Values.rbac.enabled }} serviceAccountName: {{ .Values.rbac.serviceaccount.name }} {{- end }}