-
Notifications
You must be signed in to change notification settings - Fork 181
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
kustomize build failed: filter cannot create or delete objects #308
Comments
I think this is caused by https://github.com/fluxcd/kustomize-controller/blob/main/controllers/kustomization_generator.go#L335-L356 as we have disabled |
Tested this with |
Allow Resoure ID Changes? We definitively also use Kustomization features like namespace override and nameSuffix and the likes. I didn't see an issue there yet, though we also still have 0.5.3 kustomization controller in that cluster as well. |
same problem on kustomization controller version 0.12.0 |
Please give this a try and comment on the PR if it fixes the bug: #343 |
Describe the bug
Using a strategic merge yaml patch in kustomize build with delete option
$patch: delete
now causes akustomize build failed: filter cannot create or delete objects
exception in flux. Locally this still works with kustomize build, and it did work in older versions of flux onmodified.To Reproduce
Create a base folder with some kubernetes resources, reference it in a kustomization.yaml, alongside a strategic merge patch containing one resource to be omitted:
kustomization.yaml
patch.yaml
And point to the folder containing the kustomization.yaml in a Kustomization Resource looking something like this:
Expected behavior
kustomize build doesn't contain the element, even though it is present in the bases.
Additional context
The text was updated successfully, but these errors were encountered: