/** * Returns a client for the first working pod for the given service */ public J4pClient clientForService(String serviceName) { List<Pod> pods = KubernetesHelper.getPodsForService(requireService(serviceName), kubernetes.pods().list().getItems()); return clientForPod(pods); }
/** * Returns all the clients for the first working pod for the given service */ public List<J4pClient> clientsForService(String serviceName) { List<Pod> pods = KubernetesHelper.getPodsForService(requireService(serviceName), kubernetes.pods().list().getItems()); return clientsForPod(pods); }
/** * Returns a client for the first working pod for the given service */ public J4pClient clientForService(String serviceName, String namespace) { List<Pod> pods = KubernetesHelper.getPodsForService(requireService(serviceName, namespace), kubernetes.pods().inNamespace(namespace).list().getItems()); return clientForPod(pods); }
/** * Returns all the clients for the first working pod for the given service */ public List<J4pClient> clientsForService(String serviceName, String namespace) { List<Pod> pods = KubernetesHelper.getPodsForService(requireService(serviceName, namespace), kubernetes.pods().inNamespace(namespace).list().getItems()); return clientsForPod(pods); }
/** * Returns all the clients the first working pod for the given service */ public List<J4pClient> clientsForService(Service service) { List<Pod> pods = KubernetesHelper.getPodsForService(service, kubernetes.pods().inNamespace(service.getMetadata().getNamespace()).list().getItems()); return clientsForPod(pods); }
/** * Returns a client for the first working pod for the given service */ public J4pClient clientForService(Service service) { List<Pod> pods = KubernetesHelper.getPodsForService(service, kubernetes.pods().inNamespace(service.getMetadata().getNamespace()).list().getItems()); return clientForPod(pods); }
List<Pod> podsForService = KubernetesHelper.getPodsForService(service, pods); for (Pod pod : podsForService) { PodStatus currentState = pod.getStatus();