new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java
public static boolean createSecret(V1Secret secret) throws ApiException {
    if (secret == null) {
      throw new IllegalArgumentException(
              "Parameter 'secret' cannot be null when calling createSecret()");
    }

    if (secret.getMetadata() == null) {
      throw new IllegalArgumentException(
              "'metadata' field of the parameter 'secret' cannot be null when calling createSecret()");
    }

    if (secret.getMetadata().getNamespace() == null) {
      throw new IllegalArgumentException(
              "'namespace' field in the metadata cannot be null when calling createSecret()");
    }

    String namespace = secret.getMetadata().getNamespace();

    V1Secret v1Secret;
    try {
      v1Secret = coreV1Api.createNamespacedSecret(
              namespace, // name of the Namespace
              secret, // secret configuration data
              PRETTY, // pretty print output
              null, // indicates that modifications should not be persisted
              null // fieldManager is a name associated with the actor
      );
    } catch (ApiException apex) {
      getLogger().severe(apex.getResponseBody());
      throw apex;
    }

    return true;
  }
/**
   * Create a Kubernetes Secret.
   *
   * @param secret V1Secret object containing Kubernetes secret configuration data
   * @return true if successful
   * @throws ApiException if Kubernetes client API call fails
   */
Create a Kubernetes Secret.
@param secret V1Secret object containing Kubernetes secret configuration data
@return true if successful
@throws ApiException if Kubernetes client API call fails
Create a Kubernetes Secret . @param secret V1Secret object containing Kubernetes secret configuration data @return true if successful @throws ApiException if Kubernetes client API call fails
public static boolean createSecret(V1Secret secret) throws ApiException {
    if (secret == null) {
      throw new IllegalArgumentException(
              "Parameter 'secret' cannot be null when calling createSecret()");
    }
    if (secret.getMetadata() == null) {
      throw new IllegalArgumentException(
              "'metadata' field of the parameter 'secret' cannot be null when calling createSecret()");
    }
    if (secret.getMetadata().getNamespace() == null) {
      throw new IllegalArgumentException(
              "'namespace' field in the metadata cannot be null when calling createSecret()");
    }
    String namespace = secret.getMetadata().getNamespace();
    V1Secret v1Secret;
    try {
      v1Secret = coreV1Api.createNamespacedSecret(
              namespace, 
              secret, 
              PRETTY, 
              null, 
              null 
      );
    } catch (ApiException apex) {
      getLogger().severe(apex.getResponseBody());
      throw apex;
    }
    return true;
  }
public static boolean createSecret ( V1Secret secret ) throws ApiException { if ( secret == null ) { throw new IllegalArgumentException ( "Parameter 'secret' cannot be null when calling createSecret()" ) ; } if ( secret . getMetadata ( ) == null ) { throw new IllegalArgumentException ( "'metadata' field of the parameter 'secret' cannot be null when calling createSecret()" ) ; } if ( secret . getMetadata ( ) . getNamespace ( ) == null ) { throw new IllegalArgumentException ( "'namespace' field in the metadata cannot be null when calling createSecret()" ) ; } String namespace = secret . getMetadata ( ) . getNamespace ( ) ; V1Secret v1Secret ; try { v1Secret = coreV1Api . createNamespacedSecret ( namespace , secret , PRETTY , null , null ) ; } catch ( ApiException apex ) { getLogger ( ) . severe ( apex . getResponseBody ( ) ) ; throw apex ; } return true ; }
Create a Kubernetes Secret.
Create a Kubernetes Secret .
// name of the Namespace // secret configuration data // pretty print output // indicates that modifications should not be persisted // fieldManager is a name associated with the actor