new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMonitoringExporter.java
public static boolean installAndVerifyPodFromCustomImage(String dockerFileDir,
                                                String baseImageName,
                                                String namespace,
                                                String labelSelector,
                                                String secretName) throws ApiException {
    //build webhook image
    String imagePullPolicy = "IfNotPresent";
    if (!REPO_NAME.isEmpty()) {
      imagePullPolicy = "Always";
    }
    String image = createPushImage(dockerFileDir,baseImageName, namespace, secretName);
    logger.info("Installing {0} in namespace {1}", baseImageName, namespace);
    if (baseImageName.equalsIgnoreCase(("webhook"))) {
      webhookImage = image;
      createWebHook(webhookImage, imagePullPolicy, namespace, REPO_SECRET_NAME);
    } else if (baseImageName.contains("coordinator")) {
      coordinatorImage = image;
      createCoordinator(coordinatorImage, imagePullPolicy, namespace, "coordsecret");
    } else {
      throw new ApiException("Custom image creation for " + baseImageName + "is not supported");
    }
    // wait for the pod to be ready
    logger.info("Wait for the {0} pod is ready in namespace {1}", baseImageName, namespace);
    withStandardRetryPolicy
        .conditionEvaluationListener(
            condition -> logger.info("Waiting for {0} to be running in namespace {1} "
                    + "(elapsed time {2}ms, remaining time {3}ms)",
                baseImageName,
                namespace,
                condition.getElapsedTimeInMS(),
                condition.getRemainingTimeInMS()))
        .until(assertDoesNotThrow(() -> podIsReady(namespace, labelSelector, baseImageName),
            baseImageName + " podIsReady failed with ApiException"));
    return true;
  }
/**
   * Create, install  Webhook or Coordinator and wait up to five minutes until the pod is ready.
   *
   * @param dockerFileDir directory where dockerfile is located
   * @param baseImageName base image name
   * @param namespace namespace
   * @return status of installation
   */
Create, install  Webhook or Coordinator and wait up to five minutes until the pod is ready.
@param dockerFileDir directory where dockerfile is located
@param baseImageName base image name
@param namespace namespace
@return status of installation
Create install Webhook or Coordinator and wait up to five minutes until the pod is ready . @param dockerFileDir directory where dockerfile is located @param baseImageName base image name @param namespace namespace @return status of installation
public static boolean installAndVerifyPodFromCustomImage(String dockerFileDir,
                                                String baseImageName,
                                                String namespace,
                                                String labelSelector,
                                                String secretName) throws ApiException {
    String imagePullPolicy = "IfNotPresent";
    if (!REPO_NAME.isEmpty()) {
      imagePullPolicy = "Always";
    }
    String image = createPushImage(dockerFileDir,baseImageName, namespace, secretName);
    logger.info("Installing {0} in namespace {1}", baseImageName, namespace);
    if (baseImageName.equalsIgnoreCase(("webhook"))) {
      webhookImage = image;
      createWebHook(webhookImage, imagePullPolicy, namespace, REPO_SECRET_NAME);
    } else if (baseImageName.contains("coordinator")) {
      coordinatorImage = image;
      createCoordinator(coordinatorImage, imagePullPolicy, namespace, "coordsecret");
    } else {
      throw new ApiException("Custom image creation for " + baseImageName + "is not supported");
    }
    logger.info("Wait for the {0} pod is ready in namespace {1}", baseImageName, namespace);
    withStandardRetryPolicy
        .conditionEvaluationListener(
            condition -> logger.info("Waiting for {0} to be running in namespace {1} "
                    + "(elapsed time {2}ms, remaining time {3}ms)",
                baseImageName,
                namespace,
                condition.getElapsedTimeInMS(),
                condition.getRemainingTimeInMS()))
        .until(assertDoesNotThrow(() -> podIsReady(namespace, labelSelector, baseImageName),
            baseImageName + " podIsReady failed with ApiException"));
    return true;
  }
public static boolean installAndVerifyPodFromCustomImage ( String dockerFileDir , String baseImageName , String namespace , String labelSelector , String secretName ) throws ApiException { String imagePullPolicy = "IfNotPresent" ; if ( ! REPO_NAME . isEmpty ( ) ) { imagePullPolicy = "Always" ; } String image = createPushImage ( dockerFileDir , baseImageName , namespace , secretName ) ; logger . info ( "Installing {0} in namespace {1}" , baseImageName , namespace ) ; if ( baseImageName . equalsIgnoreCase ( ( "webhook" ) ) ) { webhookImage = image ; createWebHook ( webhookImage , imagePullPolicy , namespace , REPO_SECRET_NAME ) ; } else if ( baseImageName . contains ( "coordinator" ) ) { coordinatorImage = image ; createCoordinator ( coordinatorImage , imagePullPolicy , namespace , "coordsecret" ) ; } else { throw new ApiException ( "Custom image creation for " + baseImageName + "is not supported" ) ; } logger . info ( "Wait for the {0} pod is ready in namespace {1}" , baseImageName , namespace ) ; withStandardRetryPolicy . conditionEvaluationListener ( condition -> logger . info ( "Waiting for {0} to be running in namespace {1} " + "(elapsed time {2}ms, remaining time {3}ms)" , baseImageName , namespace , condition . getElapsedTimeInMS ( ) , condition . getRemainingTimeInMS ( ) ) ) . until ( assertDoesNotThrow ( ( ) -> podIsReady ( namespace , labelSelector , baseImageName ) , baseImageName + " podIsReady failed with ApiException" ) ) ; return true ; }
Create, install  Webhook or Coordinator and wait up to five minutes until the pod is ready.
Create install Webhook or Coordinator and wait up to five minutes until the pod is ready .
//build webhook image // wait for the pod to be ready