Skip to content

K8sApplicationProps

Properties for defining a K8sApplication.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-edas-k8sapplication

Initializer

import com.aliyun.ros.cdk.edas.K8sApplicationProps;
K8sApplicationProps.builder()
    .appName(java.lang.String)
    .appName(IResolvable)
    .clusterId(java.lang.String)
    .clusterId(IResolvable)
//  .applicationDescription(java.lang.String)
//  .applicationDescription(IResolvable)
//  .command(java.lang.String)
//  .command(IResolvable)
//  .commandArgs(IResolvable)
//  .commandArgs(java.util.List<IResolvable)
//  .commandArgs(CommandArgsProperty>)
//  .deployAcrossNodes(java.lang.Boolean)
//  .deployAcrossNodes(IResolvable)
//  .deployAcrossZones(java.lang.Boolean)
//  .deployAcrossZones(IResolvable)
//  .edasContainerVersion(java.lang.String)
//  .edasContainerVersion(IResolvable)
//  .enableAhas(java.lang.Boolean)
//  .enableAhas(IResolvable)
//  .envs(IResolvable)
//  .envs(java.util.List<IResolvable)
//  .envs(EnvsProperty>)
//  .imageUrl(java.lang.String)
//  .imageUrl(IResolvable)
//  .internetSlbId(java.lang.String)
//  .internetSlbId(IResolvable)
//  .internetSlbPort(java.lang.Number)
//  .internetSlbPort(IResolvable)
//  .internetSlbProtocol(java.lang.String)
//  .internetSlbProtocol(IResolvable)
//  .internetTargetPort(java.lang.Number)
//  .internetTargetPort(IResolvable)
//  .intranetSlbId(java.lang.String)
//  .intranetSlbId(IResolvable)
//  .intranetSlbPort(java.lang.Number)
//  .intranetSlbPort(IResolvable)
//  .intranetSlbProtocol(java.lang.String)
//  .intranetSlbProtocol(IResolvable)
//  .intranetTargetPort(java.lang.Number)
//  .intranetTargetPort(IResolvable)
//  .isMultilingualApp(java.lang.Boolean)
//  .isMultilingualApp(IResolvable)
//  .javaStartUpConfig(IResolvable)
//  .javaStartUpConfig(JavaStartUpConfigProperty)
//  .jdk(java.lang.String)
//  .jdk(IResolvable)
//  .limitCpu(java.lang.Number)
//  .limitCpu(IResolvable)
//  .limitMem(java.lang.Number)
//  .limitMem(IResolvable)
//  .liveness(IResolvable)
//  .liveness(LivenessProperty)
//  .localVolume(IResolvable)
//  .localVolume(java.util.List<IResolvable)
//  .localVolume(LocalVolumeProperty>)
//  .logicalRegionId(java.lang.String)
//  .logicalRegionId(IResolvable)
//  .mountDescs(IResolvable)
//  .mountDescs(java.util.List<IResolvable)
//  .mountDescs(MountDescsProperty>)
//  .namespace(java.lang.String)
//  .namespace(IResolvable)
//  .nasId(java.lang.String)
//  .nasId(IResolvable)
//  .packageType(java.lang.String)
//  .packageType(IResolvable)
//  .packageUrl(java.lang.String)
//  .packageUrl(IResolvable)
//  .packageVersion(java.lang.String)
//  .packageVersion(IResolvable)
//  .postStart(IResolvable)
//  .postStart(PostStartProperty)
//  .preStop(IResolvable)
//  .preStop(PreStopProperty)
//  .readiness(IResolvable)
//  .readiness(ReadinessProperty)
//  .replicas(java.lang.Number)
//  .replicas(IResolvable)
//  .repoId(java.lang.String)
//  .repoId(IResolvable)
//  .requestsCpu(java.lang.Number)
//  .requestsCpu(IResolvable)
//  .requestsMem(java.lang.Number)
//  .requestsMem(IResolvable)
//  .runtimeClassName(java.lang.String)
//  .runtimeClassName(IResolvable)
//  .slsConfigs(IResolvable)
//  .slsConfigs(java.util.List<IResolvable)
//  .slsConfigs(SlsConfigsProperty>)
//  .storageType(java.lang.String)
//  .storageType(IResolvable)
//  .timeout(java.lang.Number)
//  .timeout(IResolvable)
//  .uriEncoding(java.lang.String)
//  .uriEncoding(IResolvable)
//  .useBodyEncoding(java.lang.Boolean)
//  .useBodyEncoding(IResolvable)
//  .webContainer(java.lang.String)
//  .webContainer(IResolvable)
//  .webContainerConfig(IResolvable)
//  .webContainerConfig(WebContainerConfigProperty)
    .build();

Properties

Name Type Description
appName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property appName: The name of the application.
clusterId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property clusterId: The cluster ID.
applicationDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property applicationDescription: The description of the application.
command java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property command: The command that is specified.
commandArgs com.aliyun.ros.cdk.core.IResolvable OR java.util.ListCommandArgsProperty> Property commandArgs: The collection of commands.
deployAcrossNodes java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property deployAcrossNodes: Specifies whether to distribute application instances to multiple nodes.
deployAcrossZones java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property deployAcrossZones: Specifies whether to distribute application instances to multiple zones.
edasContainerVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property edasContainerVersion: The version of EDAS Container on which the deployment package of the application depends.
enableAhas java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property enableAhas: Specifies whether to enable access to Application High Availability Service (AHAS).
envs com.aliyun.ros.cdk.core.IResolvable OR java.util.ListEnvsProperty> Property envs: The collection of deployment environment variables.
imageUrl java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property imageUrl: The image URL.
internetSlbId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property internetSlbId: The ID of the Internet-facing SLB instance.
internetSlbPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property internetSlbPort: The frontend port of the Internet-facing SLB instance.
internetSlbProtocol java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property internetSlbProtocol: The protocol of the Internet-facing SLB instance.
internetTargetPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property internetTargetPort: The backend port of the internal-facing SLB instance, which is also the service port of the application.
intranetSlbId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property intranetSlbId: The ID of the internal-facing SLB instance.
intranetSlbPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property intranetSlbPort: The frontend port of the internal-facing SLB instance.
intranetSlbProtocol java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property intranetSlbProtocol: The protocol of the internal-facing SLB instance.
intranetTargetPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property intranetTargetPort: The backend port of the internal-facing Server Load Balancer (SLB) instance, which is also the service port of the application.
isMultilingualApp java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property isMultilingualApp: Specifies whether the application is a multi-language application.
javaStartUpConfig com.aliyun.ros.cdk.core.IResolvable OR JavaStartUpConfigProperty Property javaStartUpConfig: The configuration of Java startup parameters for a Java application.
jdk java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property jdk: The version of Java Development Kit (JDK) on which the deployment package of the application depends.
limitCpu java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property limitCpu: The maximum number of CPUs allowed for each application instance when the application is running.
limitMem java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property limitMem: The maximum amount of memory allowed for each application instance when the application is running.
liveness com.aliyun.ros.cdk.core.IResolvable OR LivenessProperty Property liveness: The liveness check on the container.
localVolume com.aliyun.ros.cdk.core.IResolvable OR java.util.ListLocalVolumeProperty> Property localVolume: The configuration for mounting host files to the container where the application is running.
logicalRegionId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property logicalRegionId: The ID of the EDAS namespace.
mountDescs com.aliyun.ros.cdk.core.IResolvable OR java.util.ListMountDescsProperty> Property mountDescs: The description of the NAS mounting configuration.
namespace java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property namespace: The namespace of the Kubernetes cluster.
nasId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property nasId: The ID of the Network Attached Storage (NAS) file system mounted to the container where the application is running.
packageType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property packageType: The type of the deployment package.
packageUrl java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property packageUrl: The URL of the deployment package.
packageVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property packageVersion: The version of the deployment package.
postStart com.aliyun.ros.cdk.core.IResolvable OR PostStartProperty Property postStart: The post-start script.
preStop com.aliyun.ros.cdk.core.IResolvable OR PreStopProperty Property preStop: The pre-stop script.
readiness com.aliyun.ros.cdk.core.IResolvable OR ReadinessProperty Property readiness: The readiness check on the container.
replicas java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property replicas: The number of instances for the application that you want to create.
repoId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property repoId: The ID of the image repository.
requestsCpu java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property requestsCpu: The maximum number of CPUs allowed for each application instance when the application is created.
requestsMem java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property requestsMem: The maximum amount of memory allowed for each application instance when the application is created.
runtimeClassName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property runtimeClassName: The type of the container runtime.
slsConfigs com.aliyun.ros.cdk.core.IResolvable OR java.util.ListSlsConfigsProperty> Property slsConfigs: The Logstore configurations.
storageType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property storageType: Only SSD is supported.
timeout java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property timeout: The timeout interval of the change process.
uriEncoding java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property uriEncoding: The uniform resource identifier (URI) encoding scheme.
useBodyEncoding java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property useBodyEncoding: Specifies whether useBodyEncodingForURI is enabled.
webContainer java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property webContainer: The version of the Tomcat container on which the deployment package of the application depends.
webContainerConfig com.aliyun.ros.cdk.core.IResolvable OR WebContainerConfigProperty Property webContainerConfig: The Tomcat container configuration.

appNameRequired

public java.lang.Object getAppName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property appName: The name of the application.

The name must start with a letter and can contain digits, letters, and hyphens (-). It can be up to 36 characters in length.


clusterIdRequired

public java.lang.Object getClusterId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property clusterId: The cluster ID.

You can query the cluster ID by calling the ListCluster operation. For more information, see ListCluster.


applicationDescriptionOptional

public java.lang.Object getApplicationDescription();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property applicationDescription: The description of the application.


commandOptional

public java.lang.Object getCommand();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property command: The command that is specified.

If it is specified, it replaces the startup command in the image when the image is started.


commandArgsOptional

public java.lang.Object getCommandArgs();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListCommandArgsProperty>

Property commandArgs: The collection of commands.

For example, [{"argument":"-c"},{"argument":"test"}], where -c and test are two parameters that can be set.


deployAcrossNodesOptional

public java.lang.Object getDeployAcrossNodes();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property deployAcrossNodes: Specifies whether to distribute application instances to multiple nodes.

The value true indicates yes, whereas other values indicate no.


deployAcrossZonesOptional

public java.lang.Object getDeployAcrossZones();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property deployAcrossZones: Specifies whether to distribute application instances to multiple zones.

The value true indicates yes, whereas other values indicate no.


edasContainerVersionOptional

public java.lang.Object getEdasContainerVersion();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property edasContainerVersion: The version of EDAS Container on which the deployment package of the application depends.

Note This parameter is not supported when you deploy an application by using images.


enableAhasOptional

public java.lang.Object getEnableAhas();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property enableAhas: Specifies whether to enable access to Application High Availability Service (AHAS).


envsOptional

public java.lang.Object getEnvs();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListEnvsProperty>

Property envs: The collection of deployment environment variables.

For example, [{"Name":"x","Value":"y"},{"Name":"x2","Value":"y2"}].


imageUrlOptional

public java.lang.Object getImageUrl();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property imageUrl: The image URL.

When PackageType is set to Image, this parameter is required.


internetSlbIdOptional

public java.lang.Object getInternetSlbId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property internetSlbId: The ID of the Internet-facing SLB instance.

If this parameter is not specified, EDAS automatically purchases a new SLB instance for you.


internetSlbPortOptional

public java.lang.Object getInternetSlbPort();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property internetSlbPort: The frontend port of the Internet-facing SLB instance.

Valid values: 1 to 65535.


internetSlbProtocolOptional

public java.lang.Object getInternetSlbProtocol();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property internetSlbProtocol: The protocol of the Internet-facing SLB instance.

Valid values: TCP, HTTP, and HTTPS.


internetTargetPortOptional

public java.lang.Object getInternetTargetPort();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property internetTargetPort: The backend port of the internal-facing SLB instance, which is also the service port of the application.

Valid values: 1 to 65535.


intranetSlbIdOptional

public java.lang.Object getIntranetSlbId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property intranetSlbId: The ID of the internal-facing SLB instance.

If this parameter is not specified, Enterprise Distributed Application Service (EDAS) automatically purchases a new SLB instance for you.


intranetSlbPortOptional

public java.lang.Object getIntranetSlbPort();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property intranetSlbPort: The frontend port of the internal-facing SLB instance.

Valid values: 1 to 65535.


intranetSlbProtocolOptional

public java.lang.Object getIntranetSlbProtocol();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property intranetSlbProtocol: The protocol of the internal-facing SLB instance.

Valid values: TCP, HTTP, and HTTPS.


intranetTargetPortOptional

public java.lang.Object getIntranetTargetPort();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property intranetTargetPort: The backend port of the internal-facing Server Load Balancer (SLB) instance, which is also the service port of the application.

Valid values: 1 to 65535.


isMultilingualAppOptional

public java.lang.Object getIsMultilingualApp();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property isMultilingualApp: Specifies whether the application is a multi-language application.


javaStartUpConfigOptional

public java.lang.Object getJavaStartUpConfig();

Property javaStartUpConfig: The configuration of Java startup parameters for a Java application.

These startup parameters involve the memory, application, garbage collection (GC) policy, tools, service registration and discovery, and custom configurations. Proper parameter settings help reduce the GC overhead, shorten the server response time, and improve the throughput. The system automatically concatenates all startup values as the configuration of Java startup parameters for the application.


jdkOptional

public java.lang.Object getJdk();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property jdk: The version of Java Development Kit (JDK) on which the deployment package of the application depends.

Valid values: Open JDK 7 and Open JDK 8. This parameter is not supported when you deploy an application by using images.


limitCpuOptional

public java.lang.Object getLimitCpu();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property limitCpu: The maximum number of CPUs allowed for each application instance when the application is running.

Unit: cores.


limitMemOptional

public java.lang.Object getLimitMem();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property limitMem: The maximum amount of memory allowed for each application instance when the application is running.

Unit: MB.


livenessOptional

public java.lang.Object getLiveness();

Property liveness: The liveness check on the container.


localVolumeOptional

public java.lang.Object getLocalVolume();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListLocalVolumeProperty>

Property localVolume: The configuration for mounting host files to the container where the application is running.

For example, the value can be [{"type":"", "nodePath":"/localfiles", "mountPath":"/app/files"}, {"type":"Directory", "nodePath":"/mnt", "mountPath":"/app/storage"}].


logicalRegionIdOptional

public java.lang.Object getLogicalRegionId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property logicalRegionId: The ID of the EDAS namespace.

This parameter is required for a non-default namespace.


mountDescsOptional

public java.lang.Object getMountDescs();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListMountDescsProperty>

Property mountDescs: The description of the NAS mounting configuration.

For example, the value can be [{"NasPath": "/k8s","MountPath": "/mnt"}, {"NasPath": "/files", "MountPath": "/app/files"}].


namespaceOptional

public java.lang.Object getNamespace();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property namespace: The namespace of the Kubernetes cluster.

This parameter determines the Kubernetes namespace where your application is deployed. By default, this parameter is set to default.


nasIdOptional

public java.lang.Object getNasId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property nasId: The ID of the Network Attached Storage (NAS) file system mounted to the container where the application is running.

The NAS file system must be in the same region as the cluster. The NAS file system must have an available mount target, or have a mount target on the vSwitch in the virtual private cloud (VPC) where the application is located. If this parameter is not specified and the mountDescs field exists, a NAS file system is automatically purchased and mounted to the vSwitch in the VPC by default.


packageTypeOptional

public java.lang.Object getPackageType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property packageType: The type of the deployment package.

Valid values: FatJar, WAR, and Image.


packageUrlOptional

public java.lang.Object getPackageUrl();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property packageUrl: The URL of the deployment package.

This parameter must be set for the applications that are deployed by using FatJar or WAR packages. Note The version of SDK for Java or Python must be 2.44.0 or later.


packageVersionOptional

public java.lang.Object getPackageVersion();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property packageVersion: The version of the deployment package.

This parameter is required when the PackageType parameter is set to WAR or FatJar. You must specify a version. Note The version of SDK for Java or Python must be 2.44.0 or later.


postStartOptional

public java.lang.Object getPostStart();

Property postStart: The post-start script.

For example, {"Exec": {"Command": ["ls", "/"]}}.


preStopOptional

public java.lang.Object getPreStop();

Property preStop: The pre-stop script.

For example, {"Exec": {"Command": ["ls", "/"]}}.


readinessOptional

public java.lang.Object getReadiness();

Property readiness: The readiness check on the container.


replicasOptional

public java.lang.Object getReplicas();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property replicas: The number of instances for the application that you want to create.

Default: 1


repoIdOptional

public java.lang.Object getRepoId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property repoId: The ID of the image repository.


requestsCpuOptional

public java.lang.Object getRequestsCpu();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property requestsCpu: The maximum number of CPUs allowed for each application instance when the application is created.

Unit: cores. The value 0 indicates no limit.


requestsMemOptional

public java.lang.Object getRequestsMem();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property requestsMem: The maximum amount of memory allowed for each application instance when the application is created.

Unit: MB. The value 0 indicates no limit.


runtimeClassNameOptional

public java.lang.Object getRuntimeClassName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property runtimeClassName: The type of the container runtime.

This parameter is applicable only to clusters that use sandboxed containers.


slsConfigsOptional

public java.lang.Object getSlsConfigs();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListSlsConfigsProperty>

Property slsConfigs: The Logstore configurations.


storageTypeOptional

public java.lang.Object getStorageType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property storageType: Only SSD is supported.


timeoutOptional

public java.lang.Object getTimeout();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property timeout: The timeout interval of the change process.

Unit: seconds.


uriEncodingOptional

public java.lang.Object getUriEncoding();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property uriEncoding: The uniform resource identifier (URI) encoding scheme.

Valid values: ISO-8859-1, GBK, GB2312, and UTF-8. Note If this parameter is not specified in application configuration, the default URI encoding scheme in the Tomcat container is applied.


useBodyEncodingOptional

public java.lang.Object getUseBodyEncoding();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property useBodyEncoding: Specifies whether useBodyEncodingForURI is enabled.

Note If this parameter is not specified in application configuration, the default value false is applied.


webContainerOptional

public java.lang.Object getWebContainer();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property webContainer: The version of the Tomcat container on which the deployment package of the application depends.

This parameter is applicable to Spring Cloud and Apache Dubbo applications that are deployed by using WAR packages. This parameter is not supported when you deploy an application by using images.


webContainerConfigOptional

public java.lang.Object getWebContainerConfig();

Property webContainerConfig: The Tomcat container configuration.