diff --git a/components/odh-notebook-controller/controllers/notebook_webhook.go b/components/odh-notebook-controller/controllers/notebook_webhook.go index 4de4cde7921..ccc90fef2fe 100644 --- a/components/odh-notebook-controller/controllers/notebook_webhook.go +++ b/components/odh-notebook-controller/controllers/notebook_webhook.go @@ -517,12 +517,12 @@ func SetContainerImageFromRegistry(ctx context.Context, config *rest.Config, not // Specify the namespace to search in // Currently and in foreseeable future, imagestream namespace is equal to central namespace that the odh notebook controller is running in namespace, err := getControllerNamespace() - if err != nil { - log.Error("Get controller namespace error", "error", err) - return nil - } - log.Info("Controller is running in namespace", "namespace", namespace) - imagestreamFound := false + if err != nil { + log.Error(err, "Error during determining controller / main namespace") + return nil + } + log.Info("Controller is running in namespace", "namespace", namespace) + imagestreamFound := false // List imagestreams in the specified namespace imagestreams, err := dynamicClient.Resource(ims).Namespace(namespace).List(ctx, metav1.ListOptions{}) if err != nil {