Skip to content

Commit 1b85a12

Browse files
migruiz4Bitnami Containers
and
Bitnami Containers
authored
[bitnami/ghost] Set usePasswordFiles=true by default (#32346)
* [bitnami/ghost] Set `usePasswordFiles=true` by default Signed-off-by: Miguel Ruiz <[email protected]> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <[email protected]> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <[email protected]> * Implement fixes Signed-off-by: Miguel Ruiz <[email protected]> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <[email protected]> --------- Signed-off-by: Miguel Ruiz <[email protected]> Signed-off-by: Bitnami Containers <[email protected]> Co-authored-by: Bitnami Containers <[email protected]>
1 parent 7e2e48d commit 1b85a12

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

bitnami/ghost/CHANGELOG.md

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

3-
## 22.1.19 (2025-03-05)
3+
## 22.2.0 (2025-03-13)
44

5-
* [bitnami/ghost] Release 22.1.19 ([#32327](https://github.com/bitnami/charts/pull/32327))
5+
* [bitnami/ghost] Set `usePasswordFiles=true` by default ([#32346](https://github.com/bitnami/charts/pull/32346))
6+
7+
## <small>22.1.19 (2025-03-05)</small>
8+
9+
* [bitnami/ghost] Release 22.1.19 (#32327) ([c968511](https://github.com/bitnami/charts/commit/c968511b976340a5ee89cedca19f7f034888e65c)), closes [#32327](https://github.com/bitnami/charts/issues/32327)
610

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

bitnami/ghost/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ maintainers:
4141
name: ghost
4242
sources:
4343
- https://github.com/bitnami/charts/tree/main/bitnami/ghost
44-
version: 22.1.19
44+
version: 22.2.0

bitnami/ghost/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ See the [Parameters](#parameters) section to configure the PVC or to disable per
231231
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
232232
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
233233
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
234+
| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
234235
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
235236
| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
236237
| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |

bitnami/ghost/templates/deployment.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,16 @@ spec:
156156
value: {{ include "ghost.databaseName" . | quote }}
157157
- name: GHOST_DATABASE_USER
158158
value: {{ include "ghost.databaseUser" . | quote }}
159+
{{- if .Values.usePasswordFiles }}
160+
- name: GHOST_DATABASE_PASSWORD_FILE
161+
value: "/opt/bitnami/ghost/secrets/mysql-password"
162+
{{- else }}
159163
- name: GHOST_DATABASE_PASSWORD
160164
valueFrom:
161165
secretKeyRef:
162166
name: {{ include "ghost.databaseSecretName" . }}
163167
key: mysql-password
168+
{{- end -}}
164169
{{- if (and (not .Values.mysql.enabled) .Values.externalDatabase.ssl) }}
165170
- name: GHOST_DATABASE_ENABLE_SSL
166171
value: {{ .Values.externalDatabase.ssl | quote }}
@@ -175,11 +180,16 @@ spec:
175180
value: {{ ternary .Values.containerPorts.https .Values.containerPorts.http .Values.ghostEnableHttps | quote }}
176181
- name: GHOST_USERNAME
177182
value: {{ .Values.ghostUsername | quote }}
183+
{{- if .Values.usePasswordFiles }}
184+
- name: GHOST_PASSWORD_FILE
185+
value: {{ printf "/opt/bitnami/ghost/secrets/%s" (include "common.secrets.key" (dict "existingSecret" .Values.existingSecret "key" "ghost-password")) }}
186+
{{- else }}
178187
- name: GHOST_PASSWORD
179188
valueFrom:
180189
secretKeyRef:
181190
name: {{ include "common.secrets.name" (dict "existingSecret" .Values.existingSecret "context" $) }}
182191
key: {{ include "common.secrets.key" (dict "existingSecret" .Values.existingSecret "key" "ghost-password") }}
192+
{{- end }}
183193
- name: GHOST_EMAIL
184194
value: {{ .Values.ghostEmail | quote }}
185195
- name: GHOST_BLOG_TITLE
@@ -205,12 +215,17 @@ spec:
205215
value: {{ .Values.smtpUser | quote }}
206216
{{- end }}
207217
{{- if .Values.smtpPassword }}
218+
{{- if .Values.usePasswordFiles }}
219+
- name: GHOST_SMTP_PASSWORD_FILE
220+
value: {{ printf "/opt/bitnami/ghost/secrets/%s" (include "common.secrets.key" (dict "existingSecret" .Values.existingSecret "key" "smtp-password")) }}
221+
{{- else }}
208222
- name: GHOST_SMTP_PASSWORD
209223
valueFrom:
210224
secretKeyRef:
211225
name: {{ include "common.secrets.name" (dict "existingSecret" .Values.existingSecret "context" $) }}
212226
key: {{ include "common.secrets.key" (dict "existingSecret" .Values.existingSecret "key" "smtp-password") }}
213227
{{- end }}
228+
{{- end }}
214229
{{- if .Values.smtpService }}
215230
- name: GHOST_SMTP_SERVICE
216231
value: {{ .Values.smtpService | quote }}
@@ -312,6 +327,10 @@ spec:
312327
subPath: tmp-dir
313328
- name: ghost-data
314329
mountPath: /bitnami/ghost
330+
{{- if and .Values.usePasswordFiles }}
331+
- name: ghost-secrets
332+
mountPath: /opt/bitnami/ghost/secrets
333+
{{- end }}
315334
{{- if .Values.persistence.subPath }}
316335
subPath: {{ .Values.persistence.subPath }}
317336
{{- end }}
@@ -324,6 +343,19 @@ spec:
324343
volumes:
325344
- name: empty-dir
326345
emptyDir: {}
346+
{{- if and .Values.usePasswordFiles }}
347+
- name: ghost-secrets
348+
projected:
349+
sources:
350+
- secret:
351+
name: {{ include "ghost.databaseSecretName" . }}
352+
- secret:
353+
name: {{ include "common.secrets.name" (dict "existingSecret" .Values.existingSecret "context" $) }}
354+
{{- if .Values.smtpPassword }}
355+
- secret:
356+
name: {{ include "common.secrets.name" (dict "existingSecret" .Values.existingSecret "context" $) }}
357+
{{- end }}
358+
{{- end }}
327359
- name: ghost-data
328360
{{- if .Values.persistence.enabled }}
329361
persistentVolumeClaim:

bitnami/ghost/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ clusterDomain: cluster.local
5555
## @param extraDeploy Array of extra objects to deploy with the release
5656
##
5757
extraDeploy: []
58+
## @param usePasswordFiles Mount credentials as files instead of using environment variables
59+
##
60+
usePasswordFiles: true
5861
## Enable diagnostic mode in the deployment
5962
##
6063
diagnosticMode:

0 commit comments

Comments
 (0)