Closed
Description
The method ResourceController.createOrUpdateResource
should return an instance of UpdateControl
to instruct the operator about if and what to update. The UpdateControl
ckass, provides the following helpers:
<T extends CustomResource> UpdateControl<T> updateCustomResource(T cr)
<T extends CustomResource> UpdateControl<T> updateStatusSubResource(T cr)
<T extends CustomResource> UpdateControl<T> updateCustomResourceAndStatus(T cr)
Wonder if this could be reduced to an enum
instead, like:
enum UpdateControl {
UpdateResource,
UpdateStatus,
UpdateResourceAndStatus
}
The ResourceController
signature then would become:
UpdateControl createOrUpdateResource(...)
The calling method then would use the custom resource instance which in such case should be the resource received as parameter of the createOrUpdateResource
method.
Does that make any sense ?