diff --git a/controllers/subscriptions.go b/controllers/subscriptions.go index 8ca4b67b..df6aa2f8 100644 --- a/controllers/subscriptions.go +++ b/controllers/subscriptions.go @@ -28,6 +28,7 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" @@ -127,6 +128,9 @@ func isProviderMode(cli client.Client) (bool, error) { storageclusters := &ocsv1.StorageClusterList{} err := cli.List(context.TODO(), storageclusters) if err != nil { + if meta.IsNoMatchError(err) { + return false, nil + } return false, err }