-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
mergeFromPatch
does not consider the zero value as part of the patch
#703
Comments
/kind bug Do you want zero to be a valid value? Or is that considered unset? |
A valid value. |
is this a structural schema or a non-structural one? I wonder if |
yeh I wanted to do that unfortunately this is non-structural yet |
hmm... I don't think there's a good way for |
Thanks for the ideas Solly, I think we can close this. I'll go by using a pointer for now and would use |
⚠️ Switch default project version to v2
A CRD has a status sub-resource with a required integer field:
status.IntField
When trying to patch the status for the first time with
status.IntField=0
the diff given bypatch.Data(obj)
does not consider the zero value as part of the patch to be applied and the request viamergeFromPatch
client.Status().Patch
fails withis invalid: status.IntField: Required value
Is the only way to go to make
IntField
a pointer?The text was updated successfully, but these errors were encountered: