File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed
Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 11name : drupal
22apiVersion : v2
33type : application
4- version : 2.0.0-beta6
4+ version : 2.0.0-beta7
55appVersion : 6.1.4
66description : Helm Chart for deploying an enterprise-grade Drupal environment.
77keywords :
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ Create common environment variables for Drupal
7878- name: EXTERNAL_PASSWORD
7979 valueFrom:
8080 secretKeyRef:
81- name: { { template " drupal.fullname" . } }
81+ name: { { default ( include " drupal.fullname" .) .Values.drupal.existingSecret } }
8282 key: databasePassword
8383{ {- else if and .Values.mysql.enabled } }
8484- name: MYSQL_PASSWORD
@@ -101,10 +101,15 @@ Create common environment variables for Drupal
101101 key: default-password
102102{ {- end } }
103103{ {- if not .Values.drupal.usePasswordFiles } }
104+ - name: DRUPAL_ADMIN
105+ valueFrom:
106+ secretKeyRef:
107+ name: { { default (include " drupal.fullname" .) .Values.drupal.existingSecret } }
108+ key: username
104109- name: DRUPAL_ADMIN_PASSWORD
105110 valueFrom:
106111 secretKeyRef:
107- name: { { include " drupal.fullname" . } }
112+ name: { { default ( include " drupal.fullname" .) .Values.drupal.existingSecret } }
108113 key: password
109114{ {- end } }
110115{ {- end -} }
Original file line number Diff line number Diff line change 1- {{- if not .Values.drupal.usePasswordFiles }}
2- {{- $name := include "drupal.fullname" . -}}
3- {{- $existing := lookup "v1" "Secret" .Release.Namespace $name -}}
1+ {{- if and (not .Values.drupal.usePasswordFiles) (not .Values.drupal.existingSecret) }}
42apiVersion : v1
53kind : Secret
64metadata :
7- name : {{ $name }}
5+ name : {{ include "drupal.fullname" . }}
86 labels :
97 app.kubernetes.io/name : {{ include "drupal.name" . }}
108 helm.sh/chart : {{ include "drupal.chart" . }}
119 app.kubernetes.io/instance : {{ .Release.Name }}
1210 app.kubernetes.io/managed-by : {{ .Release.Service }}
1311type : Opaque
1412data :
15- username : {{ if and $existing (hasKey $existing.data "username") }}{{ index $existing.data "username" | quote }}{{ else if . Values.drupal.username }}{{ .Values.drupal.username | b64enc | quote }}{{ else }}{{ "admin" | b64enc | quote }}{{ end }}
16- password : {{ if and $existing (hasKey $existing.data "password") }}{{ index $existing.data "password" | quote }}{{ else if . Values.drupal.password }}{{ .Values.drupal.password | b64enc | quote }}{{ else }}{{ randAlphaNum 10 | b64enc | quote }}{{ end }}
13+ username : {{ default "admin" . Values.drupal.username | b64enc | quote }}
14+ password : {{ default (randAlphaNum 10) . Values.drupal.password | b64enc | quote }}
1715 {{- if .Values.external.enabled }}
18- databasePassword : {{ if and $existing (hasKey $existing.data "databasePassword") }}{{ index $existing.data "databasePassword" | quote }}{{ else }}{{ . Values.external.password | b64enc | quote }}{{ end }}
16+ databasePassword : {{ . Values.external.password | b64enc | quote }}
1917 {{- end }}
2018{{- end }}
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ drupal:
6262
6363 # # User of the application
6464 # #
65+ existingSecret : " "
6566 username : admin
6667
6768 # # Application password
You can’t perform that action at this time.
0 commit comments