全部产品
Search
文档中心

资源编排:ALIYUN::CS::ApplicationDeployment

更新时间:Dec 05, 2024

ALIYUN::CS::ApplicationDeployment类型用于进行应用部署。

语法

{
  "Type": "ALIYUN::CS::ApplicationDeployment",
  "Properties": {
    "ClusterId": String,
    "ChartUrl": String,
    "Namespace": String,
    "Name": String,
    "Type": String,
    "Values": Map
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterId

String

集群ID。

ChartUrl

String

Chart请求地址。

Namespace

String

应用命名空间。

Name

String

应用名称。

Type

String

支持应用部署的类型。

取值:

  • helm

Values

Map

应用的自定义值。

返回值

Fn::GetAtt

TaskId:应用部署的任务ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Type:
    Type: String
    Description:
      en: Type of the deployed application, currently can only be helm.
    AllowedValues:
      - helm
    Required: true
  ClusterId:
    Type: String
    Description:
      en: The cluster id of the deployed application.
    Required: true
    AssociationProperty: ALIYUN::CS::Cluster::ClusterId
  ChartUrl:
    Type: String
    Description:
      en: Helm chart package URL, must be a valid URL.
    Required: true
    Default: https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/ack-knative-kourier-1.4.0.tgz
  Namespace:
    Type: String
    Description:
      en: Deployment namespace.
    Required: true
    MinLength: 3
    MaxLength: 64
    Default: knative-serving
  Name:
    Type: String
    Description:
      en: Name of the deployed application.
    Required: true
    MinLength: 3
    MaxLength: 64
    Default: knative-kourier
Resources:
  ApplicationDeployment:
    Type: ALIYUN::CS::ApplicationDeployment
    Properties:
      Type:
        Ref: Type
      ClusterId:
        Ref: ClusterId
      Values:
        version: v1.10.9-aliyun.1
        regionID:
          Ref: ALIYUN::Region
      ChartUrl:
        Ref: ChartUrl
      Namespace:
        Ref: Namespace
      Name:
        Ref: Name
Outputs:
  TaskId:
    Description: The task ID of the application deployment.
    Value:
      Fn::GetAtt:
        - ApplicationDeployment
        - TaskId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Type": {
      "Type": "String",
      "Description": {
        "en": "Type of the deployed application, currently can only be helm."
      },
      "AllowedValues": [
        "helm"
      ],
      "Required": true
    },
    "ClusterId": {
      "Type": "String",
      "Description": {
        "en": "The cluster id of the deployed application."
      },
      "Required": true,
      "AssociationProperty": "ALIYUN::CS::Cluster::ClusterId"
    },
    "ChartUrl": {
      "Type": "String",
      "Description": {
        "en": "Helm chart package URL, must be a valid URL."
      },
      "Required": true,
      "Default": "https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/ack-knative-kourier-1.4.0.tgz"
    },
    "Namespace": {
      "Type": "String",
      "Description": {
        "en": "Deployment namespace."
      },
      "Required": true,
      "MinLength": 3,
      "MaxLength": 64,
      "Default": "knative-serving"
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "Name of the deployed application."
      },
      "Required": true,
      "MinLength": 3,
      "MaxLength": 64,
      "Default": "knative-kourier"
    }
  },
  "Resources": {
    "ApplicationDeployment": {
      "Type": "ALIYUN::CS::ApplicationDeployment",
      "Properties": {
        "Type": {
          "Ref": "Type"
        },
        "ClusterId": {
          "Ref": "ClusterId"
        },
        "Values": {
          "version": "v1.10.9-aliyun.1",
          "regionID": {
            "Ref": "ALIYUN::Region"
          }
        },
        "ChartUrl": {
          "Ref": "ChartUrl"
        },
        "Namespace": {
          "Ref": "Namespace"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "TaskId": {
      "Description": "The task ID of the application deployment.",
      "Value": {
        "Fn::GetAtt": [
          "ApplicationDeployment",
          "TaskId"
        ]
      }
    }
  }
}