Closed
Description
Given that the ResourceController must implement io.javaoperatorsdk.operator.api.ResourceController<R extends CustomResource>
, IMO getting the customResourceClass
in io.javaoperatorsdk.operator.api.Controller
is unnecessary and may cause inconsistencies, e.g. developer set a different class in annotation comparing with the one defined in Controller class definition.
I would suggest to remove the mentioned attribute from annotation and take the class type from the actual controller object.
e.g.
@Controller(
generationAwareEventProcessing = false,
crdName = TestCustomResourceController.CRD_NAME,
**customResourceClass = TestCustomResource.class**)
public class TestCustomResourceController implements ResourceController<TestCustomResource>, TestExecutionInfoProvider {
will be come
@Controller(
generationAwareEventProcessing = false,
crdName = TestCustomResourceController.CRD_NAME)
public class TestCustomResourceController implements ResourceController<TestCustomResource>, TestExecutionInfoProvider {
Metadata
Metadata
Assignees
Labels
No labels