All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codacy.scoobydoo.kubernetes.handlers.FindPodByNameHandler Maven / Gradle / Ivy

There is a newer version: 3.30.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy