prometheus-community / helm-charts

Prometheus community Helm charts
Apache License 2.0
5.06k stars 5.01k forks source link

[kube-prometheus-stack] unable to update the grafana.ini via values.yaml #4061

Closed zrankinOCEUS closed 9 months ago

zrankinOCEUS commented 10 months ago

Describe the bug a clear and concise description of what the bug is.

This is an issue reopening the following issue:

https://github.com/prometheus-community/helm-charts/issues/1337

I have followed a similar structure where within the "grafana:" label I added a grafana.ini section and auth.generic_oauth within the ini.

`grafana: grafana.ini: auth.generic_oath:

` ### What's your helm version? 3 ### What's your kubectl version? latest ### Which chart? kube-prometheus-stack ### What's the chart version? latest ### What happened? Pulled the charts, added the grafana.ini tag and everything beneath it. Deployed charts within rancher, ssh'd into the worker that hosted the grafana instance, and saw that the grafana.ini file was still the default one. ### What you expected to happen? able to see grafana.ini updated ### How to reproduce it? add a grafana.ini tag within grafana and you will not see any custom configuration added. ### Enter the changed values of values.yaml? see description ### Enter the command that you execute and failing/misfunctioning. cat /grafana.ini and saw the default configuration ### Anything else we need to know? _No response_
zeritti commented 10 months ago

Checked and found the config map RELEASE-grafana getting rendered, created and mounted correctly with the defined contents. The resulting file /etc/grafana/grafana.ini in the grafana container is correct including custom modifications. So far, I cannot confirm the described behaviour.

Used a trivial customization (grafana chart 7.0.11 as in KPS 55.0.0):

grafana:
  grafana.ini:
    auth.generic_oauth:
      enabled: false
      name: OAuth
    analytics:
      check_for_updates: false
zrankinOCEUS commented 10 months ago

Checked and found the config map RELEASE-grafana getting rendered, created and mounted correctly with the defined contents. The resulting file /etc/grafana/grafana.ini in the grafana container is correct including custom modifications. So far, I cannot confirm the described behaviour.

Used a trivial customization (grafana chart 7.0.11 as in KPS 55.0.0):

grafana:
  grafana.ini:
    auth.generic_oauth:
      enabled: false
      name: OAuth
    analytics:
      check_for_updates: false

Ah, you are correct, this was an instance of PEBKAC. Thank you for your time and support.
My mistake, for any other noobies that might stumble upon this, was nesting grafana.ini within data as such:

grafana:  
    data:  
        grafana.ini:  
            auth.generic_oauth:
                key:value
zeritti commented 9 months ago

Closing as completed.