Class Readiness


  • public class Readiness
    extends Object
    • Constructor Detail

      • Readiness

        public Readiness()
    • Method Detail

      • getInstance

        public static Readiness getInstance()
      • isReady

        public boolean isReady​(io.fabric8.kubernetes.api.model.HasMetadata item)
        Checks if the provided 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").

        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)