public static boolean isPodReady ( Pod pod ) { if ( ! isPodRunning ( pod ) ) { return false ; } PodStatus podStatus = pod . getStatus ( ) ; if ( podStatus == null ) { return true ; } List < PodCondition > conditions = podStatus . getConditions ( ) ; if ( conditions == null || conditions . isEmpty ( ) ) { return true ; } // Check "ready" condition for ( PodCondition condition : conditions ) { if ( "ready" . equalsIgnoreCase ( condition . getType ( ) ) ) { return Boolean . parseBoolean ( condition . getStatus ( ) ) ; } } return true ; }
Returns true if the pod is running and ready