All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::CS::ClusterHelmApplication

Last Updated:Feb 02, 2024

ALIYUN::CS::ClusterHelmApplication is used to deploy an application by using Helm.

Syntax

{
  "Type": "ALIYUN::CS::ClusterHelmApplication",
  "Properties": {
    "ChartValues": Map,
    "ClusterId": String,
    "ChartUrl": String,
    "Namespace": String,
    "Name": String,
    "Credential": Map,
    "RolePolicy": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

ChartValues

Map

No

No

The custom values of the chart.

None.

ClusterId

String

Yes

No

The cluster ID.

None.

ChartUrl

String

Yes

No

The request URL of the chart.

None.

Namespace

String

No

No

The namespace of Helm.

None.

Name

String

Yes

No

The chart name.

None.

Credential

Map

No

No

The information about the access credential.

None.

RolePolicy

String

No

Yes

The policy for the role of your account.

Before you deploy the application, check the policies that are attached to the role of your account.  

Valid values:

  • EnsureAdminRoleAndBinding (default): automatically creates a role named ros:application-admin:${user-id}\ that has administrator permissions and attaches the role to your account.  

  • None: does not perform operations.

Credential syntax

"Credential": [
  {
    "Password": String,
    "UserName": String
  }
]

Credential properties

Property

Type

Required

Editable

Description

Constraint

Password

String

Yes

No

The password.

None.

UserName

String

Yes

No

The username.

None.

Return values

Fn::GetAtt

ClusterId: the cluster ID.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ChartUrl:
    AllowedPattern: ^(http|https)://[\w\W]+$
    Description: The URL of chart. Supports HTTP or HTTPS.
    Type: String
  ClusterId:
    Description: The ID of the kubernetes cluster.
    Type: String
  Name:
    Description: The name for helm release.
    Type: String
Resources:
  ClusterHelmApplication:
    Properties:
      ChartUrl:
        Ref: ChartUrl
      ClusterId:
        Ref: ClusterId
      Name:
        Ref: Name
    Type: ALIYUN::CS::ClusterHelmApplication
Outputs:
  ClusterId:
    Description: The ID of the cluster.
    Value:
      Fn::GetAtt:
      - ClusterHelmApplication
      - ClusterId

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterId": {
      "Type": "String",
      "Description": "The ID of the kubernetes cluster."
    },
    "ChartUrl": {
      "Type": "String",
      "Description": "The URL of chart. Supports HTTP or HTTPS.",
      "AllowedPattern": "^(http|https)://[\\w\\W]+$"
    },
    "Name": {
      "Type": "String",
      "Description": "The name for helm release."
    }
  },
  "Resources": {
    "ClusterHelmApplication": {
      "Type": "ALIYUN::CS::ClusterHelmApplication",
      "Properties": {
        "ClusterId": {
          "Ref": "ClusterId"
        },
        "ChartUrl": {
          "Ref": "ChartUrl"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "ClusterId": {
      "Description": "The ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "ClusterHelmApplication",
          "ClusterId"
        ]
      }
    }
  }
}