ALIYUN::CS::ClusterAddons类型用于指定集群安装组件。
语法
{
  "Type": "ALIYUN::CS::ClusterAddons",
  "Properties": {
    "ClusterId": String,
    "Addons": List,
    "InstalledIgnore": Boolean,
    "WaitUntil": List,
    "RolePolicy": String,
    "ValidationMode": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| ClusterId | String | 是 | 否 | 集群ID。 | 无 | 
| Addons | List | 是 | 是 | 组件配置信息列表。 | 更多信息,请参见Addons属性。 | 
| InstalledIgnore | Boolean | 否 | 否 | 创建集群时是否忽略已安装的组件。 | 取值: 
 | 
| WaitUntil | List | 否 | 是 | 开始创建或更新后,等待直到满足所有条件。 | 更多信息,请参见WaitUntil属性。 | 
| RolePolicy | String | 否 | 是 | 在部署应用程序之前,请检查与当前用户的角色关联的策略。 | 取值: 
 | 
| ValidationMode | String | 否 | 否 | 验证模式。 | 取值: 
 | 
Addons语法
"Addons": [
  {
    "Version": String,
    "Config": String,
    "Name": String
  }
]Addons属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Version | String | 否 | 否 | 组件版本。 | 无 | 
| Config | String | 否 | 是 | 组件配置信息。 | 无 | 
| Name | String | 是 | 否 | 组件名称。 | 无 | 
WaitUntil语法
"WaitUntil": [
  {
   "ApiVersion": String,
   "FirstMatch": Boolean,
   "Timeout": Integer,
   "JsonPath": String,
   "Namespace": String,
   "Stage": String,
   "Name": String,
   "ValueType": String,
   "Kind": String,
   "Value": String,
   "Operator": String
  }
]WaitUntil属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| ApiVersion | String | 否 | 是 | API版本。 | 无 | 
| FirstMatch | Boolean | 否 | 是 | 只返回 JsonPath过滤结果中的第一个匹配结果。 | 取值: 
 | 
| Timeout | Integer | 否 | 是 | 等待满足条件的超时时间。 | 单位为秒。 | 
| JsonPath | String | 否 | 是 | Json路径表达式用于过滤输出。 | 无 | 
| Namespace | String | 否 | 是 | 资源所在的kubernetes的命名空间。 | 默认值为DefaultNamespace。 | 
| Stage | String | 否 | 否 | 在什么阶段等待。 | 取值: 
 | 
| Name | String | 是 | 是 | 要查询的kubernetes资源名称。 | 无 | 
| ValueType | String | 否 | 是 | 值的类型。 | 默认值为String。 | 
| Kind | String | 是 | 是 | 要查询的kubernetes资源类型。 | 无 | 
| Value | String | 否 | 是 | 要与JsonPath表达式的结果进行比较的值。 | 无 | 
| Operator | String | 是 | 是 | 将值与JsonPath表达式的结果进行比较的操作符。 | 无 | 
返回值
Fn::GetAtt
- ClusterId:集群ID。 
- WaitUntilData:WaitUntil中每个JsonPath的值列表。 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Addons:
    Description: 'A combination of addon plugins for Kubernetes clusters.
      Network plug-in: including Flannel and Terway network plug-ins
      Log service: Optional. If the log service is not enabled, the cluster audit
      function cannot be used.
      Ingress: The installation of the Ingress component is enabled by default.'
    Type: Json
  ClusterId:
    Description: Cluster ID.
    Type: String
Resources:
  ClusterAddons:
    Properties:
      Addons:
        Ref: Addons
      ClusterId:
        Ref: ClusterId
    Type: ALIYUN::CS::ClusterAddons
Outputs:
  ClusterId:
    Description: Cluster ID.
    Value:
      Fn::GetAtt:
      - ClusterAddons
      - ClusterId{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterId": {
      "Type": "String",
      "Description": "Cluster ID."
    },
    "Addons": {
      "Type": "Json",
      "Description": "A combination of addon plugins for Kubernetes clusters.\nNetwork plug-in: including Flannel and Terway network plug-ins\nLog service: Optional. If the log service is not enabled, the cluster audit function cannot be used.\nIngress: The installation of the Ingress component is enabled by default."
    }
  },
  "Resources": {
    "ClusterAddons": {
      "Type": "ALIYUN::CS::ClusterAddons",
      "Properties": {
        "ClusterId": {
          "Ref": "ClusterId"
        },
        "Addons": {
          "Ref": "Addons"
        }
      }
    }
  },
  "Outputs": {
    "ClusterId": {
      "Description": "Cluster ID.",
      "Value": {
        "Fn::GetAtt": [
          "ClusterAddons",
          "ClusterId"
        ]
      }
    }
  }
}