containers / podman-desktop

Podman Desktop - A graphical tool for developing on containers and Kubernetes
https://podman-desktop.io
Apache License 2.0
4.31k stars 274 forks source link

Use equivalent of `kubectl auth can-i` on Kube contexts #7629

Open feloy opened 2 weeks ago

feloy commented 2 weeks ago

Is your enhancement related to a problem? Please describe

The current implementation for checking the connectivity to Kubernetes contexts uses informers. This solution has some drawbacks:

Describe the solution you'd like

I propose to query the SelfSubjectRulesReview resource in the cluster to check the connectivity to the cluster, before to start informers. The advantages are:

Describe alternatives you've considered

No response

Additional context

No response

feloy commented 2 weeks ago

cc @deboer-tim @cdrage

cdrage commented 2 weeks ago

šŸ‘ Would really help improvement. I'm assuming this works fine with OpenShift too?

feloy commented 2 weeks ago

šŸ‘ Would really help improvement. I'm assuming this works fine with OpenShift too?

Yes, I have made a quick PoC, and we have access to the information on OpenShift Sandbox

jeffmaury commented 2 weeks ago

kubernetes client used groups to deal with resource manipulations but noticed we were processing Routes even on non OpenShift clusters so how do this relates ? Does it includes non standard CRDs ?