From 9a1a1bae6325af54fb9d7f445ec335326229e40e Mon Sep 17 00:00:00 2001 From: Kushal Harish Naidu Date: Fri, 24 May 2024 16:06:53 +0000 Subject: [PATCH] Add porch to runtime scheme Signed-off-by: Kushal Harish Naidu --- controllers/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/controllers/main.go b/controllers/main.go index 9ec66db2..0a316f9c 100644 --- a/controllers/main.go +++ b/controllers/main.go @@ -42,7 +42,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/nephio-project/porch/api/porch" + porchapi "github.com/nephio-project/porch/api/porch/v1alpha1" "github.com/nephio-project/porch/controllers/fleetsyncs/pkg/controllers/fleetsync" "github.com/nephio-project/porch/controllers/packagevariants/pkg/controllers/packagevariant" "github.com/nephio-project/porch/controllers/packagevariantsets/pkg/controllers/packagevariantset" @@ -119,6 +119,10 @@ func run(ctx context.Context) error { return fmt.Errorf("error initializing scheme: %w", err) } + if err := porchapi.AddToScheme(scheme); err != nil { + return fmt.Errorf("error initializing scheme: %w", err) + } + managerOptions := ctrl.Options{ Scheme: scheme, Metrics: metricsserver.Options{ @@ -135,7 +139,7 @@ func run(ctx context.Context) error { Client: client.Options{ Cache: &client.CacheOptions{ DisableFor: []client.Object{ - &porch.PackageRevisionResources{}}, + &porchapi.PackageRevisionResources{}}, }, }, }