crossplane-contrib / provider-helm

Crossplane Helm Provider
Apache License 2.0
111 stars 65 forks source link

Consume kube client package from provider-kubernetes & new identity modes for auth #223

Closed turkenh closed 5 months ago

turkenh commented 6 months ago

Description of your changes

This PR consumes the exported kube client package in https://github.com/crossplane-contrib/provider-kubernetes/pull/251, by dropping the duplicate implementation here. This also introduces support for authenticating with the following identities:

I have:

How has this code been tested

See the steps in, adapted for provider-helm https://github.com/crossplane-contrib/provider-kubernetes/pull/251

lsviben commented 6 months ago

Do we want to move that kube client package somewhere generic? Not saying now, but maybe some future step? Although not sure if there are other providers that would use it except helm/kubernetes, so maybe not worth it.

turkenh commented 6 months ago

Do we want to move that kube client package somewhere generic? Not saying now, but maybe some future step? Although not sure if there are other providers that would use it except helm/kubernetes, so maybe not worth it.

We have been duplicating the code here and there since we couldn't find a good home for this code till today. We could move it to crossplane-runtime but that would mean introducing dependencies like azure kubelogin or upbound-up-sdk etc. What I am doing here is better than duplicating the code, which became hard to maintain as the number of auth methods increased while not being perfect. I am not aware of any other providers needing this, so probably already good enough for now.