public final class Pods extends Object
Pod
s.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 Pod s 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 PodList s 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 Pod s 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
PodCondition s 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 PodList
s; 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-null
MalformedURLException
- 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
MalformedURLException
public 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
PodCondition
s contains a PodCondition
whose
PodCondition.getType()
method returns Ready
and
whose PodCondition.getStatus()
method returns True
.
If the supplied Iterable
of
PodCondition
s 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
PodCondition
s 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 PodCondition
s; may be null
in which case null
will be returnedBoolean.TRUE
if the supplied Iterable
of
PodCondition
s represents a state of affairs known to
represent the readiness of the PodStatus
they describe;
Boolean.FALSE
if the supplied Iterable
of PodCondition
s 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 Pod
s for which the isReady(Pod)
method returns Boolean.TRUE
, or null
.
This method may return null
.
pods
- an Iterable
of Pod
s to check; may be
null
in which case null
will be returnedPod
known to be ready, or null
isReady(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 Pod
s for which the isReady(Pod)
method returns Boolean.TRUE
, or null
.
This method may return null
.
podList
- a PodList
of Pod
s to check; may be
null
in which case null
will be returnedPod
known to be ready, or null
getFirstReadyPod(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 PodList
s for which the isReady(Pod)
method returns Boolean.TRUE
, or null
.
This method may return null
.
podsResource
- a Listable
of PodList
s
representing Pod
s to check; may be null
in which
case null
will be returnedPod
known to be ready, or null
getFirstReadyPod(PodList)
,
isReady(Pod)
,
Pod
conditions documentationCopyright © 2017–2019, MicroBean. All rights reserved.