Skip to content

Patching failed with inconsistencies #908

Answered by mledoze
sbrunner asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, I ran into the same error. From my understanding, Kopf is trying to patch the status field of your custom resource, but the patch is rejected by the Kubernetes API.

When updating a custom resource, Kubernetes will prune all fields that are not declared in the CustomResourceDefinition.

See the note here https://kopf.readthedocs.io/en/stable/walkthrough/updates/#updating-the-objects

make sure you have set the x-kubernetes-preserve-unknown-fields: true field in your CRD on either the entire object or just the .status field

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sbrunner
Comment options

Answer selected by sbrunner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants