add route to scheme
@@ -23,6 +23,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
+ routv1 "github.com/openshift/api/route/v1"
)
// Change below variables to serve metrics on different host or port.
@@ -96,6 +97,12 @@ func main() {
os.Exit(1)
}
+ // Setup Scheme for all resources
+ if err := routv1.AddToScheme(mgr.GetScheme()); err != nil {
+ log.Error(err, "")
+ os.Exit(1)
+ }
+
// Setup all Controllers
if err := controller.AddToManager(mgr); err != nil {
log.Error(err, "")
