new-integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/Kubernetes.java
public static boolean isDeploymentReady(String deploymentName,
                                          Map<String, String> label,
                                          String namespace) throws ApiException {
    boolean status = false;
    V1Deployment deployment = getDeployment(deploymentName, label, namespace);
    if (deployment != null) {
      // get the deploymentCondition with the 'Available' type field
      V1DeploymentCondition v1DeploymentRunningCondition = deployment.getStatus().getConditions().stream()
              .filter(v1DeploymentCondition -> "Available".equals(v1DeploymentCondition.getType()))
              .findAny()
              .orElse(null);

      if (v1DeploymentRunningCondition != null) {
        status = v1DeploymentRunningCondition.getStatus().equalsIgnoreCase("true");
      }
    } else {
      getLogger().info("Deployment doesn't exist");
    }
    return status;
  }
/**
   * Checks if an deployment is running in a given namespace.
   * @param deploymentName name of deployment to check
   * @param label set of deployment labels
   * @param namespace in which to check for the pod existence
   * @return true if deployment exists and available otherwise false
   * @throws ApiException when there is error in querying the cluster
   */
Checks if an deployment is running in a given namespace.
Checks if an deployment is running in a given namespace .
public static boolean isDeploymentReady(String deploymentName,
                                          Map<String, String> label,
                                          String namespace) throws ApiException {
    boolean status = false;
    V1Deployment deployment = getDeployment(deploymentName, label, namespace);
    if (deployment != null) {
      V1DeploymentCondition v1DeploymentRunningCondition = deployment.getStatus().getConditions().stream()
              .filter(v1DeploymentCondition -> "Available".equals(v1DeploymentCondition.getType()))
              .findAny()
              .orElse(null);
      if (v1DeploymentRunningCondition != null) {
        status = v1DeploymentRunningCondition.getStatus().equalsIgnoreCase("true");
      }
    } else {
      getLogger().info("Deployment doesn't exist");
    }
    return status;
  }
public static boolean isDeploymentReady ( String deploymentName , Map < String , String > label , String namespace ) throws ApiException { boolean status = false ; V1Deployment deployment = getDeployment ( deploymentName , label , namespace ) ; if ( deployment != null ) { V1DeploymentCondition v1DeploymentRunningCondition = deployment . getStatus ( ) . getConditions ( ) . stream ( ) . filter ( v1DeploymentCondition -> "Available" . equals ( v1DeploymentCondition . getType ( ) ) ) . findAny ( ) . orElse ( null ) ; if ( v1DeploymentRunningCondition != null ) { status = v1DeploymentRunningCondition . getStatus ( ) . equalsIgnoreCase ( "true" ) ; } } else { getLogger ( ) . info ( "Deployment doesn't exist" ) ; } return status ; }
Checks if an deployment is running in a given namespace.
Checks if an deployment is running in a given namespace .
// get the deploymentCondition with the 'Available' type field