-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Kustomizations introduced by components are not applied to adjacent generated resources #5141
Comments
/triage accepted I think that components should be applied to both resources declared under /assign @koba1t |
We also discovered that |
Oh, there's already a PR so maybe not :) |
I found the question that this issue spawns of "Why are Kustomize intentionally processes As pointed out by this issue, there are difficulties with the current processing order. I imagine potential complaints with processing
I don't know which processing order will make the most sense, but I guess we can experiment moving around |
Fundamentally, I think the question on sequence relates to one's vision on what constitutes the base configuration. My inference is that the original designers did not see generated and transformed resources as part of the base, so that's why I think that any sequence choice is going to have confusing aspects. The key is to ensure the choice is documented and explained, so that users can understand what to expect. This change is a breaking one for our kustomizations. For example, we have configmaps defined in a component that are merged in a generator in the top-level kustomization.yaml. We will have to invert that pattern (or adjust in some other way) in order to move to a newer version of kustomize. |
Thank you @ephesused for sharing your perspective, it is very helpful to hear how users are using components. I agree that the sequence will be confusing in any case, and that we need to document it better. I see That said, we do have someone working on #4402, which will make the ordering of |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [kubernetes-sigs/kustomize](https://togithub.com/kubernetes-sigs/kustomize) | minor | `v5.0.3` -> `v5.1.0` | | [zellij-org/zellij](https://togithub.com/zellij-org/zellij) | patch | `v0.37.0` -> `v0.37.1` | --- ### Release Notes <details> <summary>kubernetes-sigs/kustomize</summary> ### [`v5.1.0`](https://togithub.com/kubernetes-sigs/kustomize/releases/tag/kustomize/v5.1.0) [Compare Source](https://togithub.com/kubernetes-sigs/kustomize/compare/kustomize/v5.0.3...kustomize/v5.1.0) ##### Highlights Components are now applied after generators: [https://github.com/kubernetes-sigs/kustomize/pull/5170](https://togithub.com/kubernetes-sigs/kustomize/pull/5170) We made this change cautiously as we want to avoid user friction when updating kustomize; however we felt that it is a bug that resources from `resources` and resources from generators are treated differently. Given that components is currently an alpha feature, we felt that now was the time to adjust if ever. We are currently working on on [https://github.com/kubernetes-sigs/kustomize/issues/4402](https://togithub.com/kubernetes-sigs/kustomize/issues/4402), which will make the ordering of `resources`, `components`, and `generators` customizable in the kustomization file. Please use that issue for tracking if you are blocked from upgrading kustomize for this reason, and we hope to have it available soon. See [https://github.com/kubernetes-sigs/kustomize/issues/5141](https://togithub.com/kubernetes-sigs/kustomize/issues/5141) for more detailed discussion. ##### Bug fixes: [#​5030](https://togithub.com/kubernetes-sigs/kustomize/issues/5030): `kustomize edit` will return an error if there is no matching path [#​5170](https://togithub.com/kubernetes-sigs/kustomize/issues/5170): components are now applied after generators ##### Dependency updates [#​5186](https://togithub.com/kubernetes-sigs/kustomize/issues/5186): Update gnostic dependency with gnostic-models [#​5187](https://togithub.com/kubernetes-sigs/kustomize/issues/5187): Bump to go 1.20 [#​5212](https://togithub.com/kubernetes-sigs/kustomize/issues/5212): pin to kyaml v0.14.3 [#​5213](https://togithub.com/kubernetes-sigs/kustomize/issues/5213): pin to cmd/config v0.11.3 [#​5214](https://togithub.com/kubernetes-sigs/kustomize/issues/5214): pin to api 0.14.0 </details> <details> <summary>zellij-org/zellij</summary> ### [`v0.37.1`](https://togithub.com/zellij-org/zellij/releases/tag/v0.37.1) [Compare Source](https://togithub.com/zellij-org/zellij/compare/v0.37.0...v0.37.1) ##### RELEASE IN PROGRESS Thank you for your patience! </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/scottames/dots). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
What happened?
See reproduction where generated resource is not modified by an adjacent component whereas the non-generated adjacent resource is.
What did you expect to happen?
That the generated resource would behave the same as the non-generated resources.
How can we reproduce it (as minimally and precisely as possible)?
kustomization.yaml:
resource.yaml:
component/kustomization.yaml:
Expected output
Actual output
Kustomize version
v5.0.1, also {Version:kustomize/v4.5.5 GitCommit:daa3e5e2c2d3a4b8c94021a7384bfb06734bcd26 BuildDate:2022-05-20T20:21:22Z GoOs:darwin GoArch:amd64}
Operating system
MacOS
The text was updated successfully, but these errors were encountered: