Skip to content

Commit fcc1fc1

Browse files
migruiz4Bitnami Containers
and
Bitnami Containers
authored
[bitnami/grafana] Set usePasswordFiles=true by default (#32348)
* [bitnami/grafana] 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]> * Bump chart version Signed-off-by: Miguel Ruiz <[email protected]> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <[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 07c6216 commit fcc1fc1

File tree

5 files changed

+39
-3
lines changed

5 files changed

+39
-3
lines changed

bitnami/grafana/CHANGELOG.md

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

3-
## 11.5.1 (2025-03-13)
3+
## 11.6.0 (2025-03-13)
44

5-
* [bitnami/grafana] Release 11.5.1 ([#32437](https://github.com/bitnami/charts/pull/32437))
5+
* [bitnami/grafana] Set `usePasswordFiles=true` by default ([#32348](https://github.com/bitnami/charts/pull/32348))
6+
7+
## <small>11.5.1 (2025-03-13)</small>
8+
9+
* [bitnami/*] Add tanzuCategory annotation (#32409) ([a8fba5c](https://github.com/bitnami/charts/commit/a8fba5cb01f6f4464ca7f69c50b0fbe97d837a95)), closes [#32409](https://github.com/bitnami/charts/issues/32409)
10+
* [bitnami/grafana] Release 11.5.1 (#32437) ([602e678](https://github.com/bitnami/charts/commit/602e678b446cac381a72500fafbcd4c640acfb1c)), closes [#32437](https://github.com/bitnami/charts/issues/32437)
611

712
## 11.5.0 (2025-03-12)
813

bitnami/grafana/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ maintainers:
3232
name: grafana
3333
sources:
3434
- https://github.com/bitnami/charts/tree/main/bitnami/grafana
35-
version: 11.5.1
35+
version: 11.6.0

bitnami/grafana/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ See the [Parameters](#parameters) section to configure the PVC or to disable per
413413
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
414414
| `commonLabels` | Labels to add to all deployed objects | `{}` |
415415
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
416+
| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
416417

417418
### Grafana parameters
418419

bitnami/grafana/templates/deployment.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,16 @@ spec:
137137
optional: {{ include "common.tplvalues.render" (dict "value" .Values.grafana.extraEnvVarsSecretOptional "context" $) }}
138138
{{- end }}
139139
env:
140+
{{- if .Values.usePasswordFiles }}
141+
- name: GF_SECURITY_ADMIN_PASSWORD_FILE
142+
value: {{ printf "/opt/bitnami/grafana/secrets/%s" (include "grafana.adminSecretPasswordKey" .) }}
143+
{{- else }}
140144
- name: GF_SECURITY_ADMIN_PASSWORD
141145
valueFrom:
142146
secretKeyRef:
143147
name: {{ include "grafana.adminSecretName" . }}
144148
key: {{ include "grafana.adminSecretPasswordKey" . }}
149+
{{- end }}
145150
{{- if .Values.smtp.enabled }}
146151
- name: GF_SMTP_ENABLED
147152
value: "true"
@@ -161,6 +166,12 @@ spec:
161166
- name: GF_SMTP_SKIP_VERIFY
162167
value: "{{ .Values.smtp.skipVerify }}"
163168
{{- end }}
169+
{{- if .Values.usePasswordFiles }}
170+
- name: GF_SMTP_USER_FILE
171+
value: {{ printf "/opt/bitnami/grafana/secrets/%s" (include "grafana.smtpSecretUserKey" .) }}
172+
- name: GF_SMTP_PASSWORD_FILE
173+
value: {{ printf "/opt/bitnami/grafana/secrets/%s" (include "grafana.smtpSecretPasswordKey" .) }}
174+
{{- else }}
164175
- name: GF_SMTP_USER
165176
valueFrom:
166177
secretKeyRef:
@@ -172,6 +183,7 @@ spec:
172183
name: {{ include "grafana.smtpSecretName" . }}
173184
key: {{ include "grafana.smtpSecretPasswordKey" . }}
174185
{{- end }}
186+
{{- end }}
175187
{{- if .Values.grafana.extraEnvVars }}
176188
{{- include "common.tplvalues.render" (dict "value" .Values.grafana.extraEnvVars "context" $) | nindent 12 }}
177189
{{- end }}
@@ -188,6 +200,10 @@ spec:
188200
- name: empty-dir
189201
mountPath: /bitnami/grafana
190202
subPath: app-volume-dir
203+
{{- if and .Values.usePasswordFiles }}
204+
- name: grafana-secrets
205+
mountPath: /opt/bitnami/grafana/secrets
206+
{{- end }}
191207
{{- if .Values.config.useGrafanaIniFile }}
192208
- name: grafana-ini
193209
mountPath: /opt/bitnami/grafana/conf/grafana.ini
@@ -299,6 +315,17 @@ spec:
299315
volumes:
300316
- name: empty-dir
301317
emptyDir: {}
318+
{{- if and .Values.usePasswordFiles }}
319+
- name: grafana-secrets
320+
projected:
321+
sources:
322+
- secret:
323+
name: {{ include "grafana.adminSecretName" . }}
324+
{{- if .Values.smtp.enabled }}
325+
- secret:
326+
name: {{ include "grafana.smtpSecretName" . }}
327+
{{- end }}
328+
{{- end }}
302329
- name: data
303330
{{- if .Values.persistence.enabled }}
304331
persistentVolumeClaim:

bitnami/grafana/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ commonLabels: {}
5757
## @param commonAnnotations Annotations to add to all deployed objects
5858
##
5959
commonAnnotations: {}
60+
## @param usePasswordFiles Mount credentials as files instead of using environment variables
61+
##
62+
usePasswordFiles: true
6063
## @section Grafana parameters
6164

6265
## Bitnami Grafana image version

0 commit comments

Comments
 (0)