Skip to content

Commit

Permalink
Add porch to runtime scheme
Browse files Browse the repository at this point in the history
Signed-off-by: Kushal Harish Naidu <[email protected]>
  • Loading branch information
kushnaidu committed May 24, 2024
1 parent e7d458e commit 9a1a1ba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controllers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{
Expand All @@ -135,7 +139,7 @@ func run(ctx context.Context) error {
Client: client.Options{
Cache: &client.CacheOptions{
DisableFor: []client.Object{
&porch.PackageRevisionResources{}},
&porchapi.PackageRevisionResources{}},
},
},
}
Expand Down

0 comments on commit 9a1a1ba

Please sign in to comment.