kubernetes-client / java

Official Java client library for kubernetes
http://kubernetes.io/
Apache License 2.0
3.55k stars 1.89k forks source link

SharedInformerFactory, but for proto #3141

Closed codefromthecrypt closed 2 months ago

codefromthecrypt commented 7 months ago

It seems that the SharedInformerFactory is designed for the openapi client, with the CallGenerator returning an okhttp3.Call.

ProtoClient doesn't seem designed in way to hook in the same way, at least at the moment, as it doesn't return okhttp3.Call. Rather, it invokes a request synchronously which wouldn't work with watches.

I'm not sure would be natural for it to return io.kubernetes.client.openapi.ApiException from generate, but that could be fine since ProtoClient depends on the openapi generated ApiClient anyway.

I think it could be something we can rejig to make it happen, by changing SharedInformerFactory or extracting some base class from it. This wouldn't unhook the gson dependency as still ApiClient pins it, but it could be possible to still use the proto infrastructure and drive informers more efficiently.

brendandburns commented 7 months ago

Happy to have work done here. As expressed elsewhere, ProtoClient was hacked together a long time ago (before SharedInformerFactory, fwiw) and then has mostly lain dormant.

k8s-triage-robot commented 4 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

codefromthecrypt commented 4 months ago

fyi I'm not currently working on anything that requires this, we can keep it open or close and re-open when someone similar has the requirement

k8s-triage-robot commented 3 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 2 months ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-client/java/issues/3141#issuecomment-2257279273): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.