<p>I am new to the Kubernetes and especially using helm. I installed the charts and it works fine with default values. I want to the add smtp server setting in the values.yml file for the chart. I am confused on how to inject the values while installing the chart. This is the chart that I am using <a href="https://github.com/helm/charts/tree/master/stable/prometheus-operator" rel="nofollow noreferrer">https://github.com/helm/charts/tree/master/stable/prometheus-operator</a>.
After installing the helm chart with default values I see that there is a deployment called prometheus-operator-grafana which has values GF_SECURITY_ADMIN_USER and GF_SECURITY_ADMIN_PASSWORD but I am not sure where these values are coming from.
Help with how these values work and how to inject them would be appreciated.</p>

Anshul Tripathi
<p>The interaction between parent and child chart values is summarize very well in this SO answer: <a href="https://stackoverflow.com/questions/49580938/helm-overriding-chart-and-values-yaml-from-a-base-template-chart#49581516">helm overriding Chart and Values yaml from a base template chart</a></p>

<p>There are two separate grafana chart mechanisms that control such a thing: <a href="https://github.com/helm/charts/blob/master/stable/grafana/values.yaml#L130-L131" rel="nofollow noreferrer"><code>adminUser</code> and <code>adminPassword</code></a> or <a href="https://github.com/helm/charts/blob/master/stable/grafana/values.yaml#L134-L137" rel="nofollow noreferrer"><code>admin.existingSecret</code> along with <code>admin.userKey</code> and <code>admin.passwordkey</code></a></p>

<p>Thus, <code>helm ... --set grafana.adminUser=ninja --set grafana.adminPassword=hunter2</code> will do what you want. <a href="https://github.com/helm/charts/tree/master/stable/prometheus-operator#grafana" rel="nofollow noreferrer">The fine manual</a> even says they are using grafana as a subchart, and documents that exact setting as the first value underneath the <code>grafana.enabled</code> setting. Feel free to file an issue with the helm chart to spend the extra characters and document the <code>grafana.adminUser</code> setting, too</p>
