1

I want to ask how to add Grafana admin password configuration in helm chart.

I have followed this link github

From the link, I put below values in (values come from above github page)

 [security]
# default admin user, created on startup
admin_user = admin
# default admin password, can be changed before first start of grafana,  or in profile settings
;admin_password = bullebolle
# used for signing
;secret_key = SW2YcwTIb9zpOOhoPsMm
# Auto-login remember days
;login_remember_days = 7
;cookie_username = grafana_user
;cookie_remember_name = grafana_remember

in grafana-config.yml. After this I have re-applied that with kubectl apply -f grafana-config.yml but the password didn't change.

If I follow this link stackoverflow - How to reset grafana's admin password (installed by helm) I can change admin password but data is lost after restart deployment.

How can I solve this problem ?

Thanks for answering

Orkun
  • 492
  • 4
  • 16
  • I hope you dont show your real user and password here. – The Fool Mar 31 '22 at 06:50
  • Ofcourse it's not :D I get it from github :D Its from this link https://github.com/nilsmagnus/k8s-grafana/blob/master/grafana-config.yml – Orkun Mar 31 '22 at 07:32
  • Refer this [document](https://github.com/helm/charts/issues/7891) to set the admin password secret changes on helm upgrade – Goli Nikitha Apr 13 '22 at 08:31

1 Answers1

0

You need to manually trigger a new deployment after you update the config map for the pod to get the new values.

Or you can use this feature https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments to automate it.

Johan Nordlinder
  • 1,672
  • 1
  • 13
  • 17