Class Readiness
- java.lang.Object
-
- io.fabric8.kubernetes.client.internal.readiness.Readiness
-
public class Readiness extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
READINESS_APPLICABLE_RESOURCES
-
Constructor Summary
Constructors Constructor Description Readiness()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Readiness
getInstance()
protected String
getReadinessResourcesList()
static boolean
isDeploymentReady(io.fabric8.kubernetes.api.model.apps.Deployment d)
static boolean
isEndpointsReady(io.fabric8.kubernetes.api.model.Endpoints e)
static boolean
isExtensionsDeploymentReady(io.fabric8.kubernetes.api.model.extensions.Deployment d)
static boolean
isNodeReady(io.fabric8.kubernetes.api.model.Node node)
static boolean
isPodReady(io.fabric8.kubernetes.api.model.Pod pod)
protected boolean
isReadinessApplicable(io.fabric8.kubernetes.api.model.HasMetadata item)
boolean
isReady(io.fabric8.kubernetes.api.model.HasMetadata item)
Checks if the providedHasMetadata
is marked as ready by the cluster.static boolean
isReplicaSetReady(io.fabric8.kubernetes.api.model.apps.ReplicaSet r)
static boolean
isReplicationControllerReady(io.fabric8.kubernetes.api.model.ReplicationController r)
protected boolean
isResourceReady(io.fabric8.kubernetes.api.model.HasMetadata item)
static boolean
isStatefulSetReady(io.fabric8.kubernetes.api.model.apps.StatefulSet ss)
-
-
-
Field Detail
-
READINESS_APPLICABLE_RESOURCES
protected static final String READINESS_APPLICABLE_RESOURCES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static Readiness getInstance()
-
isReady
public boolean isReady(io.fabric8.kubernetes.api.model.HasMetadata item)
Checks if the providedHasMetadata
is marked as ready by the cluster.A "Readiable" resources is a subjective trait for Kubernetes Resources. Many Resources, such as ConfigMaps, Secrets, etc. become ready as soon as they've been created in the cluster.
However, other resources such as Pods, Endpoints, Deployments, and controllers in general, only become ready when their desired state matches their actual state.
This method returns true for those "Readiable" resources once they are considered ready (even if the resource exists in the cluster). For "non-Readiable" resources, this method returns true once the resources are created in the cluster (in addition it logs a warning stating that the given resource is not considered "Readiable").
- Parameters:
item
- resource to be checked for Readiness.- Returns:
- true if it's a Readiable Resource and is ready, or it's a non-readiable resource and has been created. false otherwise.
-
isReadinessApplicable
protected boolean isReadinessApplicable(io.fabric8.kubernetes.api.model.HasMetadata item)
-
isResourceReady
protected boolean isResourceReady(io.fabric8.kubernetes.api.model.HasMetadata item)
-
getReadinessResourcesList
protected String getReadinessResourcesList()
-
isStatefulSetReady
public static boolean isStatefulSetReady(io.fabric8.kubernetes.api.model.apps.StatefulSet ss)
-
isDeploymentReady
public static boolean isDeploymentReady(io.fabric8.kubernetes.api.model.apps.Deployment d)
-
isExtensionsDeploymentReady
public static boolean isExtensionsDeploymentReady(io.fabric8.kubernetes.api.model.extensions.Deployment d)
-
isReplicaSetReady
public static boolean isReplicaSetReady(io.fabric8.kubernetes.api.model.apps.ReplicaSet r)
-
isReplicationControllerReady
public static boolean isReplicationControllerReady(io.fabric8.kubernetes.api.model.ReplicationController r)
-
isEndpointsReady
public static boolean isEndpointsReady(io.fabric8.kubernetes.api.model.Endpoints e)
-
isPodReady
public static boolean isPodReady(io.fabric8.kubernetes.api.model.Pod pod)
-
isNodeReady
public static boolean isNodeReady(io.fabric8.kubernetes.api.model.Node node)
-
-