diff --git a/cmd/dataprotection/main.go b/cmd/dataprotection/main.go index f1b293ef26d..cdd68ade60e 100644 --- a/cmd/dataprotection/main.go +++ b/cmd/dataprotection/main.go @@ -29,6 +29,8 @@ import ( // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) // to ensure that exec-entrypoint and run can make use of them. + _ "k8s.io/client-go/plugin/pkg/client/auth" + "github.com/fsnotify/fsnotify" snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1beta1" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" @@ -38,7 +40,6 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" discoverycli "k8s.io/client-go/discovery" clientgoscheme "k8s.io/client-go/kubernetes/scheme" - _ "k8s.io/client-go/plugin/pkg/client/auth" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/healthz" @@ -48,6 +49,7 @@ import ( // +kubebuilder:scaffold:imports + appsv1 "github.com/apecloud/kubeblocks/apis/apps/v1" appsv1alpha1 "github.com/apecloud/kubeblocks/apis/apps/v1alpha1" dpv1alpha1 "github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1" dpcontrollers "github.com/apecloud/kubeblocks/controllers/dataprotection" @@ -89,6 +91,7 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) + utilruntime.Must(appsv1.AddToScheme(scheme)) utilruntime.Must(appsv1alpha1.AddToScheme(scheme)) utilruntime.Must(dpv1alpha1.AddToScheme(scheme)) utilruntime.Must(snapshotv1.AddToScheme(scheme))