new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java
public static boolean createDeployment(V1Deployment deployment) throws ApiException {
    String namespace = deployment.getMetadata().getNamespace();
    boolean status = false;
    try {
      AppsV1Api apiInstance = new AppsV1Api(apiClient);
      V1Deployment createdDeployment = apiInstance.createNamespacedDeployment(
              namespace, // String | namespace in which to create job
              deployment, // V1Deployment | body of the V1Deployment containing deployment data
              PRETTY, // String | pretty print output.
              null, // String | dry run or permanent change
              null // String | field manager who is making the change
      );
      if (createdDeployment != null) {
        status = true;
      }
    } catch (ApiException apex) {
      getLogger().severe(apex.getResponseBody());
      throw apex;
    }
    return status;
  }
/**
   * Create a deployment.
   *
   * @param deployment V1Deployment object containing deployment configuration data
   * @return true if creation was successful
   * @throws ApiException when create fails
   */
Create a deployment.
@param deployment V1Deployment object containing deployment configuration data
@return true if creation was successful
@throws ApiException when create fails
Create a deployment . @param deployment V1Deployment object containing deployment configuration data @return true if creation was successful @throws ApiException when create fails
public static boolean createDeployment(V1Deployment deployment) throws ApiException {
    String namespace = deployment.getMetadata().getNamespace();
    boolean status = false;
    try {
      AppsV1Api apiInstance = new AppsV1Api(apiClient);
      V1Deployment createdDeployment = apiInstance.createNamespacedDeployment(
              namespace, 
              deployment, 
              PRETTY, 
              null, 
              null 
      );
      if (createdDeployment != null) {
        status = true;
      }
    } catch (ApiException apex) {
      getLogger().severe(apex.getResponseBody());
      throw apex;
    }
    return status;
  }
public static boolean createDeployment ( V1Deployment deployment ) throws ApiException { String namespace = deployment . getMetadata ( ) . getNamespace ( ) ; boolean status = false ; try { AppsV1Api apiInstance = new AppsV1Api ( apiClient ) ; V1Deployment createdDeployment = apiInstance . createNamespacedDeployment ( namespace , deployment , PRETTY , null , null ) ; if ( createdDeployment != null ) { status = true ; } } catch ( ApiException apex ) { getLogger ( ) . severe ( apex . getResponseBody ( ) ) ; throw apex ; } return status ; }
Create a deployment.
Create a deployment .
// String | namespace in which to create job // V1Deployment | body of the V1Deployment containing deployment data // String | pretty print output. // String | dry run or permanent change // String | field manager who is making the change