Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Grafana could not set secret values in a safe way #3739

Closed
SharpEdgeMarshall opened this issue Feb 15, 2018 · 3 comments
Closed

Grafana could not set secret values in a safe way #3739

SharpEdgeMarshall opened this issue Feb 15, 2018 · 3 comments

Comments

@SharpEdgeMarshall
Copy link
Contributor

Is this a request for help?: No


Is this a BUG REPORT or FEATURE REQUEST? (choose one): Feature

Version of Helm and Kubernetes: Any

Which chart: Grafana

What happened: Actually the chart allows only to set secret values by inserting them in the grafana.ini value (that will go in the ConfigMap) or setting them in extraEnv value (that will go in cleartext as env vars).

What you expected to happen: I Expect to be able to configure secret values using Kubernetes Secrets

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:

@SharpEdgeMarshall SharpEdgeMarshall changed the title Grafana could not set secret env vars Grafana could not set secret values in a safe way Feb 15, 2018
@ebabani
Copy link
Contributor

ebabani commented Mar 9, 2018

This is fixed by #3965

You can set env variables from secrets with extraEnv now.

  extraEnv:
  - name: GF_AUTH_GITHUB_CLIENT_ID
    valueFrom:
      secretKeyRef:
        name: grafana-secret
        key: GF_AUTH_GITHUB_CLIENT_ID

@andybug
Copy link
Contributor

andybug commented Apr 26, 2018

This doesn't work anymore. The change to env from extraEnv only allows you to reference key/values from the values file. There's no way to do a secretKeyRef.

{{- range $key, $value := .Values.env }}
            - name: "{{ $key }}"
              value: "{{ $value }}"
{{- end }}

@ebabani
Copy link
Contributor

ebabani commented Apr 26, 2018

@andybug Looks like it was reverted in #4713

Feel free to open a new issue or send the PR again. I won't have time to do it anytime soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants