Description
Bug Report
I wanted to patch both status and resource returning UpdateControl.patchResourceAndStatus(resource) from the reconcile.
My tests became flaky with an occasional the object has been modified; please apply your changes to the latest version and try again..
What did you do?
Use UpdateControl.patchResourceAndStatus(resource) to get both, status and resource patched.
What did you expect to see?
Patch should be sued for status und resource
What did you see instead? Under which circumstances?
This is either a bug or the method-name implies a wrong operation being used.
In ReconciliationDeispatcher.reconcileExecution updateResource is used, which ignores the provided patch-flag.
So only the status gets patched, not the resource.
Environment
All k8s-versions.
Possible Solution
If the intention of the method is to only patch the status and to use put for the resource it should be reflected in the method name.
If not then I guess I found a bug ;)