java-operator-sdk
java-operator-sdk copied to clipboard
Generate Kubernetes Resource a.k.a. RBAC
First we should investigate how complex this would be, since we would need a different approach that is now in Quarkus Operator SDK
Personally, I think the SDK should focus on core functionality (and there's still a bit to do there) and leverage other tools fore additional support. Supporting RBAC/OLM generation at the SDK level would be quite an undertaking because none of the infrastructure needed for it exists.
none of the infrastructure needed for it exists
what do you mean by this exactly?
I see couple of options:
- If dependent resources used, it can be generated from that
- We could introduce registering informers with annotations (this would make also managed dependent resources nicer, when sharing event source). And generate basic rback from that.
- We could simply introduce dedicated annotation for this, just like in kubebuilder: https://book.kubebuilder.io/reference/markers/rbac.html
I really like Quarkus, but I think it's not ideal that some very useful features require using Quarkus. In an ideal world (and I know that this completely neglects the required effort for this), rbac-generation would be available as an additional dependency, like the crd-generator. This way, it would not be part of the core-SDK, but as a 'plugin'.
It's also worth noting that some of that functionality could be addressed at the operator-sdk plugin level.