diff --git a/operators/nephio-controller-manager/main.go b/operators/nephio-controller-manager/main.go index 2b4664f3..7a3c7bd4 100644 --- a/operators/nephio-controller-manager/main.go +++ b/operators/nephio-controller-manager/main.go @@ -41,6 +41,7 @@ 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" ctrl "sigs.k8s.io/controller-runtime" @@ -56,8 +57,8 @@ import ( //_ "github.com/nephio-project/nephio/controllers/pkg/reconcilers/ipam-specializer" _ "github.com/nephio-project/nephio/controllers/pkg/reconcilers/repository" + _ "github.com/nephio-project/nephio/controllers/pkg/reconcilers/spire-bootstrap" _ "github.com/nephio-project/nephio/controllers/pkg/reconcilers/token" - _ "github.com/nephio-project/nephio/controllers/pkg/reconcilers/spire-bootstrap" //_ "github.com/nephio-project/nephio/controllers/pkg/reconcilers/vlan-specializer" ) @@ -109,6 +110,13 @@ func main() { os.Exit(1) } + err = v1beta1.AddMetaToScheme(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()) + os.Exit(1) + } + managerOptions := ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr,