Skip to content

Commit c215211

Browse files
robalbjkroepkeQuentinBisson
authored
[kube-prometheus-stack] Fix insecure default password in grafana (#5679)
Co-authored-by: Jan-Otto Kröpke <[email protected]> Co-authored-by: Quentin Bisson <[email protected]>
1 parent 0766716 commit c215211

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

charts/kube-prometheus-stack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ name: kube-prometheus-stack
3131
sources:
3232
- https://github.com/prometheus-community/helm-charts
3333
- https://github.com/prometheus-operator/kube-prometheus
34-
version: 78.5.0
34+
version: 79.0.0
3535
# renovate: github=prometheus-operator/prometheus-operator
3636
appVersion: v0.86.1
3737
kubeVersion: ">=1.25.0-0"

charts/kube-prometheus-stack/UPGRADE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Upgrade
22

3+
## From 78.x to 79.x
4+
5+
This version removes the default password for the grafana administrator, that in previous versions was set as `prom-operator`.
6+
For users that do not explicitly set an admin password, the value will now be generated randomly. Grafana offers detailed documentation on [how to read the default password](https://grafana.com/docs/grafana/latest/setup-grafana/installation/helm/#access-grafana) from the autogenerated kubernetes secret.
7+
38
## From 77.x to 78.x
49

510
This version upgrades Prometheus-Operator to v0.86.0

charts/kube-prometheus-stack/templates/NOTES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ Access Grafana local instance:
1010
export POD_NAME=$(kubectl --namespace {{ template "kube-prometheus-stack.namespace" . }} get pod -l "app.kubernetes.io/name={{ default "grafana" .Values.grafana.name }},app.kubernetes.io/instance={{ $.Release.Name }}" -oname)
1111
kubectl --namespace {{ template "kube-prometheus-stack.namespace" . }} port-forward $POD_NAME 3000
1212

13+
Get your grafana admin user password by running:
14+
15+
kubectl get secret --namespace {{ .Values.grafana.namespaceOverride | default (include "kube-prometheus-stack.namespace" .) }} -l app.kubernetes.io/component=admin-secret -o jsonpath="{.items[0].data.{{ .Values.grafana.admin.passwordKey | default "admin-password" }}}" | base64 --decode ; echo
16+
17+
1318
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.

charts/kube-prometheus-stack/values.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,8 +1297,16 @@ grafana:
12971297
##
12981298
defaultDashboardsInterval: 1m
12991299

1300+
# Administrator credentials when not using an existing secret (see below)
13001301
adminUser: admin
1301-
adminPassword: prom-operator
1302+
# adminPassword: strongpassword
1303+
1304+
# Use an existing secret for the admin user.
1305+
admin:
1306+
## Name of the secret. Can be templated.
1307+
existingSecret: ""
1308+
userKey: admin-user
1309+
passwordKey: admin-password
13021310

13031311
rbac:
13041312
## If true, Grafana PSPs will be created

0 commit comments

Comments
 (0)