-
Notifications
You must be signed in to change notification settings - Fork 229
Description
In case the workflow you implement requires to update the resource itself and the status sub-resource at the same time it cannot be handled in a single pass of the createOrUpdateResource()
method.
To be able to handle it currently you need to:
-
Disable
generationAwareEventProcessing
:@Controller(crdName = "some.awesome.crd.com", generationAwareEventProcessing = false)
-
Handle update to the resource and finish with
return UpdateControl.updateCustomResource(res)
. A new event will be published and another pass of thecreateOrUpdateResource()
will be triggered. -
Handle update to the status sub-resource and finish with
return UpdateControl.updateStatusSubResource(res)
Ideally, we should just update the resource itself and the status sub-resource in a single UpdateControl.updateCustomResource(res)
call. In other words - if there are status updates, these should be applied as well on the updated resource automatically.