Skip to content

Commit 31eb86e

Browse files
committed
chore(monitor): add random user
1 parent b328200 commit 31eb86e

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

charts/monitor/templates/_helpers.tmpl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ env:
2828
key: token
2929
- name: "BIND_PORT"
3030
value: "3000"
31+
{{- if not (.Values.grafana.environment.DEFAULT_USER) }}
3132
- name: "DEFAULT_USER"
32-
value: {{.Values.grafana.user}}
33+
value: {{ randAlphaNum 32 | b64enc }}
34+
{{- end}}
35+
{{- if not (.Values.grafana.environment.DEFAULT_USER_PASSWORD) }}
3336
- name: "DEFAULT_USER_PASSWORD"
34-
value: {{.Values.grafana.password}}
37+
value: {{ randAlphaNum 32 | b64enc }}
38+
{{- end}}
3539
- name: "KUBERNETES_CLUSTER_DOMAIN"
3640
value: {{.Values.global.clusterDomain}}
3741
{{- range $key, $value := .Values.grafana.environment }}

charts/monitor/values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ grafana:
1313
# can be specified as key-value pairs under environment
1414
# this is usually a non required setting.
1515
environment:
16-
BASIC_AUTH: false
1716
ALLOW_SIGN_UP: false
18-
DEFAULT_USER: admin
19-
DEFAULT_USER_PASSWORD: admin
2017

2118
telegraf:
2219
imageOrg: "drycc"

0 commit comments

Comments
 (0)