-
Notifications
You must be signed in to change notification settings - Fork 16.8k
[stable/grafana] Unable to set Grafana Env Var #22903
Comments
i'm also facing the same issue
|
+1 |
i found the solution, actually grafana:
enabled: true
env:
key1: value1
key2: value2 |
FWIW this also happens in the grafana.ini:
database:
type: mysql
name: grafana
ssl_mode: skip-verify
host: mysql-host-goes-here
user: mysql-user-goes-here
password: ${GF_DATABASE_PASSWORD} # This *shouldn't* be required, but adding it doesn't help either
# password: the-secret-password # This works, but we don't want to hard code secrets!
ca_cert_path: "/etc/ssl/certs/ca-certificates.crt"
env:
- name: GF_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: grafana-db
key: secret Grafana should ideally read the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
Hey @andrew-pickin-epi could you add |
experiencing the same issue |
#22903 (comment) is correct. env is expected to be a map: charts/stable/grafana/templates/_pod.tpl Lines 53 to 57 in 8736171
Can someone experiencing this issue please verify that this works? |
This is correct. 30 second test steps: $ kind create cluster
Creating cluster "kind" ...
$ helm install issue-22903 stable/grafana --set env.FOO=bar,env.BAZ=qux
$ kubectl describe deployments.apps issue-22903-grafana Relevant output:
Cleanup: $ kind delete cluster
Deleting cluster "kind" ... |
@scottrigby I can confirm that setting
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
This chart is deprecated: #23662 Though I think this one has been answered 😄 |
Attempting to create an entry fro a Grafana environment variable causes an error:
Results in:
ts=2020-06-22T17:28:02.984996473Z caller=release.go:292 component=release release=prometheus-operator targetNamespace=monitoring resource=monitoring:helmrelease/prometheus-operator helmVersion=v3 error="upgrade failed: template: prometheus-operator/charts/grafana/templates/secret.yaml:1:58: executing \"prometheus-operator/charts/grafana/templates/secret.yaml\" at <.Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE>: can't evaluate field GF_SECURITY_ADMIN_PASSWORD__FILE in type interface {}" action=upgrade
The same is true fro setting by SecretKeyRef, including setting the GF_SECURITY_ADMIN_PASSWORD__FILE variable itself.
The text was updated successfully, but these errors were encountered: