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

Using secrets for Datadog chart #62

Open
mazzy89 opened this issue May 20, 2017 · 4 comments
Open

Using secrets for Datadog chart #62

mazzy89 opened this issue May 20, 2017 · 4 comments

Comments

@mazzy89
Copy link

mazzy89 commented May 20, 2017

This is my state file for Datadog Chart:

name: datadog
release:
  chart: stable/datadog:0.3.0
  version: 0.3.0
configuration:
  # Default values for datadog.
  image:
    repository: datadog/docker-dd-agent
    tag: latest
    pullPolicy: IfNotPresent

  datadog:
    ## You'll need to set this to your Datadog API key before the agent will run.
    ## ref: https://app.datadoghq.com/account/settings#agent/kubernetes
    ##
    apiKey: ""

    ## Set logging verbosity.
    ## ref: https://github.com/DataDog/docker-dd-agent#environment-variables
    ##
    logLevel: WARNING

  resources:
    requests:
      cpu: 100m
      memory: 128Mi
    limits:
      cpu: 256m
      memory: 512Mi
secrets:
  - api-key

and this is how run landscraper

API_KEY=343242342342  landscaper apply --dir charts --dry-run --namespace default

Unfortunately the secret API_KEY is not applied. Any idea?

@philipbjorge
Copy link
Contributor

philipbjorge commented Jun 1, 2017

So it seems like landscaper's method of handling secrets is not typically compatible with publicly available charts. Public charts create and reference their own secrets.

It seems to me like landscaper would benefit from an ability to load secrets into values.
@rollulus -- Do you have any thoughts on this?

In the short term, I think our team is going to template in secrets into the values section during CI.
https://github.com/nextrevision/sempl

@rollulus
Copy link
Collaborator

rollulus commented Jun 1, 2017

AFAIK there is not a standardized common way to deal with secrets in Charts.

What the Datadog chart is doing is creating a secret object and plugging in a value.

What landscaper does for its secrets is create a secret object, plug secrets from environment variables into it. A chart that uses this does not create a secret object itself from values, but rely on that externally provided secret object.

And yes, these two approaches overlap and are incompatible with each other.

But say that one would put secrets in values, as the datadog chart expects, then the secret can be read with a simple helm get, making it not so secret anymore, right? Or am I missing something?

@philipbjorge
Copy link
Contributor

philipbjorge commented Jun 1, 2017

@rollulus -- Yes, it will appear via helm get as a user supplied value.

helm get sysdig-monitoring
REVISION: 1
RELEASED: Wed May 31 18:45:29 2017
CHART: sysdig-0.2.0
USER-SUPPLIED VALUES:
sysdig:
  AccessKey: <My Key>

This seems to be the standard approach for all the public helm charts.
I'll create an issue today against the charts repo to understand their rationale.

Related issue: helm/helm#2196

Your approach definitely is more secure.
Does it handle helm release rollbacks properly?

Using something like sempl seems like a decent workaround for our team in the meantime, rather than forking public charts.

@rollulus
Copy link
Collaborator

rollulus commented Jun 2, 2017

Interesting. To be honest, I have no clue about helm release rollbacks at all, sorry.

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