Skip to content

Commit

Permalink
fix: error "no kind is registered for the type v1.Cluster in scheme" (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zjx20 authored Sep 19, 2024
1 parent 87e27f5 commit 49e726e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/dataprotection/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 49e726e

Please sign in to comment.