Drop obsolete client-go auth plugins (#5806)

* Drop obsolete client-go auth plugins

The OpenStack plugin is no longer available, even in version 0.24.4 of
client-go; see
https://github.com/kubernetes/client-go/blob/v0.24.4/plugin/pkg/client/auth/openstack/openstack_stub.go
It is replaced by the client-keystone-auth credential plugin. The
plugin has been entirely removed in client-go 0.26.0, which breaks the
build when any other dependency pulls in client-go 0.26.0 or later.

The GCP plugin is deprecated in K8s 1.22+ and unavailable in 1.26+
(although it is still stubbed in client-go 0.26.0). Is it replaced by
the gke-gcloud-auth-plugin credential plugin.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

* Update plugin/kubernetes/setup.go

Signed-off-by: Stephen Kitt <skitt@redhat.com>
Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Stephen Kitt 2022-12-13 21:49:03 +01:00 committed by GitHub
parent c3228615e0
commit 60b7161fee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,9 +17,7 @@ import (
"github.com/go-logr/logr"
"github.com/miekg/dns"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp" // pull this in here, because we want it excluded if plugin.cfg doesn't have k8s
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc" // pull this in here, because we want it excluded if plugin.cfg doesn't have k8s
_ "k8s.io/client-go/plugin/pkg/client/auth/openstack" // pull this in here, because we want it excluded if plugin.cfg doesn't have k8s
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc" // pull this in here, because we want it excluded if plugin.cfg doesn't have k8s
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog/v2"
)