Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the kubeconfig secrets compatible with SOPS #400

Merged
merged 1 commit into from
Aug 5, 2021

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Aug 4, 2021

Add values.yaml to the supported kubeconfig secret key names in order for SOPS to correctly detect the storage format based on the file extension.

Fix: #399

TODO: This must be ported to helm-controller before the next flux release.

Add `values.yaml` to the supported kubeconfig secret key names in order for SOPS to correctly detect the storage format based on the file extension.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan added enhancement New feature or request area/sops SOPS related issues and pull requests labels Aug 4, 2021
if !ok {
var kubeConfig []byte
for k, _ := range secret.Data {
if k == "value" || k == "value.yaml" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given these are parts of a contract (they are defined explicitly in the spec), I would make them more "official" part of the programmatic API by e.g. making them constants.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must move to fluxcd/pkg/runtime/client so I would leave it here as it is since this function will no longer be in each controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sops SOPS related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SOPS encrypted secretGenerator fails to decrypt yaml if key name does not include a file extension
2 participants