Skip to content

Commit d31ec15

Browse files
[bitnami/wordpress] Set usePasswordFiles=true by default (#32770)
* [bitnami/wordpress] Set `usePasswordFiles=true` by default Signed-off-by: Miguel Ruiz <[email protected]> * Update CHANGELOG.md Signed-off-by: Bitnami Bot <[email protected]> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Bot <[email protected]> * Fix typo Signed-off-by: Miguel Ruiz <[email protected]> * Update CHANGELOG.md Signed-off-by: Bitnami Bot <[email protected]> --------- Signed-off-by: Miguel Ruiz <[email protected]> Signed-off-by: Bitnami Bot <[email protected]> Co-authored-by: Bitnami Bot <[email protected]>
1 parent c62075b commit d31ec15

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

bitnami/wordpress/CHANGELOG.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Changelog
22

3-
## 24.1.18 (2025-03-06)
3+
## 24.2.0 (2025-04-04)
44

5-
* [bitnami/wordpress] fix network policy when metrics enabled ([#32338](https://github.com/bitnami/charts/pull/32338))
5+
* [bitnami/wordpress] Set `usePasswordFiles=true` by default ([#32770](https://github.com/bitnami/charts/pull/32770))
6+
7+
## <small>24.1.18 (2025-03-07)</small>
8+
9+
* [bitnami/wordpress] fix network policy when metrics enabled (#32338) ([ddcee74](https://github.com/bitnami/charts/commit/ddcee74411ab886e7ff1831e248392cf6dfed668)), closes [#32338](https://github.com/bitnami/charts/issues/32338)
610

711
## <small>24.1.17 (2025-03-06)</small>
812

bitnami/wordpress/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ maintainers:
4545
name: wordpress
4646
sources:
4747
- https://github.com/bitnami/charts/tree/main/bitnami/wordpress
48-
version: 24.1.18
48+
version: 24.2.0

bitnami/wordpress/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ As an alternative, use one of the preset configurations for pod affinity, pod an
294294
| `commonAnnotations` | Annotations to add to all deployed resources | `{}` |
295295
| `clusterDomain` | Kubernetes Cluster Domain | `cluster.local` |
296296
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
297+
| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
297298
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
298299
| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
299300
| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |

bitnami/wordpress/templates/deployment.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -198,18 +198,28 @@ spec:
198198
value: {{ include "wordpress.databaseName" . | quote }}
199199
- name: WORDPRESS_DATABASE_USER
200200
value: {{ include "wordpress.databaseUser" . | quote }}
201+
{{- if .Values.usePasswordFiles }}
202+
- name: WORDPRESS_DATABASE_PASSWORD_FILE
203+
value: "/opt/bitnami/wordpress/secrets/mariadb-password"
204+
{{- else }}
201205
- name: WORDPRESS_DATABASE_PASSWORD
202206
valueFrom:
203207
secretKeyRef:
204208
name: {{ include "wordpress.databaseSecretName" . }}
205209
key: mariadb-password
210+
{{- end }}
206211
- name: WORDPRESS_USERNAME
207212
value: {{ .Values.wordpressUsername | quote }}
213+
{{- if .Values.usePasswordFiles }}
214+
- name: WORDPRESS_PASSWORD_FILE
215+
value: "/opt/bitnami/wordpress/secrets/wordpress-password"
216+
{{- else }}
208217
- name: WORDPRESS_PASSWORD
209218
valueFrom:
210219
secretKeyRef:
211220
name: {{ include "wordpress.secretName" . }}
212221
key: wordpress-password
222+
{{- end }}
213223
- name: WORDPRESS_EMAIL
214224
value: {{ .Values.wordpressEmail | quote }}
215225
- name: WORDPRESS_FIRST_NAME
@@ -260,12 +270,17 @@ spec:
260270
value: {{ .Values.smtpUser | quote }}
261271
{{- end }}
262272
{{- if or .Values.smtpPassword .Values.smtpExistingSecret }}
273+
{{- if .Values.usePasswordFiles }}
274+
- name: SMTP_PASSWORD_FILE
275+
value: "/opt/bitnami/wordpress/secrets/smtp-password"
276+
{{- else }}
263277
- name: SMTP_PASSWORD
264278
valueFrom:
265279
secretKeyRef:
266280
name: {{ include "wordpress.smtpSecretName" . }}
267281
key: smtp-password
268282
{{- end }}
283+
{{- end }}
269284
{{- if .Values.smtpProtocol }}
270285
- name: SMTP_PROTOCOL
271286
value: {{ .Values.smtpProtocol | quote }}
@@ -355,6 +370,10 @@ spec:
355370
- mountPath: /bitnami/wordpress
356371
name: wordpress-data
357372
subPath: wordpress
373+
{{- if .Values.usePasswordFiles }}
374+
- name: wordpress-secrets
375+
mountPath: /opt/bitnami/wordpress/secrets
376+
{{- end }}
358377
{{- if or .Values.wordpressConfiguration .Values.existingWordPressConfigurationSecret }}
359378
- name: wordpress-config
360379
mountPath: /opt/bitnami/wordpress/wp-config.php
@@ -434,6 +453,19 @@ spec:
434453
volumes:
435454
- name: empty-dir
436455
emptyDir: {}
456+
{{- if .Values.usePasswordFiles }}
457+
- name: wordpress-secrets
458+
projected:
459+
sources:
460+
- secret:
461+
name: {{ include "wordpress.secretName" . }}
462+
- secret:
463+
name: {{ include "wordpress.databaseSecretName" . }}
464+
{{- if or .Values.smtpPassword .Values.smtpExistingSecret }}
465+
- secret:
466+
name: {{ include "wordpress.smtpSecretName" . }}
467+
{{- end }}
468+
{{- end }}
437469
{{- if or .Values.wordpressConfiguration .Values.existingWordPressConfigurationSecret }}
438470
- name: wordpress-config
439471
secret:

bitnami/wordpress/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ clusterDomain: cluster.local
5757
## @param extraDeploy Array of extra objects to deploy with the release
5858
##
5959
extraDeploy: []
60+
## @param usePasswordFiles Mount credentials as files instead of using environment variables
61+
##
62+
usePasswordFiles: true
6063
## Enable diagnostic mode in the deployment
6164
##
6265
diagnosticMode:

0 commit comments

Comments
 (0)