-
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
Support a high-level merge behavior in kustomize #1292
Comments
take into account
|
generationbehavior defines three behaviors for generators
That logic is in ResMap.AbsorbAll, but is not invoked when reading the So how about a new field that offer all flexibility:
e.g.
The existing
This way future behaviors can be identified, e.g. |
Allowing the user to specify a conflict resolution strategy for resources is a nice addition. To get the discussion started, we have the following comments:
and also allow this format:
The default behavior is currently
|
Minor bump for this issue. Is someone working on @monopole's suggestion? I'm asking because I see that there's a related PR of @jbrette that is currently blocked, citing this issue as an alternative. In the meantime, there was another request by a different user for roughly the same functionality (#1372). Since this is a recurring request, I think it would help if we initially decide on what approach to follow, now that the discussion regarding this issue is still warm. |
Hi @monopole, this is a heads-up to keep this issue active. Is there any progress on the implementation of this feature or any feedback on the format proposed by @apyrgio in #1292 (comment) ? Plus, a kind reminder for #1297, which describes our case and currently fails. It would be nice to make it work as expected and serve as the baseline example for the higher level merge functionality. |
The issue still open. been doing other things - and also hoping for more evidence of interest. This has lots of overlap with patch behavior, as any resource file is also a valid patch. We cannot precisely do as #1292 (comment) suggests. The kustomization file is a Go struct for standard marshalling/unmarshalling; the We can do a new field though, e.g. The other work here, besides the relatively easy work in changing how kustomize treats the files in a |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The
resources:
field in a kustomization file specifies a list of files and / or other kustomizations to be processed in akustomize build
.These artifacts are read or built, resulting in a list of resources, which are supposed to be added to the set of resources kustomize is processing.
If an incoming resource matches the Id (where Id is a tuple of namespace, group, version, kind, name) of an Id already known to kustomize, the build fails with an error. This invariant maintains the Id is a primary key used for all sorts of purposes.
We could however, allow a merge on Id collision instead of an error (at this stage of the build process). Or we could make merge the default behavior, and have some mode that enables errors on Id collisions.
Some uses cases prefer an error, some prefer a merge.
There are low level cases where this is already allowed, e.g. Secret and ConfigMap generators have an option that allows merging or replacing on Id collision, rather than failing.
The text was updated successfully, but these errors were encountered: