diff --git a/address-space-controller/pom.xml b/address-space-controller/pom.xml index de0528a6e2f..706b4d36045 100644 --- a/address-space-controller/pom.xml +++ b/address-space-controller/pom.xml @@ -142,12 +142,6 @@ META-INF/*.RSA - - io.fabric8:kubernetes-model - - io/fabric8/kubernetes/internal/KubernetesDeserializer** - - diff --git a/address-space-controller/src/main/java/io/enmasse/controller/common/KubernetesHelper.java b/address-space-controller/src/main/java/io/enmasse/controller/common/KubernetesHelper.java index 739fb71ee01..871274bd10f 100644 --- a/address-space-controller/src/main/java/io/enmasse/controller/common/KubernetesHelper.java +++ b/address-space-controller/src/main/java/io/enmasse/controller/common/KubernetesHelper.java @@ -112,14 +112,14 @@ public static boolean isStatefulSet(HasMetadata res) { @Override public void deleteResourcesNotIn(String [] uuids) { - client.apps().statefulSets().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).delete(); - client.secrets().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).delete(); - client.configMaps().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).delete(); - client.apps().deployments().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).delete(); - client.services().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).delete(); + client.apps().statefulSets().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).withPropagationPolicy("Background").delete(); + client.secrets().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).withPropagationPolicy("Background").delete(); + client.configMaps().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).withPropagationPolicy("Background").delete(); + client.apps().deployments().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).withPropagationPolicy("Background").delete(); + client.services().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).withPropagationPolicy("Background").delete(); client.persistentVolumeClaims().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).delete(); if (isOpenShift) { - client.adapt(OpenShiftClient.class).routes().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).delete(); + client.adapt(OpenShiftClient.class).routes().withLabel(LabelKeys.INFRA_TYPE).withLabelNotIn(LabelKeys.INFRA_UUID, uuids).withPropagationPolicy("Background").delete(); } } diff --git a/api-model/pom.xml b/api-model/pom.xml index ed99e522c77..afe0db7f935 100644 --- a/api-model/pom.xml +++ b/api-model/pom.xml @@ -49,6 +49,7 @@ org.slf4j slf4j-api + test com.google.guava diff --git a/api-model/src/main/java/io/enmasse/common/model/AbstractList.java b/api-model/src/main/java/io/enmasse/common/model/AbstractList.java index 8dd9a3e6c3b..acaf42926fc 100644 --- a/api-model/src/main/java/io/enmasse/common/model/AbstractList.java +++ b/api-model/src/main/java/io/enmasse/common/model/AbstractList.java @@ -18,7 +18,7 @@ @SuppressWarnings("serial") public abstract class AbstractList extends AbstractResource - implements KubernetesResource, KubernetesResourceList { + implements KubernetesResource, KubernetesResourceList { @Valid private ListMeta metadata = new ListMeta(); diff --git a/api-model/src/main/java/io/fabric8/kubernetes/internal/KubernetesDeserializer.java b/api-model/src/main/java/io/fabric8/kubernetes/internal/KubernetesDeserializer.java deleted file mode 100644 index 1b7bbba54a4..00000000000 --- a/api-model/src/main/java/io/fabric8/kubernetes/internal/KubernetesDeserializer.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright 2018, EnMasse authors. - * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). - */ - - -package io.fabric8.kubernetes.internal; -import java.io.IOException; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonNode; - -import com.fasterxml.jackson.databind.node.ObjectNode; -import io.fabric8.kubernetes.api.model.KubernetesResource; -import io.fabric8.kubernetes.api.KubernetesResourceMappingProvider; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class KubernetesDeserializer extends JsonDeserializer { - - private static final Logger log = LoggerFactory.getLogger(KubernetesDeserializer.class); - - - private static final String KIND = "kind"; - private static final String API_VERSION = "apiVersion"; - private static final String KEY_SEPARATOR = "#"; - - private static final Map> MAP = new ConcurrentHashMap<>(); - private static final List PACKAGES; - - static { - log.warn("Using EnMasse specific KubernetesDeserializer with threadsafe map - see https://github.com/fabric8io/kubernetes-client/issues/1634"); - - //Use service loader to load extension types. - for (KubernetesResourceMappingProvider provider : ServiceLoader.load(KubernetesResourceMappingProvider.class)) { - for (Map.Entry> entry : provider.getMappings().entrySet()) { - String key = entry.getKey(); - Class value = entry.getValue(); - //If the model is shaded (which is as part of kubernetes-client uberjar) this is going to cause conflicts. - //This is why we NEED TO filter out incompatible resources. - if (KubernetesResource.class.isAssignableFrom(value)) { - MAP.put(key, value); - } - } - } - - PACKAGES = new ArrayList(){{ - add("io.fabric8.kubernetes.api.model."); - add("io.fabric8.kubernetes.api.model.apiextensions."); - add("io.fabric8.kubernetes.api.model.apps."); - add("io.fabric8.kubernetes.api.model.authentication."); - add("io.fabric8.kubernetes.api.model.authorization."); - add("io.fabric8.kubernetes.api.model.batch."); - add("io.fabric8.kubernetes.api.model.extensions."); - add("io.fabric8.kubernetes.api.model.networking."); - add("io.fabric8.kubernetes.api.model.policy."); - add("io.fabric8.kubernetes.api.model.rbac."); - add("io.fabric8.kubernetes.api.model.storage."); - add("io.fabric8.openshift.api.model."); - }}; - } - - @Override - public KubernetesResource deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - ObjectNode node = jp.readValueAsTree(); - String key = getKey(node); - if (key != null) { - Class resourceType = getTypeForKey(key); - if (resourceType == null) { - throw ctxt.mappingException("No resource type found for:" + key); - } else { - return jp.getCodec().treeToValue(node, resourceType); - } - } - return null; - } - - /** - * Return a string representation of the key of the type: #. - */ - private static final String getKey(ObjectNode node) { - JsonNode apiVersion = node.get(API_VERSION); - JsonNode kind = node.get(KIND); - - return getKey(apiVersion != null ? apiVersion.textValue() : null, - kind != null ? kind.textValue() : null); - } - - /** - * Returns a composite key for apiVersion and kind. - */ - private static final String getKey(String apiVersion, String kind) { - if (kind == null) { - return null; - } else if (apiVersion == null) { - return kind; - } else { - return String.format("%s#%s", apiVersion, kind); - } - } - - /** - * Registers a Custom Resource Definition Kind - */ - public static void registerCustomKind(String kind, Class clazz) { - registerCustomKind(null, kind, clazz); - } - - /** - * Registers a Custom Resource Definition Kind - */ - public static void registerCustomKind(String apiVersion, String kind, Class clazz) { - MAP.put(getKey(apiVersion, kind), clazz); - } - - static Class getTypeForKey(String key) { - Class result = MAP.get(key); - if (result == null) { - String name = key != null && key.contains(KEY_SEPARATOR) ? - key.substring(key.indexOf(KEY_SEPARATOR) + 1) : - key; - - result = getInternalTypeForName(name); - } - - if (result != null) { - MAP.put(key, result); - } - return result; - } - - private static Class getInternalTypeForName(String name) { - - for (int i = 0; i < PACKAGES.size(); i++ ) { - Class result = loadClassIfExists(PACKAGES.get(i) + name); - if (result != null) { - return result; - } - } - - return null; - } - - private static Class loadClassIfExists(String className) { - try { - return KubernetesDeserializer.class.getClassLoader().loadClass(className); - } catch (Throwable t) { - return null; - } - } -} diff --git a/api-server/pom.xml b/api-server/pom.xml index 6c39c4cf2c4..029c078ee5a 100644 --- a/api-server/pom.xml +++ b/api-server/pom.xml @@ -148,12 +148,6 @@ META-INF/*.RSA - - io.fabric8:kubernetes-model - - io/fabric8/kubernetes/internal/KubernetesDeserializer** - - diff --git a/k8s-api/src/main/java/io/enmasse/k8s/api/ConfigMapAddressApi.java b/k8s-api/src/main/java/io/enmasse/k8s/api/ConfigMapAddressApi.java index 3449195d73a..1e9a96b62fc 100644 --- a/k8s-api/src/main/java/io/enmasse/k8s/api/ConfigMapAddressApi.java +++ b/k8s-api/src/main/java/io/enmasse/k8s/api/ConfigMapAddressApi.java @@ -134,7 +134,7 @@ public void deleteAddresses(String namespace) { labels.put(LabelKeys.INFRA_UUID, infraUuid); labels.put(LabelKeys.NAMESPACE, namespace); - client.configMaps().withLabels(labels).delete(); + client.configMaps().withLabels(labels).withPropagationPolicy("Background").delete(); } @Override @@ -220,7 +220,7 @@ private ConfigMap create(Address address) { @Override public boolean deleteAddress(Address address) { - Boolean deleted = client.configMaps().withName(getConfigMapName(address.getMetadata().getNamespace(), address.getMetadata().getName())).delete(); + Boolean deleted = client.configMaps().withName(getConfigMapName(address.getMetadata().getNamespace(), address.getMetadata().getName())).cascading(true).delete(); return deleted != null && deleted; } diff --git a/k8s-api/src/main/java/io/enmasse/k8s/api/ConfigMapAddressSpaceApi.java b/k8s-api/src/main/java/io/enmasse/k8s/api/ConfigMapAddressSpaceApi.java index f921a591b1b..519231258dc 100644 --- a/k8s-api/src/main/java/io/enmasse/k8s/api/ConfigMapAddressSpaceApi.java +++ b/k8s-api/src/main/java/io/enmasse/k8s/api/ConfigMapAddressSpaceApi.java @@ -144,7 +144,7 @@ private ConfigMap create(AddressSpace addressSpace) { @Override public boolean deleteAddressSpace(AddressSpace addressSpace) { String name = getConfigMapName(addressSpace.getMetadata().getNamespace(), addressSpace.getMetadata().getName()); - Boolean deleted = client.configMaps().withName(name).delete(); + Boolean deleted = client.configMaps().withName(name).cascading(true).delete(); return deleted != null && deleted; } @@ -187,7 +187,7 @@ public void deleteAddressSpaces(String namespace) { Map labels = new LinkedHashMap<>(); labels.put(LabelKeys.TYPE, "address-space"); labels.put(LabelKeys.NAMESPACE, namespace); - client.configMaps().withLabels(labels).delete(); + client.configMaps().withLabels(labels).withPropagationPolicy("Background").delete(); } private AddressSpace getAddressSpaceFromConfig(ConfigMap map) { diff --git a/pom.xml b/pom.xml index a290dfe0db6..756a41bf66b 100644 --- a/pom.xml +++ b/pom.xml @@ -42,8 +42,8 @@ 11 1.9.0 - 4.1.3 - 0.16.4 + 4.6.1 + 0.17.2 3.7.1 1.7.21 1.2.3 diff --git a/service-broker/pom.xml b/service-broker/pom.xml index 07a96687f5e..6ad72cc73e1 100644 --- a/service-broker/pom.xml +++ b/service-broker/pom.xml @@ -148,12 +148,6 @@ META-INF/*.RSA - - io.fabric8:kubernetes-model - - io/fabric8/kubernetes/internal/KubernetesDeserializer** - - diff --git a/standard-controller/pom.xml b/standard-controller/pom.xml index 01811424455..045c582ef5d 100644 --- a/standard-controller/pom.xml +++ b/standard-controller/pom.xml @@ -110,14 +110,6 @@ io.enmasse.controller.standard.StandardController - - - io.fabric8:kubernetes-model - - io/fabric8/kubernetes/internal/KubernetesDeserializer** - - - diff --git a/standard-controller/src/main/java/io/enmasse/controller/standard/KubernetesHelper.java b/standard-controller/src/main/java/io/enmasse/controller/standard/KubernetesHelper.java index 88382392d3f..b76c0a2ddd0 100644 --- a/standard-controller/src/main/java/io/enmasse/controller/standard/KubernetesHelper.java +++ b/standard-controller/src/main/java/io/enmasse/controller/standard/KubernetesHelper.java @@ -166,7 +166,7 @@ public void apply(HasMetadata resource, boolean patchPersistentVolumeClaims, boo @Override public void delete(KubernetesList resources) { - client.lists().delete(resources); + resources.getItems().forEach( resource -> client.resource(resource).cascading(true).delete()); } @Override diff --git a/systemtests/src/main/java/io/enmasse/systemtest/platform/Kubernetes.java b/systemtests/src/main/java/io/enmasse/systemtest/platform/Kubernetes.java index e564e5ac363..8ff213006ac 100644 --- a/systemtests/src/main/java/io/enmasse/systemtest/platform/Kubernetes.java +++ b/systemtests/src/main/java/io/enmasse/systemtest/platform/Kubernetes.java @@ -537,7 +537,7 @@ public void createNamespace(String namespace) { public void deleteNamespace(String namespace) throws Exception { log.info("Following namespace will be removed - {}", namespace); if (namespaceExists(namespace)) { - client.namespaces().withName(namespace).delete(); + client.namespaces().withName(namespace).cascading(true).delete(); TestUtils.waitUntilCondition("Namespace will be deleted", phase -> !namespaceExists(namespace), new TimeoutBudget(5, TimeUnit.MINUTES)); @@ -553,7 +553,7 @@ public boolean namespaceExists(String namespace) { public void deletePod(String namespace, Map labels) { log.info("Delete pods with labels: {}", labels.toString()); - client.pods().inNamespace(namespace).withLabels(labels).delete(); + client.pods().inNamespace(namespace).withLabels(labels).withPropagationPolicy("Background").delete(); } /*** @@ -578,7 +578,7 @@ public void createPodFromTemplate(String namespace, String configName) throws Ex * @throws Exception */ public void deletePod(String namespace, String podName) { - client.pods().inNamespace(namespace).withName(podName).delete(); + client.pods().inNamespace(namespace).withName(podName).cascading(true).delete(); log.info("Pod {} removed", podName); } @@ -647,7 +647,7 @@ public void createIngressFromResource(String namespace, Ingress resources) { * @param ingressName ingress name */ public void deleteIngress(String namespace, String ingressName) { - client.extensions().ingresses().inNamespace(namespace).withName(ingressName).delete(); + client.extensions().ingresses().inNamespace(namespace).withName(ingressName).cascading(true).delete(); log.info("Ingress {} deleted", ingressName); } @@ -696,7 +696,7 @@ public void createConfigmapFromResource(String namespace, ConfigMap resources) { * @param configmapName configmap */ public void deleteConfigmap(String namespace, String configmapName) { - client.configMaps().inNamespace(namespace).withName(configmapName).delete(); + client.configMaps().inNamespace(namespace).withName(configmapName).cascading(true).delete(); log.info("Configmap {} in namespace {} deleted", configmapName, namespace); } @@ -718,7 +718,7 @@ public boolean configmapExists(String namespace, String configmapName) { * @param appName */ public void deleteDeployment(String namespace, String appName) { - client.apps().deployments().inNamespace(namespace).withName(appName).delete(); + client.apps().deployments().inNamespace(namespace).withName(appName).cascading(true).delete(); log.info("Deployment {} removed", appName); } @@ -739,7 +739,7 @@ public boolean deploymentExists(String namespace, String appName) { * @param serviceName service name */ public void deleteService(String namespace, String serviceName) { - client.services().inNamespace(namespace).withName(serviceName).delete(); + client.services().inNamespace(namespace).withName(serviceName).cascading(true).delete(); log.info("Service {} removed", serviceName); } @@ -859,7 +859,7 @@ public String createServiceAccount(String name, String namespace) { */ public String deleteServiceAccount(String name, String namespace) { log.info("Delete serviceaccount {} from namespace {}", name, namespace); - client.serviceAccounts().inNamespace(namespace).withName(name).delete(); + client.serviceAccounts().inNamespace(namespace).withName(name).cascading(true).delete(); return "system:serviceaccount:" + namespace + ":" + name; } @@ -936,7 +936,7 @@ public void createSecret(String namespace, Secret resources) { * @param secret secret name */ public void deleteSecret(String namespace, String secret) { - client.secrets().inNamespace(namespace).withName(secret).delete(); + client.secrets().inNamespace(namespace).withName(secret).cascading(true).delete(); log.info("Secret {} deleted", secret); } diff --git a/systemtests/src/main/java/io/enmasse/systemtest/platform/Minikube.java b/systemtests/src/main/java/io/enmasse/systemtest/platform/Minikube.java index c314fa8fdac..97eb5c76f76 100644 --- a/systemtests/src/main/java/io/enmasse/systemtest/platform/Minikube.java +++ b/systemtests/src/main/java/io/enmasse/systemtest/platform/Minikube.java @@ -121,6 +121,6 @@ public void deleteExternalEndpoint(String namespace, String name) { if (!name.endsWith("-external")) { name += "-external"; } - client.services().inNamespace(name).withName(name).delete(); + client.services().inNamespace(name).withName(name).cascading(true).delete(); } } diff --git a/systemtests/src/main/java/io/enmasse/systemtest/platform/OpenShift.java b/systemtests/src/main/java/io/enmasse/systemtest/platform/OpenShift.java index cf97d7634ca..6ba25eaec7a 100644 --- a/systemtests/src/main/java/io/enmasse/systemtest/platform/OpenShift.java +++ b/systemtests/src/main/java/io/enmasse/systemtest/platform/OpenShift.java @@ -4,7 +4,6 @@ */ package io.enmasse.systemtest.platform; -import io.enmasse.address.model.TlsTermination; import io.enmasse.systemtest.Endpoint; import io.enmasse.systemtest.Environment; import io.enmasse.systemtest.logs.CustomLogger; @@ -145,7 +144,7 @@ public void createExternalEndpoint(String name, String namespace, Service servic @Override public void deleteExternalEndpoint(String namespace, String name) { OpenShiftClient openShift = client.adapt(OpenShiftClient.class); - openShift.routes().inNamespace(namespace).withName(name).delete(); + openShift.routes().inNamespace(namespace).withName(name).cascading(true).delete(); } } diff --git a/systemtests/src/main/java/io/enmasse/systemtest/platform/apps/SystemtestsKubernetesApps.java b/systemtests/src/main/java/io/enmasse/systemtest/platform/apps/SystemtestsKubernetesApps.java index 0697becbc75..f9a2e1a5847 100644 --- a/systemtests/src/main/java/io/enmasse/systemtest/platform/apps/SystemtestsKubernetesApps.java +++ b/systemtests/src/main/java/io/enmasse/systemtest/platform/apps/SystemtestsKubernetesApps.java @@ -342,8 +342,8 @@ public static void deployAMQBroker(String namespace, String name, String user, S public static void deleteAMQBroker(String namespace, String name) throws Exception { Kubernetes kubeCli = Kubernetes.getInstance(); - kubeCli.getClient().rbac().roles().inNamespace(namespace).withName(name).delete(); - kubeCli.getClient().rbac().roleBindings().inNamespace(namespace).withName(name).delete(); + kubeCli.getClient().rbac().roles().inNamespace(namespace).withName(name).cascading(true).delete(); + kubeCli.getClient().rbac().roleBindings().inNamespace(namespace).withName(name).cascading(true).delete(); kubeCli.deleteSecret(namespace, name); kubeCli.deleteService(namespace, name); kubeCli.deleteDeployment(namespace, name); diff --git a/systemtests/src/main/java/io/enmasse/systemtest/utils/AddressSpaceUtils.java b/systemtests/src/main/java/io/enmasse/systemtest/utils/AddressSpaceUtils.java index 9d762da0287..058bd496525 100644 --- a/systemtests/src/main/java/io/enmasse/systemtest/utils/AddressSpaceUtils.java +++ b/systemtests/src/main/java/io/enmasse/systemtest/utils/AddressSpaceUtils.java @@ -149,7 +149,7 @@ public static void deleteAllAddressSpaces(GlobalLogCollector logCollector) throw logCollector.collectLogsTerminatedPods(); logCollector.collectConfigMaps(); logCollector.collectRouterState("deleteAddressSpace"); - Kubernetes.getInstance().getAddressSpaceClient().delete(); + Kubernetes.getInstance().getAddressSpaceClient().withPropagationPolicy("Background").delete(); TimeMeasuringSystem.stopOperation(operationID); } diff --git a/systemtests/src/main/java/io/enmasse/systemtest/utils/IoTUtils.java b/systemtests/src/main/java/io/enmasse/systemtest/utils/IoTUtils.java index fa2a88f325d..9a21dec5a6e 100644 --- a/systemtests/src/main/java/io/enmasse/systemtest/utils/IoTUtils.java +++ b/systemtests/src/main/java/io/enmasse/systemtest/utils/IoTUtils.java @@ -172,7 +172,7 @@ public static boolean isIoTInstalled(Kubernetes kubernetes) { public static void deleteIoTProjectAndWait(Kubernetes kubernetes, IoTProject project) throws Exception { log.info("Deleting IoTProject: {}", project.getMetadata().getName()); String operationID = TimeMeasuringSystem.startOperation(SystemtestsOperation.DELETE_IOT_PROJECT); - kubernetes.getIoTProjectClient(project.getMetadata().getNamespace()).withName(project.getMetadata().getName()).delete(); + kubernetes.getIoTProjectClient(project.getMetadata().getNamespace()).withName(project.getMetadata().getName()).cascading(true).delete(); IoTUtils.waitForIoTProjectDeleted(kubernetes, project); TimeMeasuringSystem.stopOperation(operationID); } diff --git a/systemtests/src/test/java/io/enmasse/systemtest/isolated/api/ApiServerTest.java b/systemtests/src/test/java/io/enmasse/systemtest/isolated/api/ApiServerTest.java index fc296831f45..861a6c82d17 100644 --- a/systemtests/src/test/java/io/enmasse/systemtest/isolated/api/ApiServerTest.java +++ b/systemtests/src/test/java/io/enmasse/systemtest/isolated/api/ApiServerTest.java @@ -546,7 +546,7 @@ void testCreateAddressSpaceRoleTenantEdit() throws Exception { assertTrue(KubeCMDClient.createCR(namespace, space1Json.toString()).getRetCode()); resourcesManager.deleteAddressSpace(space1); - kubernetes.getClient().rbac().clusterRoleBindings().withName(rolebindingname).delete(); + kubernetes.getClient().rbac().clusterRoleBindings().withName(rolebindingname).cascading(true).delete(); AddressSpace space2 = supplier.get(); JsonObject space2Json = AddressSpaceUtils.addressSpaceToJson(space2); @@ -555,7 +555,7 @@ void testCreateAddressSpaceRoleTenantEdit() throws Exception { } finally { if (kubernetes.getClient().rbac().clusterRoleBindings().withName(rolebindingname).get() != null) { - kubernetes.getClient().rbac().clusterRoleBindings().withName(rolebindingname).delete(); + kubernetes.getClient().rbac().clusterRoleBindings().withName(rolebindingname).cascading(true).delete(); } KubeCMDClient.loginUser(environment.getApiToken()); KubeCMDClient.switchProject(environment.namespace()); diff --git a/systemtests/src/test/java/io/enmasse/systemtest/olm/OperatorLifecycleManagerTest.java b/systemtests/src/test/java/io/enmasse/systemtest/olm/OperatorLifecycleManagerTest.java index fda03f0b51f..448f63c5057 100644 --- a/systemtests/src/test/java/io/enmasse/systemtest/olm/OperatorLifecycleManagerTest.java +++ b/systemtests/src/test/java/io/enmasse/systemtest/olm/OperatorLifecycleManagerTest.java @@ -99,7 +99,7 @@ void uninstallOperator() throws Exception { Openshift4WebPage page = new Openshift4WebPage(SeleniumProvider.getInstance(), getOCConsoleRoute(), clusterUser); page.openOpenshiftPage(); page.uninstallFromCatalog(environment.getAppName()); - kubernetes.getConsoleServiceClient(infraNamespace).delete(); + kubernetes.getConsoleServiceClient(infraNamespace).withPropagationPolicy("Background").delete(); }