diff --git a/src/main/java/io/odh/test/install/OlmInstall.java b/src/main/java/io/odh/test/install/OlmInstall.java index ede4fe4..aa76665 100644 --- a/src/main/java/io/odh/test/install/OlmInstall.java +++ b/src/main/java/io/odh/test/install/OlmInstall.java @@ -61,13 +61,15 @@ public void createManual() { * Creates namespace for operator-group and subscription */ private void createNamespace() { - // Create namespace at first because operator-group and subscription could you specific namespace - Namespace ns = new NamespaceBuilder() + if (!KubeResourceManager.getKubeClient().namespaceExists(namespace)) { + // Create namespace at first because operator-group and subscription could you specific namespace + Namespace ns = new NamespaceBuilder() .withNewMetadata() .withName(namespace) .endMetadata() .build(); - KubeResourceManager.getInstance().createOrUpdateResourceWithWait(ns); + KubeResourceManager.getInstance().createResourceWithWait(ns); + } } /**