diff --git a/controllers/sriovoperatorconfig_controller.go b/controllers/sriovoperatorconfig_controller.go index a958eb967..bee4bbfec 100644 --- a/controllers/sriovoperatorconfig_controller.go +++ b/controllers/sriovoperatorconfig_controller.go @@ -80,7 +80,7 @@ func (r *SriovOperatorConfigReconciler) Reconcile(ctx context.Context, req ctrl. if errors.IsNotFound(err) { singleNode, err := utils.IsSingleNodeCluster(r.Client) if err != nil { - return reconcile.Result{}, fmt.Errorf("Couldn't check the amount of nodes in the cluster") + return reconcile.Result{}, fmt.Errorf("Couldn't get cluster single node status: %s", err) } // Default Config object not found, create it. diff --git a/main.go b/main.go index cf8f6a8a8..7a146b1bc 100644 --- a/main.go +++ b/main.go @@ -23,6 +23,7 @@ import ( "os" netattdefv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" + openshiftconfigv1 "github.com/openshift/api/config/v1" mcfgv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -59,6 +60,7 @@ func init() { utilruntime.Must(sriovnetworkv1.AddToScheme(scheme)) utilruntime.Must(netattdefv1.AddToScheme(scheme)) utilruntime.Must(mcfgv1.AddToScheme(scheme)) + utilruntime.Must(openshiftconfigv1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } @@ -238,7 +240,7 @@ func createDefaultOperatorConfig(c client.Client) error { logger := setupLog.WithName("createDefaultOperatorConfig") singleNode, err := utils.IsSingleNodeCluster(c) if err != nil { - return fmt.Errorf("Couldn't check the amount of nodes in the cluster") + return fmt.Errorf("Couldn't get cluster single node status: %s", err) } enableAdmissionController := os.Getenv("ENABLE_ADMISSION_CONTROLLER") == "true"