-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a SharedInformer API #1384
Comments
@rohanKanojia how hard would be to do this and keep things in sync with the go client (if needed). Any thoughts? |
In the meantime you can see https://github.com/microbean/microbean-kubernetes-controller. |
I think kubernetes-client is a pretty good start. But it seems it lacks the support to CRD. |
it supports CRDs |
Are you talking about this client or official client? |
|
@tony-shi : Hmm, for first draft what kind of util methods would we want to have for sharedinformer api? |
I'm not a K8S pro, but from my perspective and my current use case, I think the most fundamental needs of using k8s is the caching ability. It would be better if we have a java Reflector to automatic list the Resources in a loop, and a DeltaFIFO to de-couple the event producer and event consumer which known as cache. For what i have known, the official client have such utils, but we may need to do some hack when we are using crds, since it it based on code generator. Also it is not support all the features such as add your customized indexer (at least not for now) which available in client-go . In the last, the most important thing is the way to using the official client is not quiet user friendly compared to Fabric8io/kubernetes-client. We have see some quiet friendly packages and scaffolds such as kubebuilder and apiserver-builder, however they seems all based on go language. Adding the caching ability then implement a user friendly Reconciler/Controller pattern would let more java users to build more sophisticated controllers/operators in their familiar ways. So maybe we need to implement it like below:
|
Seriously: have you looked at https://github.com/microbean/microbean-kubernetes-controller? There might be some ideas there. I wrote a blog series on it, too: https://lairdnelson.wordpress.com/2018/01/07/understanding-kubernetes-tools-cache-package-part-0/. Let me just say: it’s not trivial. It is unclear to me whether it should be part of this project given its otherwise narrow focus. |
@ljnelson : Hmm, ok. let me go through your blog today and see whether it makes sense to have it here or not. |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
I think it would be valuable to support such an API as it exists in the go client for writing Operators in Java.
The text was updated successfully, but these errors were encountered: