From 443c96a788baeb6fd76c57b30b568c6f3acad46e Mon Sep 17 00:00:00 2001 From: Yuriy Vlasov Date: Fri, 8 Nov 2024 14:25:58 +0200 Subject: [PATCH] Fixed decryption in components. Signed-off-by: Yuriy --- internal/decryptor/decryptor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/decryptor/decryptor.go b/internal/decryptor/decryptor.go index 48f7823f..cd24c06c 100644 --- a/internal/decryptor/decryptor.go +++ b/internal/decryptor/decryptor.go @@ -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...) + // 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) }