DATASOURCE::CS::ClusterNodePools

DATASOURCE::CS::ClusterNodePools类型用于查询集群内所有节点池详情。

语法

{
  "Type": "DATASOURCE::CS::ClusterNodePools",
  "Properties": {
    "ClusterId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterId

String

集群ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

取值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回数据(Fn::GetAtt)

  • NodePoolIds:节点池实例ID列表。

  • NodePools:节点池实例详情列表。

属性名称

类型

描述

约束

NodePoolIds

List

节点池实例ID列表。

NodePools

List

节点池实例列表。

NodepoolInfo

Map

节点池信息。

示例:{ "IsDefault": true, "Type": "ess", "Updated": "2022-05-09T10:52:44+08:00", "ResourceGroupId": "", "RegionId": "cn-beijing", "Name": "default-nodepool", "Created": "2022-05-09T10:52:43.533679948+08:00", "NodepoolId": "npf63e2a53b0594ec4bceacc56741b****"}

Status

Map

节点池状态信息。

示例:{ "FailedNodes": 0, "State": "active", "SpotNodes": 0, "ServingNodes": 0, "HealthyNodes": 2, "TotalNodes": 2, "OfflineNodes": 0, "RemovingNodes": 0, "InitialNodes": 0}

Management

Map

托管节点池配置。

该参数只在专业托管集群中生效。示例:{ "UpgradeConfig": { "AutoUpgrade": false, "Surge": 0, "KeepSurgeOnFailed": false, "MaxUnavailable": 0, "MaxParallelism": 0 }, "AutoRepair": false, "Enable": false}

InterconnectConfig

Map

边缘节点池网络相关配置。

该参数只在edge类型的节点池中生效。示例:{ "CenId": "cen-ey9k9nfhz0f*******", "CcnId": "ccn-qm5i0i0q9yi*******", "CcnRegionId": "cn-shanghai", "Bandwidth": 10, "ImprovedPeriod": "1"}

InterconnectMode

String

边缘节点池网络类型。

该参数只在edge类型的节点池中生效。取值:

  • basic:基础型。

  • improved:增强型。

MaxNodes

Number

边缘节点池允许容纳的最大节点数量。

该参数取值大于等于0。具体如下:

  • edge类型节点池:该参数值大于等于0。

  • ess类型节点池:该参数值等于0。

说明

0表示无额外限制,即仅受限于集群整体可以容纳的节点数,节点池本身无额外限制。

KubernetesConfig

Map

集群相关配置。

示例:{ "CpuPolicy": "none", "Runtime": "docker", "CmsEnabled": true, "UserData": "", "NodeNameMode": "nodeip", "RuntimeVersion": "19.03.5", "Unschedulable": false, "OverwriteHostname": false}

ScalingGroup

Map

扩容组配置。

示例:{ "WorkerHpcClusterId": "", "SystemDiskKmsKeyId": "", "Platform": "CentOS", "DataDisks": [], "SystemDiskSize": 40, "InstanceChargeType": "PostPaid", "RamPolicy": "KubernetesWorkerRole-d784cc05-69b2-4ad2-bc7f-174e93e4 ****", "AutoRenew": false, "SystemDiskEncrypted": false, "ImageType": "CentOS", "SystemDiskEncryptAlgorithm": "", "DeploymentsetId": "", "SystemDiskPerformanceLevel": "", "OsType": "", "ImageId": "centos_7_9_x64_20G_alibase_20220208.vhd", "SchedulerOptions": { "ManagedPrivateSpaceId": "" }, "SpotPriceLimit": [], "InstanceTypes": [ "ecs.g6.large" ], "Tags": [ { "Value": "k8s_nodes_config_stack_d784cc05-69b2-4ad2-bc7f-174e93e4****", "Key": "ros-aliyun-created" } ], "SpotStrategy": "NoSpot", "LoginPassword": "", "MultiAzPolicy": "BALANCE", "AutoRenewPeriod": 0, "ScalingPolicy": "release", "KeyPair": "k8s", "VSwitchIds": [ "vsw-2zenr28ayjt4mgofc****" ], "ScalingGroupId": "asg-2ze7np35ywjw****", "SecurityGroupId": "sg-2zee8czcwdm6xlqd****", "Period": 0, "SecurityGroupIds": [ "sg-2zee8czcwdm6xlqd****" ], "InternetChargeType": "", "SystemDiskCategory": "cloud_efficiency", "InternetMaxBandwidthOut": 0, "RdsInstances": [], "WorkerSystemDiskSnapshotPolicyId": "", "SupportIpv6": false, "PeriodUnit": ""}

AutoScaling

Map

自动伸缩配置。

示例:{ "EipBandwidth": 0, "Type": "", "MinInstances": 0, "Enable": false, "MaxInstances": 0, "EipInternetChargeType": "", "HealthCheckType": ""}

TeeConfig

Map

加密计算配置。

示例:{ "TeeType": "", "TeeEnable": false}

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterId": {
      "Type": "String",
      "Description": "Cluster ID."
    }
  },
  "Resources": {
    "ClusterNodePools": {
      "Type": "DATASOURCE::CS::ClusterNodePools",
      "Properties": {
        "ClusterId": {
          "Ref": "ClusterId"
        }
      }
    }
  },
  "Outputs": {
    "NodePools": {
      "Description": "The list of node_pools.",
      "Value": {
        "Fn::GetAtt": [
          "ClusterNodePools",
          "NodePools"
        ]
      }
    },
    "NodePoolIds": {
      "Description": "The list of node_pool IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ClusterNodePools",
          "NodePoolIds"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ClusterId:
    Type: String
    Description: Cluster ID.
Resources:
  ClusterNodePools:
    Type: DATASOURCE::CS::ClusterNodePools
    Properties:
      ClusterId:
        Ref: ClusterId
Outputs:
  NodePools:
    Description: The list of node_pools.
    Value:
      Fn::GetAtt:
        - ClusterNodePools
        - NodePools
  NodePoolIds:
    Description: The list of node_pool IDs.
    Value:
      Fn::GetAtt:
        - ClusterNodePools
        - NodePoolIds