unexpected error using $patch: delete
#5095
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.
priority/backlog
Higher priority than priority/awaiting-more-evidence.
What happened?
I see the following error I attempt to build my configuration using
kustomize build .
:Essentially I am trying to apply two patches to a CRD resource. The first patch sets adds the preserveUnknownFields field to the spec, setting to false, and the second patch removes the creationTimestamp field.
The interesting part is if I reverse the order of the patches in the kustomization.yaml file, the error no longer occurs and I the results I expect.
What did you expect to happen?
No error occurs and I see the resulting yaml.
How can we reproduce it (as minimally and precisely as possible)?
This can be reproduced with the resources created by this script and executing
kustomize build .
within the newly created kustomize-test directory.Note with the patches order reversed in the kustomization.yaml file, I am able to get the expected results.
Expected output
Actual output
Kustomize version
v5.0.1
Operating system
MacOS
The text was updated successfully, but these errors were encountered: