-
Notifications
You must be signed in to change notification settings - Fork 188
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
kustomization.yaml with no resources fails #391
Comments
Good issue~ label //good first issue |
I’m not for changing this behavior, if we really want to set an empty kustomization to ready then we need to wait a couple of months for GA, as this is a major break change in behavior. |
This is actually a bug. If I have a kustomization that has resources, then I remove them resulting in an empty kustomization, then instead of the controller reconcile deleting the resources, it gives the "apply failed: error: no objects passed to apply". If an object has been removed, it should be deleted by flux. So while this error behavior may make sense for a kustomization that is first set up (basically saying "hey! why did you set up an empty kustomization / folder?") it is not correct after a kustomization has created resources then had them removed. |
I agree it's a bug, especially since |
I wouldn't object to the |
I am also affected by this. At the least, we can fix the "bug" such that the prune is correctly honored. Right now, when all the resources are truncated ( |
Given this kustomization file in a directory pointed to by a Flux Kustomization:
The Kustomization fails with this error:
which makes sense because there are no resources to apply but I wonder whether a check should be added to kustomize-controller to see whether the set of resources is actually empty and immediately go into ready state. Happy to discuss.
The text was updated successfully, but these errors were encountered: