Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion internal/decryptor/decryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.


// Recurse over other resources in Kustomization,
// repeating the above logic per item
for _, res := range kus.Resources {
for _, res := range resources {
if !filepath.IsAbs(res) {
res = filepath.Join(path, res)
}
Expand Down