From 4deb0f377086f17faeb6f0abe4d35262e904d9e6 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Mon, 28 Sep 2026 10:04:21 +0000 Subject: [PATCH] sdk: rolling update for 0.3.59 --- VERSION | 2 +- src/UK8S/Apis/CreateUK8SClusterV2Request.php | 252 ++++++++++++------ .../Params/CreateUK8SClusterV2ParamNodes.php | 114 ++++++-- ...lusterV2ParamNodesKubeletConfiguration.php | 44 +++ ...ClusterV2ParamNodesNetworkInterfaceEIP.php | 4 +- .../CreateUK8SClusterV2ParamUserLabels.php | 64 +++++ src/UK8S/UK8SClient.php | 32 ++- 7 files changed, 395 insertions(+), 117 deletions(-) create mode 100644 src/UK8S/Params/CreateUK8SClusterV2ParamNodesKubeletConfiguration.php create mode 100644 src/UK8S/Params/CreateUK8SClusterV2ParamUserLabels.php diff --git a/VERSION b/VERSION index 6d716d90..a6d5224c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.58 +0.3.59 diff --git a/src/UK8S/Apis/CreateUK8SClusterV2Request.php b/src/UK8S/Apis/CreateUK8SClusterV2Request.php index 71e998c3..ae81a3bc 100644 --- a/src/UK8S/Apis/CreateUK8SClusterV2Request.php +++ b/src/UK8S/Apis/CreateUK8SClusterV2Request.php @@ -23,7 +23,9 @@ use UCloud\UK8S\Params\CreateUK8SClusterV2ParamNodesNetworkInterface; use UCloud\UK8S\Params\CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP; use UCloud\UK8S\Params\CreateUK8SClusterV2ParamNodesSecGroupId; +use UCloud\UK8S\Params\CreateUK8SClusterV2ParamNodesKubeletConfiguration; use UCloud\UK8S\Params\CreateUK8SClusterV2ParamKubeProxy; +use UCloud\UK8S\Params\CreateUK8SClusterV2ParamUserLabels; class CreateUK8SClusterV2Request extends Request { @@ -40,6 +42,8 @@ public function __construct() $this->markRequired("MasterMachineType"); $this->markRequired("MasterCPU"); $this->markRequired("MasterMem"); + $this->markRequired("K8sVersion"); + $this->markRequired("ImageId"); } @@ -184,38 +188,6 @@ public function setPassword($password) $this->set("Password", $password); } - /** - * Master: - * - * @return CreateUK8SClusterV2ParamMaster[]|null - */ - public function getMaster() - { - $items = $this->get("Master"); - if ($items == null) { - return []; - } - $result = []; - foreach ($items as $i => $item) { - array_push($result, new CreateUK8SClusterV2ParamMaster($item)); - } - return $result; - } - - /** - * Master: - * - * @param CreateUK8SClusterV2ParamMaster[] $master - */ - public function setMaster(array $master) - { - $result = []; - foreach ($master as $i => $item) { - array_push($result, $item->getAll()); - } - return $result; - } - /** * MasterMachineType: Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 * @@ -276,6 +248,38 @@ public function setMasterMem($masterMem) $this->set("MasterMem", $masterMem); } + /** + * Master: + * + * @return CreateUK8SClusterV2ParamMaster[]|null + */ + public function getMaster() + { + $items = $this->get("Master"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SClusterV2ParamMaster($item)); + } + return $result; + } + + /** + * Master: + * + * @param CreateUK8SClusterV2ParamMaster[] $master + */ + public function setMaster(array $master) + { + $result = []; + foreach ($master as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + /** * Nodes: * @@ -308,6 +312,46 @@ public function setNodes(array $nodes) return $result; } + /** + * K8sVersion: k8s集群的版本,版本信息请参考UK8S集群创建页。 + * + * @return string|null + */ + public function getK8sVersion() + { + return $this->get("K8sVersion"); + } + + /** + * K8sVersion: k8s集群的版本,版本信息请参考UK8S集群创建页。 + * + * @param string $k8sVersion + */ + public function setK8sVersion($k8sVersion) + { + $this->set("K8sVersion", $k8sVersion); + } + + /** + * ImageId: Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + /** * MasterBootDiskType: Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * @@ -408,26 +452,6 @@ public function setChargeType($chargeType) $this->set("ChargeType", $chargeType); } - /** - * K8sVersion: k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 - * - * @return string|null - */ - public function getK8sVersion() - { - return $this->get("K8sVersion"); - } - - /** - * K8sVersion: k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 - * - * @param string $k8sVersion - */ - public function setK8sVersion($k8sVersion) - { - $this->set("K8sVersion", $k8sVersion); - } - /** * Quantity: 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 * @@ -508,26 +532,6 @@ public function setKubeProxy(array $kubeProxy) $this->set("KubeProxy", $kubeProxy->getAll()); } - /** - * ImageId: Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 - * - * @return string|null - */ - public function getImageId() - { - return $this->get("ImageId"); - } - - /** - * ImageId: Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 - * - * @param string $imageId - */ - public function setImageId($imageId) - { - $this->set("ImageId", $imageId); - } - /** * UserData: 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 * @@ -689,22 +693,114 @@ public function setForwardSrcIPMethod($forwardSrcIPMethod) } /** - * UserLabels: UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * MasterUHostFamily: Master节点规格族,如o1a, o1i + * + * @return string|null + */ + public function getMasterUHostFamily() + { + return $this->get("MasterUHostFamily"); + } + + /** + * MasterUHostFamily: Master节点规格族,如o1a, o1i + * + * @param string $masterUHostFamily + */ + public function setMasterUHostFamily($masterUHostFamily) + { + $this->set("MasterUHostFamily", $masterUHostFamily); + } + + /** + * KmsPluginKeyId: 开启 kms 插件的 key id * * @return string|null */ + public function getKmsPluginKeyId() + { + return $this->get("KmsPluginKeyId"); + } + + /** + * KmsPluginKeyId: 开启 kms 插件的 key id + * + * @param string $kmsPluginKeyId + */ + public function setKmsPluginKeyId($kmsPluginKeyId) + { + $this->set("KmsPluginKeyId", $kmsPluginKeyId); + } + + /** + * MasterDataDiskKmsKeyId: master 节点数据盘使用的 kms key id + * + * @return string|null + */ + public function getMasterDataDiskKmsKeyId() + { + return $this->get("MasterDataDiskKmsKeyId"); + } + + /** + * MasterDataDiskKmsKeyId: master 节点数据盘使用的 kms key id + * + * @param string $masterDataDiskKmsKeyId + */ + public function setMasterDataDiskKmsKeyId($masterDataDiskKmsKeyId) + { + $this->set("MasterDataDiskKmsKeyId", $masterDataDiskKmsKeyId); + } + + /** + * KmsPluginResource: kms 加密的资源 + * + * @return string[]|null + */ + public function getKmsPluginResource() + { + return $this->get("KmsPluginResource"); + } + + /** + * KmsPluginResource: kms 加密的资源 + * + * @param string[] $kmsPluginResource + */ + public function setKmsPluginResource(array $kmsPluginResource) + { + $this->set("KmsPluginResource", $kmsPluginResource); + } + + /** + * UserLabels: + * + * @return CreateUK8SClusterV2ParamUserLabels[]|null + */ public function getUserLabels() { - return $this->get("UserLabels"); + $items = $this->get("UserLabels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SClusterV2ParamUserLabels($item)); + } + return $result; } /** - * UserLabels: UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * UserLabels: * - * @param string $userLabels + * @param CreateUK8SClusterV2ParamUserLabels[] $userLabels */ - public function setUserLabels($userLabels) + public function setUserLabels(array $userLabels) { - $this->set("UserLabels", $userLabels); + $result = []; + foreach ($userLabels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; } } diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php b/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php index 7eea8ab4..e64530c7 100644 --- a/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php @@ -203,23 +203,23 @@ public function setBootDiskType($bootDiskType) } /** - * BootDiskSIze: Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 + * BootDiskSize: Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 * * @return integer|null */ - public function getBootDiskSIze() + public function getBootDiskSize() { - return $this->get("BootDiskSIze"); + return $this->get("BootDiskSize"); } /** - * BootDiskSIze: Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 + * BootDiskSize: Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 * - * @param int $bootDiskSIze + * @param int $bootDiskSize */ - public function setBootDiskSIze($bootDiskSIze) + public function setBootDiskSize($bootDiskSize) { - $this->set("BootDiskSIze", $bootDiskSIze); + $this->set("BootDiskSize", $bootDiskSize); } /** @@ -242,6 +242,26 @@ public function setDataDiskType($dataDiskType) $this->set("DataDiskType", $dataDiskType); } + /** + * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + /** * GpuType: 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。 * @@ -282,26 +302,6 @@ public function setGPU($gpu) $this->set("GPU", $gpu); } - /** - * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] - * - * @return integer|null - */ - public function getDataDiskSize() - { - return $this->get("DataDiskSize"); - } - - /** - * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] - * - * @param int $dataDiskSize - */ - public function setDataDiskSize($dataDiskSize) - { - $this->set("DataDiskSize", $dataDiskSize); - } - /** * MinimalCpuPlatform: Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 * @@ -505,4 +505,64 @@ public function setSecGroupId(array $secGroupId) } return $result; } + + /** + * UHostFamily: Node节点规格族 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: Node节点规格族 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + + /** + * KubeletConfiguration: + * + * @return CreateUK8SClusterV2ParamNodesKubeletConfiguration|null + */ + public function getKubeletConfiguration() + { + return new CreateUK8SClusterV2ParamNodesKubeletConfiguration($this->get("KubeletConfiguration")); + } + + /** + * KubeletConfiguration: + * + * @param CreateUK8SClusterV2ParamNodesKubeletConfiguration $kubeletConfiguration + */ + public function setKubeletConfiguration(array $kubeletConfiguration) + { + $this->set("KubeletConfiguration", $kubeletConfiguration->getAll()); + } + + /** + * DataDiskKmsKeyId: 节点数据盘加密使用的 key id + * + * @return string|null + */ + public function getDataDiskKmsKeyId() + { + return $this->get("DataDiskKmsKeyId"); + } + + /** + * DataDiskKmsKeyId: 节点数据盘加密使用的 key id + * + * @param string $dataDiskKmsKeyId + */ + public function setDataDiskKmsKeyId($dataDiskKmsKeyId) + { + $this->set("DataDiskKmsKeyId", $dataDiskKmsKeyId); + } } diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamNodesKubeletConfiguration.php b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesKubeletConfiguration.php new file mode 100644 index 00000000..b7aa42d7 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesKubeletConfiguration.php @@ -0,0 +1,44 @@ +get("ContainerLogMaxFiles"); + } + + /** + * ContainerLogMaxFiles: 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + * + * @param string $containerLogMaxFiles + */ + public function setContainerLogMaxFiles($containerLogMaxFiles) + { + $this->set("ContainerLogMaxFiles", $containerLogMaxFiles); + } +} diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP.php b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP.php index fdd2189f..149b01b3 100644 --- a/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP.php +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP.php @@ -83,7 +83,7 @@ public function setShareBandwidthId($shareBandwidthId) } /** - * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International * * @return string|null */ @@ -93,7 +93,7 @@ public function getOperatorName() } /** - * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International * * @param string $operatorName */ diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamUserLabels.php b/src/UK8S/Params/CreateUK8SClusterV2ParamUserLabels.php new file mode 100644 index 00000000..e18442cf --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamUserLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: UK8S用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: UK8S用户资源标签的值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: UK8S用户资源标签的值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UK8S/UK8SClient.php b/src/UK8S/UK8SClient.php index dae0b1e2..faf38dfe 100644 --- a/src/UK8S/UK8SClient.php +++ b/src/UK8S/UK8SClient.php @@ -361,6 +361,9 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "ServiceCIDR" => (string) Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。 * "ClusterName" => (string) 集群名称 * "Password" => (string) 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64 + * "MasterMachineType" => (string) Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 + * "MasterCPU" => (integer) Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。 + * "MasterMem" => (integer) Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。 * "Master" => (array) [ * [ * "Zone" => (string) Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) @@ -373,9 +376,6 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * ] * ] * ] - * "MasterMachineType" => (string) Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 - * "MasterCPU" => (integer) Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。 - * "MasterMem" => (integer) Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。 * "Nodes" => (array) [ * [ * "Zone" => (string) 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) @@ -387,11 +387,11 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "MaxPods" => (integer) Node节点上可运行最大节点数,默认为110。 * "Labels" => (string) Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。 * "BootDiskType" => (string) 一组Node节点的系统盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 - * "BootDiskSIze" => (integer) Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 + * "BootDiskSize" => (integer) Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 * "DataDiskType" => (string) 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "DataDiskSize" => (integer) 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] * "GpuType" => (string) 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。 * "GPU" => (integer) 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。 - * "DataDiskSize" => (integer) 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] * "MinimalCpuPlatform" => (string) Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 * "Taints" => (string) Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 * "SecurityMode" => (string) 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 @@ -404,7 +404,7 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "Bandwidth" => (integer) 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] * "PayMode" => (string) 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" * "ShareBandwidthId" => (string) 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 - * "OperatorName" => (string) 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * "OperatorName" => (string) 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International * "CouponId" => (string) 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 * ] * ] @@ -417,21 +417,26 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "Name" => (string) 安全组名称。 * ] * ] + * "UHostFamily" => (string) Node节点规格族 + * "KubeletConfiguration" => (object) [ + * "ContainerLogMaxFiles" => (string) 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + * ] + * "DataDiskKmsKeyId" => (string) 节点数据盘加密使用的 key id * ] * ] + * "K8sVersion" => (string) k8s集群的版本,版本信息请参考UK8S集群创建页。 + * "ImageId" => (string) Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 * "MasterBootDiskType" => (string) Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * "MasterBootDiskSize" => (integer) Master节点系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 * "MasterDataDiskType" => (string) Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * "MasterDataDiskSize" => (integer) Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000] * "ChargeType" => (string) 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。 - * "K8sVersion" => (string) k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 * "Quantity" => (integer) 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 * "ExternalApiServer" => (string) 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。 * "MasterIsolationGroup" => (string) 【无效,已删除】当前将自动为Master节点创建隔离组,确保Master节点归属于不同物理机。 * "KubeProxy" => (object) [ * "Mode" => (string) 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 * ] - * "ImageId" => (string) Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 * "UserData" => (string) 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 * "InitScript" => (string) 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。 * "MasterMinimalCpuPlatform" => (string) Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 @@ -440,7 +445,16 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "MasterImageId" => (string) Master节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。 * "LbClass" => (string) master lb 类型默认ulb,可选ulb nlb * "ForwardSrcIPMethod" => (string) LbClass为nlb的时候支持的源ip转发模式,目前只支持Toa,为空则不开源ip功能 枚举:"",Toa - * "UserLabels" => (string) UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * "MasterUHostFamily" => (string) Master节点规格族,如o1a, o1i + * "KmsPluginKeyId" => (string) 开启 kms 插件的 key id + * "MasterDataDiskKmsKeyId" => (string) master 节点数据盘使用的 kms key id + * "KmsPluginResource" => (array) kms 加密的资源 + * "UserLabels" => (array) [ + * [ + * "Key" => (string) UK8S用户资源标签的键值 + * "Value" => (string) UK8S用户资源标签的值 + * ] + * ] * ] * * Outputs: