@@ -28,7 +28,7 @@ Create a default fully qualified redis app name.
2828We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
2929*/ }}
3030{{- define " nextcloud.redis.fullname" -}}
31- {{- printf " %s -%s " .Release.Name " redis " | trunc 63 | trimSuffix " -" -}}
31+ {{- printf " %s -redis " .Release.Name | trunc 63 | trimSuffix " -" -}}
3232{{- end -}}
3333
3434{{/*
@@ -80,13 +80,13 @@ Create environment variables used to configure the nextcloud container as well a
8080- name: MYSQL_USER
8181 valueFrom:
8282 secretKeyRef:
83- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
84- key: {{ .Values.externalDatabase.existingSecret.usernameKey | default " db-username " }}
83+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
84+ key: {{ .Values.externalDatabase.existingSecret.usernameKey }}
8585- name: MYSQL_PASSWORD
8686 valueFrom:
8787 secretKeyRef:
88- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
89- key: {{ .Values.externalDatabase.existingSecret.passwordKey | default " db-password " }}
88+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
89+ key: {{ .Values.externalDatabase.existingSecret.passwordKey }}
9090{{- else if .Values.postgresql.enabled }}
9191- name: POSTGRES_HOST
9292 value: {{ template " postgresql.v1.primary.fullname" .Subcharts.postgresql }}
@@ -99,20 +99,20 @@ Create environment variables used to configure the nextcloud container as well a
9999- name: POSTGRES_USER
100100 valueFrom:
101101 secretKeyRef:
102- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
103- key: {{ .Values.externalDatabase.existingSecret.usernameKey | default " db-username " }}
102+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
103+ key: {{ .Values.externalDatabase.existingSecret.usernameKey }}
104104- name: POSTGRES_PASSWORD
105105 valueFrom:
106106 secretKeyRef:
107- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
108- key: {{ .Values.externalDatabase.existingSecret.passwordKey | default " db-password " }}
107+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
108+ key: {{ .Values.externalDatabase.existingSecret.passwordKey }}
109109{{- else }}
110110 {{- if eq .Values.externalDatabase.type " postgresql" }}
111111- name: POSTGRES_HOST
112112 {{- if .Values.externalDatabase.existingSecret.hostKey }}
113113 valueFrom:
114114 secretKeyRef:
115- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
115+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
116116 key: {{ .Values.externalDatabase.existingSecret.hostKey }}
117117 {{- else }}
118118 value: {{ .Values.externalDatabase.host | quote }}
@@ -121,27 +121,27 @@ Create environment variables used to configure the nextcloud container as well a
121121 {{- if .Values.externalDatabase.existingSecret.databaseKey }}
122122 valueFrom:
123123 secretKeyRef:
124- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
124+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
125125 key: {{ .Values.externalDatabase.existingSecret.databaseKey }}
126126 {{- else }}
127127 value: {{ .Values.externalDatabase.database | quote }}
128128 {{- end }}
129129- name: POSTGRES_USER
130130 valueFrom:
131131 secretKeyRef:
132- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
133- key: {{ .Values.externalDatabase.existingSecret.usernameKey | default " db-username " }}
132+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
133+ key: {{ .Values.externalDatabase.existingSecret.usernameKey }}
134134- name: POSTGRES_PASSWORD
135135 valueFrom:
136136 secretKeyRef:
137- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
138- key: {{ .Values.externalDatabase.existingSecret.passwordKey | default " db-password " }}
137+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
138+ key: {{ .Values.externalDatabase.existingSecret.passwordKey }}
139139 {{- else }}
140140- name: MYSQL_HOST
141141 {{- if .Values.externalDatabase.existingSecret.hostKey }}
142142 valueFrom:
143143 secretKeyRef:
144- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
144+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
145145 key: {{ .Values.externalDatabase.existingSecret.hostKey }}
146146 {{- else }}
147147 value: {{ .Values.externalDatabase.host | quote }}
@@ -150,33 +150,33 @@ Create environment variables used to configure the nextcloud container as well a
150150 {{- if .Values.externalDatabase.existingSecret.databaseKey }}
151151 valueFrom:
152152 secretKeyRef:
153- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
153+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
154154 key: {{ .Values.externalDatabase.existingSecret.databaseKey }}
155155 {{- else }}
156156 value: {{ .Values.externalDatabase.database | quote }}
157157 {{- end }}
158158- name: MYSQL_USER
159159 valueFrom:
160160 secretKeyRef:
161- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
162- key: {{ .Values.externalDatabase.existingSecret.usernameKey | default " db-username " }}
161+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
162+ key: {{ .Values.externalDatabase.existingSecret.usernameKey }}
163163- name: MYSQL_PASSWORD
164164 valueFrom:
165165 secretKeyRef:
166- name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -%s " .Release.Name " db " ) }}
167- key: {{ .Values.externalDatabase.existingSecret.passwordKey | default " db-password " }}
166+ name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf " %s -db " .Release.Name ) }}
167+ key: {{ .Values.externalDatabase.existingSecret.passwordKey }}
168168 {{- end }}
169169{{- end }}
170170- name: NEXTCLOUD_ADMIN_USER
171171 valueFrom:
172172 secretKeyRef:
173173 name: {{ .Values.nextcloud.existingSecret.secretName | default (include " nextcloud.fullname" . ) }}
174- key: {{ .Values.nextcloud.existingSecret.usernameKey | default " nextcloud-username " }}
174+ key: {{ .Values.nextcloud.existingSecret.usernameKey }}
175175- name: NEXTCLOUD_ADMIN_PASSWORD
176176 valueFrom:
177177 secretKeyRef:
178178 name: {{ .Values.nextcloud.existingSecret.secretName | default (include " nextcloud.fullname" . ) }}
179- key: {{ .Values.nextcloud.existingSecret.passwordKey | default " nextcloud-password " }}
179+ key: {{ .Values.nextcloud.existingSecret.passwordKey }}
180180- name: NEXTCLOUD_TRUSTED_DOMAINS
181181 value: {{ .Values.nextcloud.host }}
182182{{- if ne (int .Values.nextcloud.update ) 0 }}
@@ -200,17 +200,17 @@ Create environment variables used to configure the nextcloud container as well a
200200 valueFrom:
201201 secretKeyRef:
202202 name: {{ .Values.nextcloud.existingSecret.secretName | default (include " nextcloud.fullname" . ) }}
203- key: {{ .Values.nextcloud.existingSecret.smtpHostKey | default " smtp-host " }}
203+ key: {{ .Values.nextcloud.existingSecret.smtpHostKey }}
204204- name: SMTP_NAME
205205 valueFrom:
206206 secretKeyRef:
207207 name: {{ .Values.nextcloud.existingSecret.secretName | default (include " nextcloud.fullname" . ) }}
208- key: {{ .Values.nextcloud.existingSecret.smtpUsernameKey | default " smtp-username " }}
208+ key: {{ .Values.nextcloud.existingSecret.smtpUsernameKey }}
209209- name: SMTP_PASSWORD
210210 valueFrom:
211211 secretKeyRef:
212212 name: {{ .Values.nextcloud.existingSecret.secretName | default (include " nextcloud.fullname" . ) }}
213- key: {{ .Values.nextcloud.existingSecret.smtpPasswordKey | default " smtp-password " }}
213+ key: {{ .Values.nextcloud.existingSecret.smtpPasswordKey }}
214214{{- end }}
215215{{- if .Values.redis.enabled }}
216216- name: REDIS_HOST
@@ -242,31 +242,31 @@ Create volume mounts for the nextcloud container as well as the cron sidecar con
242242{{- define " nextcloud.volumeMounts" -}}
243243- name: nextcloud-main
244244 mountPath: /var/www/
245- subPath: {{ ternary " root" (printf " %s /%s " .Values.nextcloud.persistence.subPath " root " ) (empty .Values.nextcloud.persistence.subPath ) }}
245+ subPath: {{ ternary " root" (printf " %s /root " .Values.nextcloud.persistence.subPath ) (empty .Values.nextcloud.persistence.subPath ) }}
246246- name: nextcloud-main
247247 mountPath: /var/www/html
248- subPath: {{ ternary " html" (printf " %s /%s " .Values.nextcloud.persistence.subPath " html " ) (empty .Values.nextcloud.persistence.subPath ) }}
248+ subPath: {{ ternary " html" (printf " %s /html " .Values.nextcloud.persistence.subPath ) (empty .Values.nextcloud.persistence.subPath ) }}
249249{{- if and .Values.persistence.nextcloudData.enabled .Values.persistence.enabled }}
250250- name: nextcloud-data
251251 mountPath: {{ .Values.nextcloud.datadir }}
252- subPath: {{ ternary " data" (printf " %s /%s " .Values.persistence.nextcloudData.subPath " data " ) (empty .Values.persistence.nextcloudData.subPath ) }}
252+ subPath: {{ ternary " data" (printf " %s /data " .Values.persistence.nextcloudData.subPath ) (empty .Values.persistence.nextcloudData.subPath ) }}
253253{{- else }}
254254- name: nextcloud-main
255255 mountPath: {{ .Values.nextcloud.datadir }}
256- subPath: {{ ternary " data" (printf " %s /%s " .Values.persistence.subPath " data " ) (empty .Values.persistence.subPath ) }}
256+ subPath: {{ ternary " data" (printf " %s /data " .Values.persistence.subPath ) (empty .Values.persistence.subPath ) }}
257257{{- end }}
258258- name: nextcloud-main
259259 mountPath: /var/www/html /config
260- subPath: {{ ternary " config" (printf " %s /%s " .Values.nextcloud.persistence.subPath " config " ) (empty .Values.nextcloud.persistence.subPath ) }}
260+ subPath: {{ ternary " config" (printf " %s /config " .Values.nextcloud.persistence.subPath ) (empty .Values.nextcloud.persistence.subPath ) }}
261261- name: nextcloud-main
262262 mountPath: /var/www/html /custom_apps
263- subPath: {{ ternary " custom_apps" (printf " %s /%s " .Values.nextcloud.persistence.subPath " custom_apps " ) (empty .Values.nextcloud.persistence.subPath ) }}
263+ subPath: {{ ternary " custom_apps" (printf " %s /custom_apps " .Values.nextcloud.persistence.subPath ) (empty .Values.nextcloud.persistence.subPath ) }}
264264- name: nextcloud-main
265265 mountPath: /var/www/tmp
266- subPath: {{ ternary " tmp" (printf " %s /%s " .Values.nextcloud.persistence.subPath " tmp " ) (empty .Values.nextcloud.persistence.subPath ) }}
266+ subPath: {{ ternary " tmp" (printf " %s /tmp " .Values.nextcloud.persistence.subPath ) (empty .Values.nextcloud.persistence.subPath ) }}
267267- name: nextcloud-main
268268 mountPath: /var/www/html /themes
269- subPath: {{ ternary " themes" (printf " %s /%s " .Values.nextcloud.persistence.subPath " themes " ) (empty .Values.nextcloud.persistence.subPath ) }}
269+ subPath: {{ ternary " themes" (printf " %s /themes " .Values.nextcloud.persistence.subPath ) (empty .Values.nextcloud.persistence.subPath ) }}
270270{{- range $key , $value := .Values.nextcloud.configs }}
271271- name: nextcloud-config
272272 mountPath: /var/www/html /config/{{ $key }}
0 commit comments