com.codacy.scoobydoo.kubernetes.handlers.FindPodByNameHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scooby-doo-fwk Show documentation
Show all versions of scooby-doo-fwk Show documentation
Automated testing framework
package com.codacy.scoobydoo.kubernetes.handlers;
import io.fabric8.kubernetes.client.KubernetesClient;
import java.util.concurrent.Callable;
public class FindPodByNameHandler implements Callable {
private final KubernetesClient kubernetesClient;
private final String podName;
private final String namespace;
public FindPodByNameHandler(KubernetesClient kubernetesClient, String podName, String namespace) {
this.kubernetesClient = kubernetesClient;
this.podName = podName;
this.namespace = namespace;
}
@Override
public Boolean call() {
return kubernetesClient
.pods()
.inNamespace(namespace)
.withName(podName).get() != null;
}
}