Skip to content

Proposal: Secrets Management #2695

Closed
Closed

Description

@RemingtonReackhof

I would like to expand the current proposal, #2196, for supporting secure secrets in Helm which does not support secret versioning.

Proposal

We want to move storage of Helm manifests to Secrets from ConfigMaps. This is favorable because of the future updates coming to k8s secrets storage in the near future (1.7). K8s will support secrets encryption at rest, making the usage of Tiller much more secure for storing versions of secrets than the current situation. In addition, there is talk within the Kubernetes community to expand support for multiple backends to handle secrets, specifically Vault. By staying with k8s secrets, we will be able to take advantage of these features for free.

Inside of the Helm chart templates, we will specify a secret object in which we will populate the values of the secrets by reading in a file called secrets.yaml which will resemble the format and function of values.yaml.

Use Cases

Application Install

When a user installs a chart, have Helm look for a secrets.yaml file and populate any secret values that it defines in the templates where it is referenced. This will behave identically to the use of values.yaml, the caveat being that secrets.yaml should never be committed to your repository.

A new argument will be added to helm install and will act similarly to --values, namely its ability to specify a file from which to get secrets from:

helm install stable/mysql --secrets=secrets.yaml

If no file is specified, then Helm will default to using secrets.yaml.

The manifest of the chart’s version will then be stored as a secret instead of a ConfigMap. This way we will be able to support secret versioning that corresponds to deployment versions.

Upgrading application

With the secrets.yaml file in your chart directory, updating secrets should be just as easy as updating values. Thus, another argument from upgrade would need to be added:

helm upgrade opining-rooster --secrets=secrets.yaml

This will create a new version of the secrets for the application, just as it would create a new deployment.

Rolling back

Helm rollback should take care of this as old charts will point at old secrets

I have already begun working on this proposal for my organization and any feedback is appreciated.

Activity

  1. thomastaylor312 commented on Jul 21, 2017

    @thomastaylor312
    Contributor

    @RemingtonReackhof Thank you for the details on this. One question and a comment. When you said you have begun working on this, did you mean that you began implementing the feature?

    Also, I think the best thing would be to combine this with #2196 so we can keep everything organized (hence why I marked this as a duplicate). Would you have any issue with copying your information here to the original proposal?

  2. RemingtonReackhof commented on Jul 24, 2017

    @RemingtonReackhof
    ContributorAuthor

    @thomastaylor312 Yes I have been working on this for the past few days and am in the process of making a pull request with my changes hopefully later today. I will copy over this proposal to the other issue, thanks!

  3. thomastaylor312 commented on Jul 25, 2017

    @thomastaylor312
    Contributor

    Ok, thank you for doing that! I'll close this and retag the other issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions