Skip to content

Commit

Permalink
cluster: fix # cannot be included in grafana password (#2468)
Browse files Browse the repository at this point in the history
* fix # cannot be included in grafana password

* fix

Signed-off-by: xhe <[email protected]>

---------

Signed-off-by: xhe <[email protected]>
Co-authored-by: xhe <[email protected]>
  • Loading branch information
kaaaaaaang and xhebox authored Nov 8, 2024
1 parent 1a929f1 commit 235c85e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion embed/templates/config/grafana.ini.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ check_for_updates = true
admin_user = {{.Username}}

# default admin password, can be changed before first start of grafana, or in profile settings
admin_password = {{.Password}}
admin_password = `{{.Password}}`

# used for signing
;secret_key = SW2YcwTIb9zpOOhoPsMm
Expand Down
8 changes: 4 additions & 4 deletions pkg/cluster/spec/grafana_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestMergeAdditionalGrafanaConf(t *testing.T) {
;enabled = false
;host = localhost:25
;user =
;password =
password = ` + "`1#2`" + `
;cert_file =
;key_file =
;skip_verify = false
Expand Down Expand Up @@ -113,12 +113,12 @@ level = info

expected := `# ################################### SMTP / Emailing ##########################
[smtp]
enabled = true
; enabled = false
; host = localhost:25
; user =
; password =
password = ` + "`1#2`" + `
enabled = true
; cert_file =
; key_file =
; skip_verify = false
Expand Down

0 comments on commit 235c85e

Please sign in to comment.