devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Support helm secrets plugin

Open igoooor opened this issue 5 years ago • 5 comments

Is your feature request related to a problem?
No

Which solution do you suggest?
Support for the plugin helm secrets https://github.com/futuresimple/helm-secrets helm secrets is a wrapper for the helm commands, allowing to use encrypted values files, using sops, and decrypting the files on the fly.

/kind feature

igoooor avatar Feb 13 '20 12:02 igoooor

@igoooor thanks for opening this issue! We usually try to avoid implementing support for specific plugins, however I definitively see the use case and think we could add a more general solution for use cases like this:

deployments:
- name: mydeployment
   helm:
     chart: ...
     cli:
       enabled: true
       path: path/to/my/helm (optional)
       upgradeArgs: ...
       deleteArgs: ...
       templateArgs: ...

This would allow you to use any helm wrapper and custom flags for deployment, purge and template. What do you think about this?

FabianKramm avatar Feb 14 '20 09:02 FabianKramm

That sounds really great! A workaround I've used meanwhile is to use a hook and manually decrypt the secret file, and use the decrypted file as valuesFiles: []

igoooor avatar Feb 14 '20 09:02 igoooor

@igoooor yes that is also possible! I will add this to the todo list!

FabianKramm avatar Feb 14 '20 09:02 FabianKramm

using hooks works perfectly for deployment but there is no hook for render so if I run devspace render while secrets are not decrypted yet - it shows warning and falls back to default values for secrets.

Found another workaround by using upgradeArgs/templateArgs:

  helm:
    chart:
      name: ./chart
    valuesFiles:
      - chart/values.yaml
    upgradeArgs:
      - --values
      - secrets://chart/secrets.yaml
    templateArgs:
      - --values
      - secrets://chart/secrets.yaml

would be nice to have first-class support for helm secrets as for example in skaffold. perhaps something like:

helm:
  valuesFiles:
  - chart/values.yaml
  secretsFiles:
  - chart/secrets.yaml

tbondarchuk avatar Sep 05 '21 11:09 tbondarchuk

Thanks @aliusmiles for your secrets:// workaround, I've been chasing this issue all night trying to figure this out! Agreed though, it would be great to get better support for helm-secrets!

verenion avatar Dec 08 '21 00:12 verenion