@@ -214,11 +214,16 @@ spec:
214
214
value : {{ ternary "yes" "no" .Values.sonarqubeSkipInstall | quote }}
215
215
- name : SONARQUBE_USERNAME
216
216
value : {{ .Values.sonarqubeUsername | quote }}
217
+ {{- if .Values.usePasswordFiles }}
218
+ - name : SONARQUBE_PASSWORD_FILE
219
+ value : " /opt/bitnami/sonarqube/secrets/sonarqube-password"
220
+ {{- else }}
217
221
- name : SONARQUBE_PASSWORD
218
222
valueFrom :
219
223
secretKeyRef :
220
224
name : {{ include "sonarqube.secretName" . }}
221
225
key : sonarqube-password
226
+ {{- end }}
222
227
- name : SONARQUBE_EMAIL
223
228
value : {{ .Values.sonarqubeEmail | quote }}
224
229
{{- if or .Values.plugins.install .Values.caCerts.enabled}}
@@ -311,11 +316,16 @@ spec:
311
316
value : {{ include "sonarqube.database.name" . | quote }}
312
317
- name : SONARQUBE_DATABASE_USER
313
318
value : {{ include "sonarqube.database.username" . | quote }}
319
+ {{- if .Values.usePasswordFiles }}
320
+ - name : SONARQUBE_DATABASE_PASSWORD_FILE
321
+ value : " /opt/bitnami/sonarqube/secrets/password"
322
+ {{- else }}
314
323
- name : SONARQUBE_DATABASE_PASSWORD
315
324
valueFrom :
316
325
secretKeyRef :
317
326
name : {{ include "sonarqube.database.secretName" . }}
318
327
key : password
328
+ {{- end }}
319
329
{{- if .Values.smtpHost }}
320
330
- name : SONARQUBE_SMTP_HOST
321
331
value : {{ .Values.smtpHost | quote }}
@@ -329,12 +339,17 @@ spec:
329
339
value : {{ .Values.smtpUser | quote }}
330
340
{{- end }}
331
341
{{- if or .Values.smtpPassword .Values.smtpExistingSecret }}
342
+ {{- if .Values.usePasswordFiles }}
343
+ - name : SONARQUBE_SMTP_PASSWORD_FILE
344
+ value : " /opt/bitnami/sonarqube/secrets/smtp-password"
345
+ {{- else }}
332
346
- name : SONARQUBE_SMTP_PASSWORD
333
347
valueFrom :
334
348
secretKeyRef :
335
349
name : {{ include "sonarqube.smtpSecretName" . }}
336
350
key : smtp-password
337
351
{{- end }}
352
+ {{- end }}
338
353
{{- if .Values.smtpProtocol }}
339
354
- name : SONARQUBE_SMTP_PROTOCOL
340
355
value : {{ .Values.smtpProtocol | quote }}
@@ -407,8 +422,12 @@ spec:
407
422
- name : empty-dir
408
423
mountPath : /tmp
409
424
subPath : tmp-dir
410
- - mountPath : /bitnami/sonarqube
411
- name : sonarqube
425
+ - name : sonarqube
426
+ mountPath : /bitnami/sonarqube
427
+ {{- if .Values.usePasswordFiles }}
428
+ - name : sonarqube-secrets
429
+ mountPath : /opt/bitnami/sonarqube/secrets
430
+ {{- end }}
412
431
{{- if or .Values.plugins.install .Values.caCerts.enabled }}
413
432
- name : provisioning
414
433
mountPath : {{ .Values.provisioningFolder }}
@@ -468,6 +487,19 @@ spec:
468
487
volumes :
469
488
- name : empty-dir
470
489
emptyDir : {}
490
+ {{- if .Values.usePasswordFiles }}
491
+ - name : sonarqube-secrets
492
+ projected :
493
+ sources :
494
+ - secret :
495
+ name : {{ include "sonarqube.secretName" . }}
496
+ - secret :
497
+ name : {{ include "sonarqube.database.secretName" . }}
498
+ {{- if or .Values.smtpPassword .Values.smtpExistingSecret }}
499
+ - secret :
500
+ name : {{ include "sonarqube.smtpSecretName" . }}
501
+ {{- end }}
502
+ {{- end }}
471
503
{{- if or .Values.plugins.install .Values.caCerts.enabled }}
472
504
- name : provisioning
473
505
emptyDir : {}
0 commit comments