hall / kubenix

Kubernetes management with Nix
https://kubenix.org/
MIT License
319 stars 30 forks source link

vals cannot read secrets from sops when using gpg #66

Closed luizribeiro closed 5 months ago

luizribeiro commented 5 months ago

I've been getting these errors when running kubenix to apply my changes:

Error getting data key: 0 successful groups required, got 0

I've spent some time debugging today and I found that https://github.com/hall/kubenix/commit/c00c78b9826aeea2bb62acf276fcd4f499237798 caused us to override PATH with just the dependencies for the kubenix script (vals and kubectl). However, this breaks decrypting secrets from sops with gpg, as vals cannot use gpg from the PATH anymore.

I believe the best solution here is to suffix the PATH variable instead of setting it, so I'll put a PR for that.