-
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
Postbuild substitution should substitute when kustomization have no substitution defined #1011
Comments
This is by design, substitutions are opt-in as this operation is expensive for users which have thousands of manifests managed by Flux. You need to specify at least one value, even if you rely on defaults. |
Ok, got it This is a small change for a clearer view of it, as we wouldn't have to check on pointed folder if the variable is set somewhere. It would by default apply all default value |
If we add an enabled filed which defaults to false, then we'll break everyone's clusters, as this will skip the replacements even if there are in place, people will have to edit all their Flux Kustomizations to set enabled true. This type of change can't happen since the Kustomization API is v1 GA. |
It depend of the implementation, postbuild would be implicit false without anything, enforced to true if enabled flag is set and defined to true if people defined any postbuild substitution in there kustomization. This way, people would not break theirs clusters. Something there : https://github.com/fluxcd/kustomize-controller/blob/abdfab3dde0036f1712c3d1b6da90b276bace5a1/internal/controller/kustomization_controller.go#L621C33-L621C33 Which would change to something like the following : if obj.Spec.PostBuild != nil || obj.Spec.PostBuildEnforce { |
That will be very confusing, why would something still apply if it's set to postBuild:
substitute:
enabled: "yes" |
Postbuild substitution is not working when there is no substitution in kustomization :
For example, the following kustomization
Generate me the following ressource
Which result on problem with my release installation
I need to add at least one postBuild argument to make the substitution occurs, even If it is not referred in my ressources
So doing like this :
will work well :
The text was updated successfully, but these errors were encountered: