Kustomize considers apiVersion a part of object ID, but it is not #5843
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What happened?
I think the ID of a object is the tuple (apiGroup/kind/metadata.name/metadata.namespace). The apiVersion is just the current schema version used to represent the object on disk or in transit.
If someone has the same apiGroup/kind/metadata.name/metadata.namespace twice, kustomize will rightfully complain. It does not complain now if the apiVersion differs.
What did you expect to happen?
Kustomize build should fail
How can we reproduce it (as minimally and precisely as possible)?
Expected output
Error: accumulating resources: accumulation err='merging resources from 'b.yaml': may not add resource with an already registered id: AuthorizationPolicy.v1.security.istio.io/a.[noNs]':
Actual output
Kustomize version
master as of 2025-01-15
Operating system
Linux
The text was updated successfully, but these errors were encountered: