ALIYUN::ACS::ApplicationPod

更新时间:
复制为 MD 格式

ALIYUN::ACS::ApplicationPod类型用于创建应用Pod。

语法

{
  "Type": "ALIYUN::ACS::ApplicationPod",
  "Properties": {
    "CpuCoreNumber": String,
    "ComputeClass": String,
    "ComputeQos": String,
    "Image": String,
    "Kind": String,
    "Memory": Number,
    "DiskConfig": Map,
    "GpuModelSeries": String,
    "GpuCoreNumber": Number,
    "GpuType": String,
    "Replicas": Number,
    "ZoneId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ComputeClass

String

应用Pod的计算类别。

可选值:

  • general-purpose:通用型

  • performance:性能型gpu

ComputeQos

String

应用Pod的计算QoS(服务质量)。

可选值:

  • default(默认)

  • best-effort

CpuCoreNumber

String

容器所需的CPU核心数。

Image

String

应用Pod的容器镜像。

Kind

String

应用Pod的种类。

可选值:

  • Job

  • CronJob

  • Deployment

  • StatefulSet

Memory

Number

容器所需的内存大小。

(单位:GB)

DiskConfig

Map

应用Pod的磁盘配置。

更多信息,请参考DiskConfig属性

GpuCoreNumber

Number

如果使用GPU,则为GPU核心数。

GpuModelSeries

String

如果使用GPU,则为GPU型号系列。

GpuType

String

GPU类型。

默认为nvidia.com/gpu。

Replicas

Number

DeploymentStatefulSet的副本数。

ZoneId

String

应用Pod所在的可用区ID。

DiskConfig语法

"DiskConfig": {
  "PerformanceLevel": String,
  "Size": Number,
  "DiskCategory": String
}

DiskConfig属性

属性名称

类型

必须

允许更新

描述

约束

DiskCategory

String

磁盘类别。

例如:cloud_essd。

Size

Number

磁盘大小

单位:MB。

PerformanceLevel

String

ESSD磁盘的性能级别。

例如:PL2。

返回值

Fn::GetAtt

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CpuCoreNumber:
    Type: String
    Description:
      en: CPU core number required by the container.
      zh: 容器所需的CPU核心数。
    Required: true
  Memory:
    Type: Number
    Description:
      en: Memory size (in GB) required by the container.
      zh: 容器所需的内存大小(单位:GB)。
    Required: true
  Kind:
    Type: String
    Description:
      en: Kind of the application pod (Job, CronJob, Deployment, StatefulSet).
      zh: 应用Pod的种类(Job、CronJob、Deployment、StatefulSet)。
    AllowedValues:
      - Job
      - CronJob
      - Deployment
      - StatefulSet
    Required: true
  ComputeClass:
    Type: String
    Description:
      en: Compute class of the application pod.
      zh: 应用Pod的计算类别。
    AllowedValues:
      - general-purpose
      - performance
      - gpu
    Required: true
  ComputeQos:
    Type: String
    Description:
      en: Compute QoS of the application pod.
      zh: 应用Pod的计算QoS(服务质量)。
    AllowedValues:
      - default
      - best-effort
    Required: true
  Image:
    Type: String
    Description:
      en: Container image for the application pod.
      zh: 应用Pod的容器镜像。
    Required: true
Resources:
  ApplicationPod:
    Type: ALIYUN::ACS::ApplicationPod
    Properties:
      CpuCoreNumber:
        Ref: CpuCoreNumber
      Memory:
        Ref: Memory
      Kind:
        Ref: Kind
      ComputeClass:
        Ref: ComputeClass
      ComputeQos:
        Ref: ComputeQos
      Image:
        Ref: Image
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CpuCoreNumber": {
      "Type": "String",
      "Description": {
        "en": "CPU core number required by the container.",
        "zh": "容器所需的CPU核心数。"
      },
      "Required": true
    },
    "Memory": {
      "Type": "Number",
      "Description": {
        "en": "Memory size (in GB) required by the container.",
        "zh": "容器所需的内存大小(单位:GB)。"
      },
      "Required": true
    },
    "Kind": {
      "Type": "String",
      "Description": {
        "en": "Kind of the application pod (Job, CronJob, Deployment, StatefulSet).",
        "zh": "应用Pod的种类(Job、CronJob、Deployment、StatefulSet)。"
      },
      "AllowedValues": [
        "Job",
        "CronJob",
        "Deployment",
        "StatefulSet"
      ],
      "Required": true
    },
    "ComputeClass": {
      "Type": "String",
      "Description": {
        "en": "Compute class of the application pod.",
        "zh": "应用Pod的计算类别。"
      },
      "AllowedValues": [
        "general-purpose",
        "performance",
        "gpu"
      ],
      "Required": true
    },
    "ComputeQos": {
      "Type": "String",
      "Description": {
        "en": "Compute QoS of the application pod.",
        "zh": "应用Pod的计算QoS(服务质量)。"
      },
      "AllowedValues": [
        "default",
        "best-effort"
      ],
      "Required": true
    },
    "Image": {
      "Type": "String",
      "Description": {
        "en": "Container image for the application pod.",
        "zh": "应用Pod的容器镜像。"
      },
      "Required": true
    }
  },
  "Resources": {
    "ApplicationPod": {
      "Type": "ALIYUN::ACS::ApplicationPod",
      "Properties": {
        "CpuCoreNumber": {
          "Ref": "CpuCoreNumber"
        },
        "Memory": {
          "Ref": "Memory"
        },
        "Kind": {
          "Ref": "Kind"
        },
        "ComputeClass": {
          "Ref": "ComputeClass"
        },
        "ComputeQos": {
          "Ref": "ComputeQos"
        },
        "Image": {
          "Ref": "Image"
        }
      }
    }
  }
}