From 0913ce2f362dbd967cb553146191314f57b9eac9 Mon Sep 17 00:00:00 2001 From: Aitor Date: Fri, 5 Feb 2021 17:55:58 +0000 Subject: [PATCH] fixes nextcloud/helm#70 saving phpConfigs files to the right directory when using fpm (#71) * fixes nextcloud/helm#70 saving phpConfigs files to the right directory when using fpm - When using nginx + nextcloud fpm image, `phpConfigs` are now mounted to /usr/local/etc/php-fpm.d instead of /usr/local/etc/php/conf.d Signed-off-by: Aitor Pazos * fixes nextcloud/helm#70 Bump version Signed-off-by: Aitor Pazos --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/templates/deployment.yaml | 3 ++- charts/nextcloud/values.yaml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index cd03a53c..884417f5 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 2.5.1 +version: 2.5.2 appVersion: 19.0.3 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/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index 434e4a0e..53b99bc5 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -255,9 +255,10 @@ spec: {{- end }} {{- end }} {{- end }} + {{- $nginxEnabled := .Values.nginx.enabled -}} {{- range $key, $value := .Values.nextcloud.phpConfigs }} - name: nextcloud-phpconfig - mountPath: /usr/local/etc/php/conf.d/{{ $key }} + mountPath: {{ $nginxEnabled | ternary (printf "/usr/local/etc/php-fpm.d/%s" $key | quote) (printf "/usr/local/etc/php/conf.d/%s" $key | quote) }} subPath: {{ $key }} {{- end }} {{- if .Values.nextcloud.extraVolumeMounts }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 8403a017..5d155bae 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -89,7 +89,7 @@ nextcloud: name: user password: pass # PHP Configuration files - # Will be injected in /usr/local/etc/php/conf.d + # Will be injected in /usr/local/etc/php/conf.d for apache image and in /usr/local/etc/php-fpm.d when nginx.enabled: true phpConfigs: {} # Default config files # IMPORTANT: Will be used only if you put extra configs, otherwise default will come from nextcloud itself