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
Refactor third party extensions to make it easy to add own extensions #299
Comments
@iocanel Thinking about what we need to create a client for a third party resource would look like. Kube API details at https://github.com/kubernetes/kubernetes/blob/master/docs/design/extending-api.md. Thinking something like Or how about |
Forget this for a while until third party resources is more stable & usable in Kubernetes & maybe even adopted in OpenShift. |
@jimmidyson We are looking to query thirdparty resources through fabric8 kubernetes client. Looking at the above conversation, it does not look like it is supported currently. Is there any plan to support? If not, could you give any idea of how to implement it? We created a thirdpartyobject called "clusters" in kubernetes and saving all the cluster related information there. From one of the pods I need to retrieve that information programatically. I am using fabric8 kubernetes client for it. I can run the below command and get the response. I need similar using fabric8 client. |
Right now there is no way to do this but I do want to make it possible, just not got time in the near future. I'd happily accept a PR that adds this. My thoughts on how to do it would be to have a method on thirdPartyResources that accepts the required info (e.g. api group, api version, resource name & annotated resource type) & returns a client that can do the basic crud+watch stuff. |
@jimmidyson I would love to contribute and send PR. |
Hey, I currently need this functionality for a project I'm working on (see issue linked above). Is anyone working on this? If not I'll probably take a look soon-ish. |
No-one is looking at this yet - would love a contribution! Look forward to it. |
Any progress on this, or some fork currently working on this ? |
@iyanuobidele Not yet, we only needed simple CRUD operations for our TPRs so we went the evil way and did this: @SneakyThrows
private static OkHttpClient getClient(BaseClient client) {
final Field field = BaseClient.class.getDeclaredField("httpClient");
try {
field.setAccessible(true);
return (OkHttpClient) field.get(client);
} finally {
field.setAccessible(false);
}
} That HTTP client is configured to set correct authentication settings. |
@tazjin you should consider posting a little Q&A for your useful hack up on stackoverflow. I put one up about adding resource reqs, to help fill in some of these dark corners of fabric8 client know-how. Maybe append a short example of using the http client from |
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! |
Third party extensions are used to extend kubernetes. If we make it easy to add third party extensions then this library can be used as a base to build services around kubernetes. We could add helpers to create rest APIs in spring boot/wildfly swarm/etc for the normal rest ops & watch functionality. A good poc for this would be certificate generation via letsencrypt & also Jenkins build integration potentially.
The text was updated successfully, but these errors were encountered: