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

Enable decryption of secrets generated by Kustomize components #1283

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

vlasov-y
Copy link
Contributor

@vlasov-y vlasov-y commented Nov 8, 2024

Resolves #1235

@@ -697,9 +697,13 @@ func recurseKustomizationFiles(root, path string, visit visitKustomization, visi
return err
}

// Components may contain resources as well, ...
// ...so we have to process both .resources and .components values
resources := append(kus.Resources, kus.Components...)
Copy link
Member

Choose a reason for hiding this comment

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

Please write a test for decrypting an env file found in a component, this should be added to https://github.com/fluxcd/kustomize-controller/blob/main/internal/controller/kustomization_decryptor_test.go

Copy link
Contributor Author

@vlasov-y vlasov-y Nov 10, 2024

Choose a reason for hiding this comment

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

Hi @stefanprodan
Thanks, I have updated the code and added the test.

@stefanprodan stefanprodan changed the title Fixed decryption of resources in Components. Enable decryption of secrets generated by Kustomize components Nov 12, 2024
@stefanprodan stefanprodan added the area/sops SOPS related issues and pull requests label Nov 12, 2024
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @vlasov-y 🏅

@stefanprodan stefanprodan merged commit 29080cb into fluxcd:main Nov 12, 2024
7 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flux decrypts SOPS for resources that come from Kustomization, but not from Component
2 participants