-
Notifications
You must be signed in to change notification settings - Fork 182
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
Documentation unclear: Flux Kustomization patches do not apply over nested kustomizations #1000
Comments
IDEA: Recursive patches for
Could validate it's able to do the recursion on the target resource (if it's supported by the target API) ... Best to my understanding (not much) the native kustomize patches are recursive. |
I really like this idea, I am also trying to do nested patches, here is my example below:
DISCLAIMER, ignore indentation, our company doesn't allow pasting |
I would also really stand to benefit from a recursive patching feature. We have a similar nested kustomization tree:
We're following the multi-tenancy model from https://github.com/fluxcd/flux2-multi-tenancy and https://github.com/controlplaneio-fluxcd/d1-fleet which requires patching
But...this only applies to the first layer/depth down. Any HelmRelease or Kustomization resources the next level down or deeper won't be patched. To get those we have to expand the patch as follows and would have to continue doing so for each layer of depth:
|
We use following kustomizations structure in our projects:
kustomize.config.k8s.io/v1beta1 -> kustomize.toolkit.fluxcd.io/v1 -> kustomize.toolkit.fluxcd.io/v1 -> helmrelease
In my setup I have a patch on all top-level flux kustomizations with a patch for all helm releases - full kustomization file.
The patch is not delivered to the HR. This makes sense as when I do flux trace on that HR, it's only dependend on it's parent kustomization.
Altough documentation mention writing patches at top-level Flux kustomization as a feature used in bulk shard assignment:
Image is a screenshot of the code from the documentation
I think that the documentation is wrong. I have a very minimal example where it's not working: https://gitlab.com/ondrej.kolin/flux-helmrelease-patch-test
The text was updated successfully, but these errors were encountered: