public class Readiness extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
READINESS_APPLICABLE_RESOURCES |
Constructor and Description |
---|
Readiness() |
Modifier and Type | Method and 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 provided
HasMetadata 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) |
protected static final String READINESS_APPLICABLE_RESOURCES
public static Readiness getInstance()
public boolean isReady(io.fabric8.kubernetes.api.model.HasMetadata item)
HasMetadata
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").
item
- resource to be checked for Readiness.protected boolean isReadinessApplicable(io.fabric8.kubernetes.api.model.HasMetadata item)
protected boolean isResourceReady(io.fabric8.kubernetes.api.model.HasMetadata item)
protected String getReadinessResourcesList()
public static boolean isStatefulSetReady(io.fabric8.kubernetes.api.model.apps.StatefulSet ss)
public static boolean isDeploymentReady(io.fabric8.kubernetes.api.model.apps.Deployment d)
public static boolean isExtensionsDeploymentReady(io.fabric8.kubernetes.api.model.extensions.Deployment d)
public static boolean isReplicaSetReady(io.fabric8.kubernetes.api.model.apps.ReplicaSet r)
public static boolean isReplicationControllerReady(io.fabric8.kubernetes.api.model.ReplicationController r)
public static boolean isEndpointsReady(io.fabric8.kubernetes.api.model.Endpoints e)
public static boolean isPodReady(io.fabric8.kubernetes.api.model.Pod pod)
public static boolean isNodeReady(io.fabric8.kubernetes.api.model.Node node)
Copyright © 2015–2020 Red Hat. All rights reserved.