Signed-off-by: wind57 <eugen.rabii@gmail.com>
This commit is contained in:
wind57
2025-04-02 21:55:09 +03:00
parent a9fd87bc7e
commit 0efc2408ff

View File

@@ -195,8 +195,8 @@ public final class Util {
public void deleteAndWait(String namespace, V1Deployment deployment, V1Service service) {
if (deployment != null) {
try {
try {
if (deployment != null) {
String deploymentName = deploymentName(deployment);
Map<String, String> podLabels = appsV1Api.readNamespacedDeployment(deploymentName, namespace, null)
.getSpec()
@@ -208,20 +208,19 @@ public final class Util {
labelSelector(podLabels), null, null, null, null, null, null, null, null);
waitForDeploymentToBeDeleted(deploymentName, namespace);
waitForDeploymentPodsToBeDeleted(podLabels, namespace);
}
if (service != null) {
service.getMetadata().setNamespace(namespace);
coreV1Api.deleteNamespacedService(service.getMetadata().getName(), service.getMetadata().getNamespace(),
if (service != null) {
service.getMetadata().setNamespace(namespace);
coreV1Api.deleteNamespacedService(service.getMetadata().getName(), service.getMetadata().getNamespace(),
null, null, null, null, null, null);
waitForServiceToBeDeleted(service.getMetadata().getName(), namespace);
}
}
catch (Exception e) {
throw new RuntimeException(e);
waitForServiceToBeDeleted(service.getMetadata().getName(), namespace);
}
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
public void busybox(String namespace, Phase phase) {