public final class Pods extends Object
Pods.forwardPort(OkHttpClient, Listable, int),
isReady(Pod),
Pod| Modifier and Type | Method and Description |
|---|---|
static io.fabric8.kubernetes.client.LocalPortForward |
forwardPort(OkHttpClient httpClient,
io.fabric8.kubernetes.client.dsl.Listable<? extends io.fabric8.kubernetes.api.model.PodList> pods,
int remotePort)
Forwards an arbitrary local port to the supplied
remotePort on the first
ready Pod in the supplied Listable using
the supplied OkHttpClient. |
static io.fabric8.kubernetes.client.LocalPortForward |
forwardPort(OkHttpClient httpClient,
io.fabric8.kubernetes.client.dsl.Listable<? extends io.fabric8.kubernetes.api.model.PodList> pods,
int remotePort,
int localPort) |
static io.fabric8.kubernetes.api.model.Pod |
getFirstReadyPod(Iterable<? extends io.fabric8.kubernetes.api.model.Pod> pods)
Returns the first
Pod encountered in the supplied Iterable of Pods for which the isReady(Pod)
method returns Boolean.TRUE, or null. |
static io.fabric8.kubernetes.api.model.Pod |
getFirstReadyPod(io.fabric8.kubernetes.client.dsl.Listable<? extends io.fabric8.kubernetes.api.model.PodList> podsResource)
Returns the first
Pod reachable from the supplied Listable of PodLists for which the isReady(Pod)
method returns Boolean.TRUE, or null. |
static io.fabric8.kubernetes.api.model.Pod |
getFirstReadyPod(io.fabric8.kubernetes.api.model.PodList podList)
Returns the first
Pod encountered in the supplied PodList of Pods for which the isReady(Pod)
method returns Boolean.TRUE, or null. |
static Boolean |
isReady(Iterable<? extends io.fabric8.kubernetes.api.model.PodCondition> podConditions)
Returns
Boolean.TRUE if the supplied Iterable of
PodConditions contains a PodCondition whose
PodCondition.getType() method returns Ready and
whose PodCondition.getStatus() method returns True. |
static Boolean |
isReady(io.fabric8.kubernetes.api.model.Pod pod)
Returns
Boolean.TRUE if the supplied Pod is known
to be ready, Boolean.FALSE if it is known to be not ready
and null if its readiness status is unknown. |
static Boolean |
isReady(io.fabric8.kubernetes.api.model.PodStatus podStatus)
Returns
Boolean.TRUE if the supplied PodStatus is
known to be ready, Boolean.FALSE if it is known to be not
ready and null if its readiness status is unknown. |
public static final io.fabric8.kubernetes.client.LocalPortForward forwardPort(OkHttpClient httpClient, io.fabric8.kubernetes.client.dsl.Listable<? extends io.fabric8.kubernetes.api.model.PodList> pods, int remotePort) throws MalformedURLException
remotePort on the first
ready Pod in the supplied Listable using
the supplied OkHttpClient.
This method may return null.
httpClient - an OkHttpClient used to communicate
with Kubernetes; may be null in which case null
will be returnedpods - a Listable of PodLists; must
also be an instance of OperationSupport or
null will be returnedremotePort - the port on the Pod that is ultimately
located to which traffic should be forwardedLocalPortForward representing the port
forwarding operation, or null; must be closed if non-nullMalformedURLException - if a URL to the
Kubernetes resource representing the Pod in question
could not be constructedPortForwarderWebsocket.PortForwarderWebsocket(OkHttpClient),
Pod
conditions documentationpublic static final io.fabric8.kubernetes.client.LocalPortForward forwardPort(OkHttpClient httpClient, io.fabric8.kubernetes.client.dsl.Listable<? extends io.fabric8.kubernetes.api.model.PodList> pods, int remotePort, int localPort) throws MalformedURLException
MalformedURLExceptionpublic static final Boolean isReady(io.fabric8.kubernetes.api.model.Pod pod)
Boolean.TRUE if the supplied Pod is known
to be ready, Boolean.FALSE if it is known to be not ready
and null if its readiness status is unknown.
This method may return null.
pod - the Pod to check; may be null in which
case null will be returnedBoolean.TRUE if the supplied Pod is known
to be ready, Boolean.FALSE if it is known to be not ready
and null if its readiness status is unknownisReady(PodStatus),
Pod
conditions documentationpublic static final Boolean isReady(io.fabric8.kubernetes.api.model.PodStatus podStatus)
Boolean.TRUE if the supplied PodStatus is
known to be ready, Boolean.FALSE if it is known to be not
ready and null if its readiness status is unknown.
This method may return null.
podStatus - the PodStatus to check; may be null in which case null will be returnedBoolean.TRUE if the supplied PodStatus is
known to be ready, Boolean.FALSE if it is known to be not
ready and null if its readiness status is unknownisReady(Iterable),
Pod
conditions documentationpublic static final Boolean isReady(Iterable<? extends io.fabric8.kubernetes.api.model.PodCondition> podConditions)
Boolean.TRUE if the supplied Iterable of
PodConditions contains a PodCondition whose
PodCondition.getType() method returns Ready and
whose PodCondition.getStatus() method returns True.
If the supplied Iterable of
PodConditions also contains a PodCondition whose
PodCondition.getType() method returns Ready and
whose PodCondition.getStatus() method returns False, then null is returned.
If instead the supplied Iterable of
PodConditions contains a PodCondition whose
PodCondition.getType() method returns Ready and
whose PodCondition.getStatus() method returns False and does not also contains a PodCondition whose
PodCondition.getType() method returns Ready and
whose PodCondition.getStatus() method returns True, then Boolean.FALSE is returned.
null is returned in all other cases.
This method may return null.
podConditions - an Iterable of PodConditions; may be null in which case null
will be returnedBoolean.TRUE if the supplied Iterable of
PodConditions represents a state of affairs known to
represent the readiness of the PodStatus they describe;
Boolean.FALSE if the supplied Iterable of PodConditions represents a state of affairs known to represent
the unreadiness of the PodStatus they describe, or null in all other casespublic static final io.fabric8.kubernetes.api.model.Pod getFirstReadyPod(Iterable<? extends io.fabric8.kubernetes.api.model.Pod> pods)
Pod encountered in the supplied Iterable of Pods for which the isReady(Pod)
method returns Boolean.TRUE, or null.
This method may return null.
pods - an Iterable of Pods to check; may be
null in which case null will be returnedPod known to be ready, or nullisReady(Pod),
Pod
conditions documentationpublic static final io.fabric8.kubernetes.api.model.Pod getFirstReadyPod(io.fabric8.kubernetes.api.model.PodList podList)
Pod encountered in the supplied PodList of Pods for which the isReady(Pod)
method returns Boolean.TRUE, or null.
This method may return null.
podList - a PodList of Pods to check; may be
null in which case null will be returnedPod known to be ready, or nullgetFirstReadyPod(Iterable),
isReady(Pod),
Pod
conditions documentationpublic static final io.fabric8.kubernetes.api.model.Pod getFirstReadyPod(io.fabric8.kubernetes.client.dsl.Listable<? extends io.fabric8.kubernetes.api.model.PodList> podsResource)
Pod reachable from the supplied Listable of PodLists for which the isReady(Pod)
method returns Boolean.TRUE, or null.
This method may return null.
podsResource - a Listable of PodLists
representing Pods to check; may be null in which
case null will be returnedPod known to be ready, or nullgetFirstReadyPod(PodList),
isReady(Pod),
Pod
conditions documentationCopyright © 2017–2019, MicroBean. All rights reserved.