diff --git a/charts/nextcloud/templates/config.yaml b/charts/nextcloud/templates/config.yaml index 2e811f16..6976741a 100644 --- a/charts/nextcloud/templates/config.yaml +++ b/charts/nextcloud/templates/config.yaml @@ -9,12 +9,12 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} data: -{{- range $key, $value := .Values.nextcloud.configs }} + {{- range $key, $value := .Values.nextcloud.configs }} {{ $key }}: |- -{{ $value | indent 4 }} -{{- end }} -{{- if .Values.nextcloud.defaultConfigs }} -{{- if index .Values.nextcloud.defaultConfigs ".htaccess" }} + {{ $value | nindent 4 }} + {{- end }} + {{- if .Values.nextcloud.defaultConfigs }} + {{- if index .Values.nextcloud.defaultConfigs ".htaccess" }} .htaccess: |- # line below if for Apache 2.4 @@ -28,8 +28,8 @@ data: IndexIgnore * -{{- end }} -{{- if index .Values.nextcloud.defaultConfigs "redis.config.php" }} + {{- end }} + {{- if index .Values.nextcloud.defaultConfigs "redis.config.php" }} redis.config.php: |- array( 'host' => getenv('REDIS_HOST'), 'port' => getenv('REDIS_HOST_PORT') ?: 6379, -{{- if .Values.redis.auth.enabled }} + {{- if .Values.redis.auth.enabled }} 'password' => getenv('REDIS_HOST_PASSWORD'), -{{- end }} + {{- end }} ), ); } -{{- end }} -{{- if index .Values.nextcloud.defaultConfigs "apache-pretty-urls.config.php" }} + {{- end }} + {{- if index .Values.nextcloud.defaultConfigs "apache-pretty-urls.config.php" }} apache-pretty-urls.config.php: |- '/', ); -{{- end }} -{{- if index .Values.nextcloud.defaultConfigs "apcu.config.php" }} + {{- end }} + {{- if index .Values.nextcloud.defaultConfigs "apcu.config.php" }} apcu.config.php: |- '\OC\Memcache\APCu', ); -{{- end }} -{{- if index .Values.nextcloud.defaultConfigs "apps.config.php" }} + {{- end }} + {{- if index .Values.nextcloud.defaultConfigs "apps.config.php" }} apps.config.php: |- getenv('MAIL_DOMAIN'), ); } -{{- end }} -{{- end }} -{{- end }} + {{- end }} + {{- end }}{{/* end-if defaultConfigs */}} + {{- end }}{{/* end-if configs */}}