-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
controllerutil.CreateOrPatch doesn't update not empty Status fields if Spec fields are specified #1392
Comments
Reproducer created. See linked commit |
Do you have the status subresource enabled? If so, you need to specifically use a status writer call. |
@coderanger are you mean |
Turning on that subresource means that all changes to fields under |
@coderanger please pay attention that,
|
If we would like to patch custom resource with some
Spec
fields andStatus
which are not empty, the controllerutil.CreateOrPatch patchesSpec
only fields, but anyStatus
keep unchanged,result
returnsOperationResultUpdatedStatus
which means that bothSpec
andStatus
where updatedThe reason why this happens is that the original
Status
of the object is returned when the" Patch "procedure is exited and, as a result, noStatus
fields are updatedThe text was updated successfully, but these errors were encountered: