Skip to content

Commit

Permalink
Cluster checking-2
Browse files Browse the repository at this point in the history
Signed-off-by: PrimalPimmy <[email protected]>
  • Loading branch information
PrimalPimmy committed Jun 20, 2024
1 parent b19c8b4 commit 74a5d4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions controllers/pkg/reconcilers/spire-bootstrap/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
reconcilerinterface "github.com/nephio-project/nephio/controllers/pkg/reconcilers/reconciler-interface"
"k8s.io/apimachinery/pkg/runtime/schema"

corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/cluster-api/api/v1beta1"
capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/event"
Expand All @@ -44,7 +44,7 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c a

return nil, ctrl.NewControllerManagedBy(mgr).
Named("BootstrapSpireController").
For(&corev1.ConfigMap{}).
For(&capiv1beta1.Cluster{}).
Complete(r)
}

Expand All @@ -58,7 +58,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
log := log.FromContext(ctx)

// Fetch the Cluster instance
cluster := &v1beta1.Cluster{}
cluster := &v1beta1.ClusterClass{}
err := r.Get(ctx, req.NamespacedName, cluster)
if err != nil {
if client.IgnoreNotFound(err) != nil {
Expand Down
4 changes: 2 additions & 2 deletions operators/nephio-controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import (
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/klog/v2/klogr"

"k8s.io/apimachinery/pkg/apis/meta/v1beta1"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1"
ctrl "sigs.k8s.io/controller-runtime"

//+kubebuilder:scaffold:imports
Expand Down Expand Up @@ -110,7 +110,7 @@ func main() {
os.Exit(1)
}

err = v1beta1.AddMetaToScheme(scheme)
err = capiv1beta1.AddToScheme(scheme)
if err != nil {
setupLog.Error(err, "cannot initializer schema with Cluster API(s)")
// klog.Errorf("error initializing scheme with Porch APIs: %s", err.Error())
Expand Down

0 comments on commit 74a5d4b

Please sign in to comment.