@@ -77,6 +77,12 @@ containers:
77
77
env:
78
78
- name: BITNAMI_DEBUG
79
79
value: { { ternary " true" " false" .Values.image.debug | quote } }
80
+ { {- if .Values.usePasswordFiles } }
81
+ - name: TOMCAT_USERNAME_FILE
82
+ value: { { printf " /opt/bitnami/tomcat/secrets/%s" (include " tomcat.adminUsernameKey" .) } }
83
+ - name: TOMCAT_PASSWORD_FILE
84
+ value: { { printf " /opt/bitnami/tomcat/secrets/%s" (include " tomcat.adminPasswordKey" .) } }
85
+ { {- else } }
80
86
- name: TOMCAT_USERNAME
81
87
valueFrom:
82
88
secretKeyRef:
@@ -87,6 +93,7 @@ containers:
87
93
secretKeyRef:
88
94
name: { { include " tomcat.secretName" . } }
89
95
key: { { include " tomcat.adminPasswordKey" . } }
96
+ { {- end } }
90
97
- name: TOMCAT_ALLOW_REMOTE_MANAGEMENT
91
98
value: { { .Values.tomcatAllowRemoteManagement | quote } }
92
99
- name: TOMCAT_HTTP_PORT_NUMBER
@@ -167,6 +174,10 @@ containers:
167
174
- name: empty-dir
168
175
mountPath: /tmp
169
176
subPath: tmp-dir
177
+ { {- if .Values.usePasswordFiles } }
178
+ - name: tomcat-secrets
179
+ mountPath: /opt/bitnami/tomcat/secrets
180
+ { {- end } }
170
181
{ {- if .Values.extraVolumeMounts } }
171
182
{ {- include " common.tplvalues.render" (dict " value" .Values.extraVolumeMounts " context" $) | nindent 6 } }
172
183
{ {- end } }
@@ -209,6 +220,13 @@ containers:
209
220
volumes:
210
221
- name: empty-dir
211
222
emptyDir: { }
223
+ { {- if .Values.usePasswordFiles } }
224
+ - name: tomcat-secrets
225
+ projected:
226
+ sources:
227
+ - secret:
228
+ name: { { include " tomcat.secretName" . } }
229
+ { {- end } }
212
230
{ {- if (eq .Values.deployment.type " deployment" ) } }
213
231
{ {- if and .Values.persistence.enabled } }
214
232
- name: data
0 commit comments