From 6539f3e3a6b75b6732c4af64e3049483b0a2d2ce Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Thu, 10 Sep 2026 02:21:21 +0000 Subject: [PATCH] sdk: rolling update for 0.3.49 --- VERSION | 2 +- src/UK8S/Apis/AddUK8SNodeGroupRequest.php | 476 +++++++++-- src/UK8S/Apis/UpdateUK8SNodeGroupRequest.php | 780 ++++++++++++++++++ src/UK8S/Apis/UpdateUK8SNodeGroupResponse.php | 44 + ...UK8SNodeGroupParamKubeletConfiguration.php | 224 +++++ ...pParamKubeletConfigurationEvictionHard.php | 104 +++ ...pParamKubeletConfigurationEvictionSoft.php | 104 +++ ...etConfigurationEvictionSoftGracePeriod.php | 104 +++ ...pParamKubeletConfigurationKubeReserved.php | 104 +++ ...aramKubeletConfigurationSystemReserved.php | 104 +++ .../AddUK8SNodeGroupParamNetworkInterface.php | 44 + ...dUK8SNodeGroupParamNetworkInterfaceEIP.php | 124 +++ .../AddUK8SNodeGroupParamSecGroupId.php | 84 ++ ...UK8SNodeGroupParamKubeletConfiguration.php | 44 + ...dateUK8SNodeGroupParamNetworkInterface.php | 44 + ...eUK8SNodeGroupParamNetworkInterfaceEIP.php | 124 +++ .../UpdateUK8SNodeGroupParamSecGroupId.php | 84 ++ src/UK8S/UK8SClient.php | 161 +++- 18 files changed, 2690 insertions(+), 65 deletions(-) create mode 100644 src/UK8S/Apis/UpdateUK8SNodeGroupRequest.php create mode 100644 src/UK8S/Apis/UpdateUK8SNodeGroupResponse.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfiguration.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionHard.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationKubeReserved.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationSystemReserved.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamNetworkInterface.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamNetworkInterfaceEIP.php create mode 100644 src/UK8S/Params/AddUK8SNodeGroupParamSecGroupId.php create mode 100644 src/UK8S/Params/UpdateUK8SNodeGroupParamKubeletConfiguration.php create mode 100644 src/UK8S/Params/UpdateUK8SNodeGroupParamNetworkInterface.php create mode 100644 src/UK8S/Params/UpdateUK8SNodeGroupParamNetworkInterfaceEIP.php create mode 100644 src/UK8S/Params/UpdateUK8SNodeGroupParamSecGroupId.php diff --git a/VERSION b/VERSION index 2fb885a2..b3682c13 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.48 +0.3.49 diff --git a/src/UK8S/Apis/AddUK8SNodeGroupRequest.php b/src/UK8S/Apis/AddUK8SNodeGroupRequest.php index d792eff1..c2a8e761 100644 --- a/src/UK8S/Apis/AddUK8SNodeGroupRequest.php +++ b/src/UK8S/Apis/AddUK8SNodeGroupRequest.php @@ -17,6 +17,15 @@ namespace UCloud\UK8S\Apis; use UCloud\Core\Request\Request; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamSecGroupId; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamNetworkInterface; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamNetworkInterfaceEIP; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamKubeletConfiguration; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamKubeletConfigurationEvictionHard; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamKubeletConfigurationKubeReserved; +use UCloud\UK8S\Params\AddUK8SNodeGroupParamKubeletConfigurationSystemReserved; class AddUK8SNodeGroupRequest extends Request { @@ -26,6 +35,13 @@ public function __construct() $this->markRequired("Region"); $this->markRequired("NodeGroupName"); $this->markRequired("ClusterId"); + $this->markRequired("ImageId"); + $this->markRequired("MachineType"); + $this->markRequired("CPU"); + $this->markRequired("Mem"); + $this->markRequired("BootDiskType"); + $this->markRequired("BootDiskSize"); + $this->markRequired("SubnetId"); } @@ -171,27 +187,7 @@ public function setMachineType($machineType) } /** - * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" - * - * @return string|null - */ - public function getMinimalCpuPlatform() - { - return $this->get("MinimalCpuPlatform"); - } - - /** - * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" - * - * @param string $minimalCpuPlatform - */ - public function setMinimalCpuPlatform($minimalCpuPlatform) - { - $this->set("MinimalCpuPlatform", $minimalCpuPlatform); - } - - /** - * CPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * CPU: CPU个数 * * @return integer|null */ @@ -201,7 +197,7 @@ public function getCPU() } /** - * CPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * CPU: CPU个数 * * @param int $cpu */ @@ -231,63 +227,123 @@ public function setMem($mem) } /** - * GpuType: GPU类型 + * BootDiskType: 磁盘类型 * * @return string|null */ - public function getGpuType() + public function getBootDiskType() { - return $this->get("GpuType"); + return $this->get("BootDiskType"); } /** - * GpuType: GPU类型 + * BootDiskType: 磁盘类型 * - * @param string $gpuType + * @param string $bootDiskType */ - public function setGpuType($gpuType) + public function setBootDiskType($bootDiskType) { - $this->set("GpuType", $gpuType); + $this->set("BootDiskType", $bootDiskType); } /** - * GPU: GPU卡核心数 + * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 * * @return integer|null */ - public function getGPU() + public function getBootDiskSize() { - return $this->get("GPU"); + return $this->get("BootDiskSize"); } /** - * GPU: GPU卡核心数 + * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 * - * @param int $gpu + * @param int $bootDiskSize */ - public function setGPU($gpu) + public function setBootDiskSize($bootDiskSize) { - $this->set("GPU", $gpu); + $this->set("BootDiskSize", $bootDiskSize); } /** - * BootDiskType: 磁盘类型 + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 * * @return string|null */ - public function getBootDiskType() + public function getSubnetId() { - return $this->get("BootDiskType"); + return $this->get("SubnetId"); } /** - * BootDiskType: 磁盘类型 + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 * - * @param string $bootDiskType + * @param string $subnetId */ - public function setBootDiskType($bootDiskType) + public function setSubnetId($subnetId) { - $this->set("BootDiskType", $bootDiskType); + $this->set("SubnetId", $subnetId); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * + * @return string|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * + * @param string $minimalCpuPlatform + */ + public function setMinimalCpuPlatform($minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } + + /** + * GpuType: GPU类型 + * + * @return string|null + */ + public function getGpuType() + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU类型 + * + * @param string $gpuType + */ + public function setGpuType($gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @return integer|null + */ + public function getGPU() + { + return $this->get("GPU"); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @param int $gpu + */ + public function setGPU($gpu) + { + $this->set("GPU", $gpu); } /** @@ -371,42 +427,346 @@ public function setChargeType($chargeType) } /** - * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * UHostFamily: 主机规格族 * - * @return integer|null + * @return string|null */ - public function getBootDiskSize() + public function getUHostFamily() { - return $this->get("BootDiskSize"); + return $this->get("UHostFamily"); } /** - * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * UHostFamily: 主机规格族 * - * @param int $bootDiskSize + * @param string $uHostFamily */ - public function setBootDiskSize($bootDiskSize) + public function setUHostFamily($uHostFamily) { - $this->set("BootDiskSize", $bootDiskSize); + $this->set("UHostFamily", $uHostFamily); } /** - * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 * * @return string|null */ - public function getSubnetId() + public function getSecurityMode() { - return $this->get("SubnetId"); + return $this->get("SecurityMode"); } /** - * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 * - * @param string $subnetId + * @param string $securityMode */ - public function setSubnetId($subnetId) + public function setSecurityMode($securityMode) { - $this->set("SubnetId", $subnetId); + $this->set("SecurityMode", $securityMode); + } + + /** + * NodeNamePrefix: 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。 + * + * @return string|null + */ + public function getNodeNamePrefix() + { + return $this->get("NodeNamePrefix"); + } + + /** + * NodeNamePrefix: 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。 + * + * @param string $nodeNamePrefix + */ + public function setNodeNamePrefix($nodeNamePrefix) + { + $this->set("NodeNamePrefix", $nodeNamePrefix); + } + + /** + * ZoneBaned: 重复 待删除 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZoneBaned() + { + return $this->get("ZoneBaned"); + } + + /** + * ZoneBaned: 重复 待删除 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zoneBaned + */ + public function setZoneBaned($zoneBaned) + { + $this->set("ZoneBaned", $zoneBaned); + } + + /** + * IsolationGroupId: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @return string|null + */ + public function getIsolationGroupId() + { + return $this->get("IsolationGroupId"); + } + + /** + * IsolationGroupId: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @param string $isolationGroupId + */ + public function setIsolationGroupId($isolationGroupId) + { + $this->set("IsolationGroupId", $isolationGroupId); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @return string|null + */ + public function getMaxPods() + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @param string $maxPods + */ + public function setMaxPods($maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @return string|null + */ + public function getUserData() + { + return $this->get("UserData"); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @param string $userData + */ + public function setUserData($userData) + { + $this->set("UserData", $userData); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @return string|null + */ + public function getInitScript() + { + return $this->get("InitScript"); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @param string $initScript + */ + public function setInitScript($initScript) + { + $this->set("InitScript", $initScript); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @return string|null + */ + public function getTaints() + { + return $this->get("Taints"); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @param string $taints + */ + public function setTaints($taints) + { + $this->set("Taints", $taints); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @return string|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @param string $labels + */ + public function setLabels($labels) + { + $this->set("Labels", $labels); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * + * @return string|null + */ + public function getNetCapability() + { + return $this->get("NetCapability"); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * + * @param string $netCapability + */ + public function setNetCapability($netCapability) + { + $this->set("NetCapability", $netCapability); + } + + /** + * UNIFeature: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * + * @return boolean|null + */ + public function getUNIFeature() + { + return $this->get("UNIFeature"); + } + + /** + * UNIFeature: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * + * @param boolean $uniFeature + */ + public function setUNIFeature($uniFeature) + { + $this->set("UNIFeature", $uniFeature); + } + + /** + * SecGroupId: + * + * @return AddUK8SNodeGroupParamSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AddUK8SNodeGroupParamSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param AddUK8SNodeGroupParamSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * NetworkInterface: + * + * @return AddUK8SNodeGroupParamNetworkInterface[]|null + */ + public function getNetworkInterface() + { + $items = $this->get("NetworkInterface"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AddUK8SNodeGroupParamNetworkInterface($item)); + } + return $result; + } + + /** + * NetworkInterface: + * + * @param AddUK8SNodeGroupParamNetworkInterface[] $networkInterface + */ + public function setNetworkInterface(array $networkInterface) + { + $result = []; + foreach ($networkInterface as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * KubeletConfiguration: + * + * @return AddUK8SNodeGroupParamKubeletConfiguration|null + */ + public function getKubeletConfiguration() + { + return new AddUK8SNodeGroupParamKubeletConfiguration($this->get("KubeletConfiguration")); + } + + /** + * KubeletConfiguration: + * + * @param AddUK8SNodeGroupParamKubeletConfiguration $kubeletConfiguration + */ + public function setKubeletConfiguration(array $kubeletConfiguration) + { + $this->set("KubeletConfiguration", $kubeletConfiguration->getAll()); } } diff --git a/src/UK8S/Apis/UpdateUK8SNodeGroupRequest.php b/src/UK8S/Apis/UpdateUK8SNodeGroupRequest.php new file mode 100644 index 00000000..6f93350c --- /dev/null +++ b/src/UK8S/Apis/UpdateUK8SNodeGroupRequest.php @@ -0,0 +1,780 @@ + "UpdateUK8SNodeGroup"]); + $this->markRequired("Region"); + $this->markRequired("NodeGroupId"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeGroupId: 要修改的节点池Id + * + * @return string|null + */ + public function getNodeGroupId() + { + return $this->get("NodeGroupId"); + } + + /** + * NodeGroupId: 要修改的节点池Id + * + * @param string $nodeGroupId + */ + public function setNodeGroupId($nodeGroupId) + { + $this->set("NodeGroupId", $nodeGroupId); + } + + /** + * ClusterId: 要修改的集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 要修改的集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * NodeGroupName: 节点池名字 + * + * @return string|null + */ + public function getNodeGroupName() + { + return $this->get("NodeGroupName"); + } + + /** + * NodeGroupName: 节点池名字 + * + * @param string $nodeGroupName + */ + public function setNodeGroupName($nodeGroupName) + { + $this->set("NodeGroupName", $nodeGroupName); + } + + /** + * ImageId: 镜像ID + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * MachineType: 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * + * @return string|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * + * @param string $minimalCpuPlatform + */ + public function setMinimalCpuPlatform($minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } + + /** + * UHostFamily: 主机规格族 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 主机规格族 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + + /** + * CPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Mem: 内存大小。单位:MB + * + * @return integer|null + */ + public function getMem() + { + return $this->get("Mem"); + } + + /** + * Mem: 内存大小。单位:MB + * + * @param int $mem + */ + public function setMem($mem) + { + $this->set("Mem", $mem); + } + + /** + * GpuType: GPU类型 + * + * @return string|null + */ + public function getGpuType() + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU类型 + * + * @param string $gpuType + */ + public function setGpuType($gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * GPU: GPU卡核心数 + * + * @return integer|null + */ + public function getGPU() + { + return $this->get("GPU"); + } + + /** + * GPU: GPU卡核心数 + * + * @param int $gpu + */ + public function setGPU($gpu) + { + $this->set("GPU", $gpu); + } + + /** + * BootDiskType: 磁盘类型 + * + * @return string|null + */ + public function getBootDiskType() + { + return $this->get("BootDiskType"); + } + + /** + * BootDiskType: 磁盘类型 + * + * @param string $bootDiskType + */ + public function setBootDiskType($bootDiskType) + { + $this->set("BootDiskType", $bootDiskType); + } + + /** + * DataDiskSize: 数据磁盘大小 + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据磁盘大小 + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * DataDiskType: 磁盘类型 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 磁盘类型 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 计费模式 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * + * @return integer|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * + * @param int $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ZoneBaned: 重复 待删除 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZoneBaned() + { + return $this->get("ZoneBaned"); + } + + /** + * ZoneBaned: 重复 待删除 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zoneBaned + */ + public function setZoneBaned($zoneBaned) + { + $this->set("ZoneBaned", $zoneBaned); + } + + /** + * IsolationGroupId: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @return string|null + */ + public function getIsolationGroupId() + { + return $this->get("IsolationGroupId"); + } + + /** + * IsolationGroupId: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @param string $isolationGroupId + */ + public function setIsolationGroupId($isolationGroupId) + { + $this->set("IsolationGroupId", $isolationGroupId); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @return string|null + */ + public function getMaxPods() + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @param string $maxPods + */ + public function setMaxPods($maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @return string|null + */ + public function getUserData() + { + return $this->get("UserData"); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @param string $userData + */ + public function setUserData($userData) + { + $this->set("UserData", $userData); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @return string|null + */ + public function getInitScript() + { + return $this->get("InitScript"); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @param string $initScript + */ + public function setInitScript($initScript) + { + $this->set("InitScript", $initScript); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @return string|null + */ + public function getTaints() + { + return $this->get("Taints"); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @param string $taints + */ + public function setTaints($taints) + { + $this->set("Taints", $taints); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @return string|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @param string $labels + */ + public function setLabels($labels) + { + $this->set("Labels", $labels); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * + * @return string|null + */ + public function getNetCapability() + { + return $this->get("NetCapability"); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * + * @param string $netCapability + */ + public function setNetCapability($netCapability) + { + $this->set("NetCapability", $netCapability); + } + + /** + * UNIFeature: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * + * @return boolean|null + */ + public function getUNIFeature() + { + return $this->get("UNIFeature"); + } + + /** + * UNIFeature: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * + * @param boolean $uniFeature + */ + public function setUNIFeature($uniFeature) + { + $this->set("UNIFeature", $uniFeature); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @return string|null + */ + public function getSecurityMode() + { + return $this->get("SecurityMode"); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @param string $securityMode + */ + public function setSecurityMode($securityMode) + { + $this->set("SecurityMode", $securityMode); + } + + /** + * NodeNamePrefix: 自定义主机名前缀。完整的自定义主机名为{NodeNamePrefix}-{NodeIP}。 + * + * @return string|null + */ + public function getNodeNamePrefix() + { + return $this->get("NodeNamePrefix"); + } + + /** + * NodeNamePrefix: 自定义主机名前缀。完整的自定义主机名为{NodeNamePrefix}-{NodeIP}。 + * + * @param string $nodeNamePrefix + */ + public function setNodeNamePrefix($nodeNamePrefix) + { + $this->set("NodeNamePrefix", $nodeNamePrefix); + } + + /** + * SecGroupId: + * + * @return UpdateUK8SNodeGroupParamSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateUK8SNodeGroupParamSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param UpdateUK8SNodeGroupParamSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * NetworkInterface: + * + * @return UpdateUK8SNodeGroupParamNetworkInterface[]|null + */ + public function getNetworkInterface() + { + $items = $this->get("NetworkInterface"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateUK8SNodeGroupParamNetworkInterface($item)); + } + return $result; + } + + /** + * NetworkInterface: + * + * @param UpdateUK8SNodeGroupParamNetworkInterface[] $networkInterface + */ + public function setNetworkInterface(array $networkInterface) + { + $result = []; + foreach ($networkInterface as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * KubeletConfiguration: + * + * @return UpdateUK8SNodeGroupParamKubeletConfiguration|null + */ + public function getKubeletConfiguration() + { + return new UpdateUK8SNodeGroupParamKubeletConfiguration($this->get("KubeletConfiguration")); + } + + /** + * KubeletConfiguration: + * + * @param UpdateUK8SNodeGroupParamKubeletConfiguration $kubeletConfiguration + */ + public function setKubeletConfiguration(array $kubeletConfiguration) + { + $this->set("KubeletConfiguration", $kubeletConfiguration->getAll()); + } +} diff --git a/src/UK8S/Apis/UpdateUK8SNodeGroupResponse.php b/src/UK8S/Apis/UpdateUK8SNodeGroupResponse.php new file mode 100644 index 00000000..fc4901c9 --- /dev/null +++ b/src/UK8S/Apis/UpdateUK8SNodeGroupResponse.php @@ -0,0 +1,44 @@ +get("NodeGroupId"); + } + + /** + * NodeGroupId: 节点池ID + * + * @param string $nodeGroupId + */ + public function setNodeGroupId($nodeGroupId) + { + $this->set("NodeGroupId", $nodeGroupId); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfiguration.php b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfiguration.php new file mode 100644 index 00000000..44f36e4f --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfiguration.php @@ -0,0 +1,224 @@ +get("ContainerLogMaxFiles"); + } + + /** + * ContainerLogMaxFiles: 容器的日志文件个数上限,需大于等于2。控制台展示为containerLogMaxFiles + * + * @param int $containerLogMaxFiles + */ + public function setContainerLogMaxFiles($containerLogMaxFiles) + { + $this->set("ContainerLogMaxFiles", $containerLogMaxFiles); + } + + /** + * ContainerLogMaxSize: 容器日志文件轮换生成新文件的最大阈值,需以Mi结尾。控制台展示为containerLogMaxSize + * + * @return string|null + */ + public function getContainerLogMaxSize() + { + return $this->get("ContainerLogMaxSize"); + } + + /** + * ContainerLogMaxSize: 容器日志文件轮换生成新文件的最大阈值,需以Mi结尾。控制台展示为containerLogMaxSize + * + * @param string $containerLogMaxSize + */ + public function setContainerLogMaxSize($containerLogMaxSize) + { + $this->set("ContainerLogMaxSize", $containerLogMaxSize); + } + + /** + * ImageGCHighThresholdPercent: 配置镜像的磁盘用量百分比阈值,一旦镜像用量超过此阈值,镜像垃圾收集会一直运行。取值范围[1, 100], 同时需大于ImageGCLowThresholdPercent取值。控制台展示为imageGCHighThresholdPercent + * + * @return integer|null + */ + public function getImageGCHighThresholdPercent() + { + return $this->get("ImageGCHighThresholdPercent"); + } + + /** + * ImageGCHighThresholdPercent: 配置镜像的磁盘用量百分比阈值,一旦镜像用量超过此阈值,镜像垃圾收集会一直运行。取值范围[1, 100], 同时需大于ImageGCLowThresholdPercent取值。控制台展示为imageGCHighThresholdPercent + * + * @param int $imageGCHighThresholdPercent + */ + public function setImageGCHighThresholdPercent($imageGCHighThresholdPercent) + { + $this->set("ImageGCHighThresholdPercent", $imageGCHighThresholdPercent); + } + + /** + * ImageGCLowThresholdPercent: 配置镜像的磁盘用量百分比阈值,镜像用量低于此阈值时不会执行镜像垃圾收集操作。取值范围[1, 100], 同时需小于imageGCHighThresholdPercent取值。控制台展示为imageGCLowThresholdPercent + * + * @return integer|null + */ + public function getImageGCLowThresholdPercent() + { + return $this->get("ImageGCLowThresholdPercent"); + } + + /** + * ImageGCLowThresholdPercent: 配置镜像的磁盘用量百分比阈值,镜像用量低于此阈值时不会执行镜像垃圾收集操作。取值范围[1, 100], 同时需小于imageGCHighThresholdPercent取值。控制台展示为imageGCLowThresholdPercent + * + * @param int $imageGCLowThresholdPercent + */ + public function setImageGCLowThresholdPercent($imageGCLowThresholdPercent) + { + $this->set("ImageGCLowThresholdPercent", $imageGCLowThresholdPercent); + } + + /** + * MaxPods: Node能运行的Pod最大数量。需大于0。控制台展示为maxPods + * + * @return integer|null + */ + public function getMaxPods() + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: Node能运行的Pod最大数量。需大于0。控制台展示为maxPods + * + * @param int $maxPods + */ + public function setMaxPods($maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * EvictionHard: + * + * @return AddUK8SNodeGroupParamKubeletConfigurationEvictionHard|null + */ + public function getEvictionHard() + { + return new AddUK8SNodeGroupParamKubeletConfigurationEvictionHard($this->get("EvictionHard")); + } + + /** + * EvictionHard: + * + * @param AddUK8SNodeGroupParamKubeletConfigurationEvictionHard $evictionHard + */ + public function setEvictionHard(array $evictionHard) + { + $this->set("EvictionHard", $evictionHard->getAll()); + } + + /** + * EvictionSoft: + * + * @return AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft|null + */ + public function getEvictionSoft() + { + return new AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft($this->get("EvictionSoft")); + } + + /** + * EvictionSoft: + * + * @param AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft $evictionSoft + */ + public function setEvictionSoft(array $evictionSoft) + { + $this->set("EvictionSoft", $evictionSoft->getAll()); + } + + /** + * EvictionSoftGracePeriod: + * + * @return AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod|null + */ + public function getEvictionSoftGracePeriod() + { + return new AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod($this->get("EvictionSoftGracePeriod")); + } + + /** + * EvictionSoftGracePeriod: + * + * @param AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod $evictionSoftGracePeriod + */ + public function setEvictionSoftGracePeriod(array $evictionSoftGracePeriod) + { + $this->set("EvictionSoftGracePeriod", $evictionSoftGracePeriod->getAll()); + } + + /** + * KubeReserved: + * + * @return AddUK8SNodeGroupParamKubeletConfigurationKubeReserved|null + */ + public function getKubeReserved() + { + return new AddUK8SNodeGroupParamKubeletConfigurationKubeReserved($this->get("KubeReserved")); + } + + /** + * KubeReserved: + * + * @param AddUK8SNodeGroupParamKubeletConfigurationKubeReserved $kubeReserved + */ + public function setKubeReserved(array $kubeReserved) + { + $this->set("KubeReserved", $kubeReserved->getAll()); + } + + /** + * SystemReserved: + * + * @return AddUK8SNodeGroupParamKubeletConfigurationSystemReserved|null + */ + public function getSystemReserved() + { + return new AddUK8SNodeGroupParamKubeletConfigurationSystemReserved($this->get("SystemReserved")); + } + + /** + * SystemReserved: + * + * @param AddUK8SNodeGroupParamKubeletConfigurationSystemReserved $systemReserved + */ + public function setSystemReserved(array $systemReserved) + { + $this->set("SystemReserved", $systemReserved->getAll()); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionHard.php b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionHard.php new file mode 100644 index 00000000..ecee5224 --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionHard.php @@ -0,0 +1,104 @@ +get("MemoryAvailable"); + } + + /** + * MemoryAvailable: 触发Pod驱逐操作的硬性门限之内存用量: 需以Mi或Gi结尾。控制台展示为evictionHard - memory.available + * + * @param string $memoryAvailable + */ + public function setMemoryAvailable($memoryAvailable) + { + $this->set("MemoryAvailable", $memoryAvailable); + } + + /** + * ImagefsAvailable: 触发Pod驱逐操作的硬性门限之容器镜像剩余空间: 需以%结尾。控制台展示为evictionHard - imagefs.available + * + * @return string|null + */ + public function getImagefsAvailable() + { + return $this->get("ImagefsAvailable"); + } + + /** + * ImagefsAvailable: 触发Pod驱逐操作的硬性门限之容器镜像剩余空间: 需以%结尾。控制台展示为evictionHard - imagefs.available + * + * @param string $imagefsAvailable + */ + public function setImagefsAvailable($imagefsAvailable) + { + $this->set("ImagefsAvailable", $imagefsAvailable); + } + + /** + * NodefsAvailable: 触发Pod驱逐操作的硬性门限之节点存储剩余空间: 需以%结尾。控制台展示为evictionHard - nodefs.available + * + * @return string|null + */ + public function getNodefsAvailable() + { + return $this->get("NodefsAvailable"); + } + + /** + * NodefsAvailable: 触发Pod驱逐操作的硬性门限之节点存储剩余空间: 需以%结尾。控制台展示为evictionHard - nodefs.available + * + * @param string $nodefsAvailable + */ + public function setNodefsAvailable($nodefsAvailable) + { + $this->set("NodefsAvailable", $nodefsAvailable); + } + + /** + * NodefsInodesFree: 触发Pod驱逐操作的硬性门限节点inode剩余量: 需以%结尾。控制台展示为evictionHard - nodefs.inodesFree + * + * @return string|null + */ + public function getNodefsInodesFree() + { + return $this->get("NodefsInodesFree"); + } + + /** + * NodefsInodesFree: 触发Pod驱逐操作的硬性门限节点inode剩余量: 需以%结尾。控制台展示为evictionHard - nodefs.inodesFree + * + * @param string $nodefsInodesFree + */ + public function setNodefsInodesFree($nodefsInodesFree) + { + $this->set("NodefsInodesFree", $nodefsInodesFree); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft.php b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft.php new file mode 100644 index 00000000..08db4411 --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft.php @@ -0,0 +1,104 @@ +get("MemoryAvailable"); + } + + /** + * MemoryAvailable: 触发Pod驱逐操作的软性门限之内存用量: 需以Mi或Gi结尾。配置此值时必须同时配置EvictionSoftGracePeriod.MemoryAvailable。控制台展示为evictionSoft - memory.available + * + * @param string $memoryAvailable + */ + public function setMemoryAvailable($memoryAvailable) + { + $this->set("MemoryAvailable", $memoryAvailable); + } + + /** + * ImagefsAvailable: 触发Pod驱逐操作的软性门限之容器镜像剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.ImagefsAvailable。控制台展示为evictionSoft - imagefs.available + * + * @return string|null + */ + public function getImagefsAvailable() + { + return $this->get("ImagefsAvailable"); + } + + /** + * ImagefsAvailable: 触发Pod驱逐操作的软性门限之容器镜像剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.ImagefsAvailable。控制台展示为evictionSoft - imagefs.available + * + * @param string $imagefsAvailable + */ + public function setImagefsAvailable($imagefsAvailable) + { + $this->set("ImagefsAvailable", $imagefsAvailable); + } + + /** + * NodefsAvailable: 触发Pod驱逐操作的软性门限之节点存储剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsAvailable。控制台展示为evictionSoft - nodefs.available + * + * @return string|null + */ + public function getNodefsAvailable() + { + return $this->get("NodefsAvailable"); + } + + /** + * NodefsAvailable: 触发Pod驱逐操作的软性门限之节点存储剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsAvailable。控制台展示为evictionSoft - nodefs.available + * + * @param string $nodefsAvailable + */ + public function setNodefsAvailable($nodefsAvailable) + { + $this->set("NodefsAvailable", $nodefsAvailable); + } + + /** + * NodefsInodesFree: 触发Pod驱逐操作的软性门限节点inode剩余量: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsInodesFree。控制台展示为evictionSoft - nodefs.inodesFree + * + * @return string|null + */ + public function getNodefsInodesFree() + { + return $this->get("NodefsInodesFree"); + } + + /** + * NodefsInodesFree: 触发Pod驱逐操作的软性门限节点inode剩余量: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsInodesFree。控制台展示为evictionSoft - nodefs.inodesFree + * + * @param string $nodefsInodesFree + */ + public function setNodefsInodesFree($nodefsInodesFree) + { + $this->set("NodefsInodesFree", $nodefsInodesFree); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod.php b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod.php new file mode 100644 index 00000000..e3112492 --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod.php @@ -0,0 +1,104 @@ +get("MemoryAvailable"); + } + + /** + * MemoryAvailable: MemoryAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - memory.available + * + * @param string $memoryAvailable + */ + public function setMemoryAvailable($memoryAvailable) + { + $this->set("MemoryAvailable", $memoryAvailable); + } + + /** + * ImagefsAvailable: ImagefsAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - imagefs.available + * + * @return string|null + */ + public function getImagefsAvailable() + { + return $this->get("ImagefsAvailable"); + } + + /** + * ImagefsAvailable: ImagefsAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - imagefs.available + * + * @param string $imagefsAvailable + */ + public function setImagefsAvailable($imagefsAvailable) + { + $this->set("ImagefsAvailable", $imagefsAvailable); + } + + /** + * NodefsAvailable: NodefsAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - nodefs.available + * + * @return string|null + */ + public function getNodefsAvailable() + { + return $this->get("NodefsAvailable"); + } + + /** + * NodefsAvailable: NodefsAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - nodefs.available + * + * @param string $nodefsAvailable + */ + public function setNodefsAvailable($nodefsAvailable) + { + $this->set("NodefsAvailable", $nodefsAvailable); + } + + /** + * NodefsInodesFree: NodefsInodesFree软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - nodefs.inodesFree + * + * @return string|null + */ + public function getNodefsInodesFree() + { + return $this->get("NodefsInodesFree"); + } + + /** + * NodefsInodesFree: NodefsInodesFree软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - nodefs.inodesFree + * + * @param string $nodefsInodesFree + */ + public function setNodefsInodesFree($nodefsInodesFree) + { + $this->set("NodefsInodesFree", $nodefsInodesFree); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationKubeReserved.php b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationKubeReserved.php new file mode 100644 index 00000000..ec7cddbd --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationKubeReserved.php @@ -0,0 +1,104 @@ +get("CPU"); + } + + /** + * CPU: kubelet预留CPU资源,以m结尾。控制台展示为kubeReserved - cpu + * + * @param string $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: kubelet预留内存资源,以Mi结尾。控制台展示为kubeReserved - memory + * + * @return string|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: kubelet预留内存资源,以Mi结尾。控制台展示为kubeReserved - memory + * + * @param string $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * EphemeralStorage: kubelet预留存储空间,以Gi结尾。控制台展示为kubeReserved - ephemeral-storage + * + * @return string|null + */ + public function getEphemeralStorage() + { + return $this->get("EphemeralStorage"); + } + + /** + * EphemeralStorage: kubelet预留存储空间,以Gi结尾。控制台展示为kubeReserved - ephemeral-storage + * + * @param string $ephemeralStorage + */ + public function setEphemeralStorage($ephemeralStorage) + { + $this->set("EphemeralStorage", $ephemeralStorage); + } + + /** + * Pid: kubelet预留pid数量,必须大于等于500, string方式提供。控制台展示为kubeReserved - pid + * + * @return string|null + */ + public function getPid() + { + return $this->get("Pid"); + } + + /** + * Pid: kubelet预留pid数量,必须大于等于500, string方式提供。控制台展示为kubeReserved - pid + * + * @param string $pid + */ + public function setPid($pid) + { + $this->set("Pid", $pid); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationSystemReserved.php b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationSystemReserved.php new file mode 100644 index 00000000..07f0482d --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamKubeletConfigurationSystemReserved.php @@ -0,0 +1,104 @@ +get("CPU"); + } + + /** + * CPU: 系统预留CPU资源,以m结尾。控制台展示为systemReserved - cpu + * + * @param string $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 系统预留内存资源,以Mi结尾。控制台展示为systemReserved - memory + * + * @return string|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 系统预留内存资源,以Mi结尾。控制台展示为systemReserved - memory + * + * @param string $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * EphemeralStorage: 系统预留存储空间,以Gi结尾。控制台展示为systemReserved - ephemeral-storage + * + * @return string|null + */ + public function getEphemeralStorage() + { + return $this->get("EphemeralStorage"); + } + + /** + * EphemeralStorage: 系统预留存储空间,以Gi结尾。控制台展示为systemReserved - ephemeral-storage + * + * @param string $ephemeralStorage + */ + public function setEphemeralStorage($ephemeralStorage) + { + $this->set("EphemeralStorage", $ephemeralStorage); + } + + /** + * Pid: 系统预留pid数量,必须大于等于500, string方式提供。控制台展示为systemReserved - pid + * + * @return string|null + */ + public function getPid() + { + return $this->get("Pid"); + } + + /** + * Pid: 系统预留pid数量,必须大于等于500, string方式提供。控制台展示为systemReserved - pid + * + * @param string $pid + */ + public function setPid($pid) + { + $this->set("Pid", $pid); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamNetworkInterface.php b/src/UK8S/Params/AddUK8SNodeGroupParamNetworkInterface.php new file mode 100644 index 00000000..fea4ff0b --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamNetworkInterface.php @@ -0,0 +1,44 @@ +get("EIP")); + } + + /** + * EIP: + * + * @param AddUK8SNodeGroupParamNetworkInterfaceEIP $eip + */ + public function setEIP(array $eip) + { + $this->set("EIP", $eip->getAll()); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamNetworkInterfaceEIP.php b/src/UK8S/Params/AddUK8SNodeGroupParamNetworkInterfaceEIP.php new file mode 100644 index 00000000..f4187e7a --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamNetworkInterfaceEIP.php @@ -0,0 +1,124 @@ +get("Bandwidth"); + } + + /** + * Bandwidth: 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @return string|null + */ + public function getShareBandwidthId() + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId($shareBandwidthId) + { + $this->set("ShareBandwidthId", $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 + * + * @return string|null + */ + public function getOperatorName() + { + return $this->get("OperatorName"); + } + + /** + * 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 + */ + public function setOperatorName($operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UK8S/Params/AddUK8SNodeGroupParamSecGroupId.php b/src/UK8S/Params/AddUK8SNodeGroupParamSecGroupId.php new file mode 100644 index 00000000..7ce19437 --- /dev/null +++ b/src/UK8S/Params/AddUK8SNodeGroupParamSecGroupId.php @@ -0,0 +1,84 @@ +get("Id"); + } + + /** + * Id: 安全组 ID。至多可以同时绑定5个安全组。 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @return string|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @param string $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * Name: 安全组名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 安全组名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/Params/UpdateUK8SNodeGroupParamKubeletConfiguration.php b/src/UK8S/Params/UpdateUK8SNodeGroupParamKubeletConfiguration.php new file mode 100644 index 00000000..754f8869 --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SNodeGroupParamKubeletConfiguration.php @@ -0,0 +1,44 @@ +get("ContainerLogMaxFiles"); + } + + /** + * ContainerLogMaxFiles: 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + * + * @param int $containerLogMaxFiles + */ + public function setContainerLogMaxFiles($containerLogMaxFiles) + { + $this->set("ContainerLogMaxFiles", $containerLogMaxFiles); + } +} diff --git a/src/UK8S/Params/UpdateUK8SNodeGroupParamNetworkInterface.php b/src/UK8S/Params/UpdateUK8SNodeGroupParamNetworkInterface.php new file mode 100644 index 00000000..9abe0855 --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SNodeGroupParamNetworkInterface.php @@ -0,0 +1,44 @@ +get("EIP")); + } + + /** + * EIP: + * + * @param UpdateUK8SNodeGroupParamNetworkInterfaceEIP $eip + */ + public function setEIP(array $eip) + { + $this->set("EIP", $eip->getAll()); + } +} diff --git a/src/UK8S/Params/UpdateUK8SNodeGroupParamNetworkInterfaceEIP.php b/src/UK8S/Params/UpdateUK8SNodeGroupParamNetworkInterfaceEIP.php new file mode 100644 index 00000000..11e3b77d --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SNodeGroupParamNetworkInterfaceEIP.php @@ -0,0 +1,124 @@ +get("Bandwidth"); + } + + /** + * Bandwidth: 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @return string|null + */ + public function getShareBandwidthId() + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId($shareBandwidthId) + { + $this->set("ShareBandwidthId", $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 + * + * @return string|null + */ + public function getOperatorName() + { + return $this->get("OperatorName"); + } + + /** + * 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 + */ + public function setOperatorName($operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UK8S/Params/UpdateUK8SNodeGroupParamSecGroupId.php b/src/UK8S/Params/UpdateUK8SNodeGroupParamSecGroupId.php new file mode 100644 index 00000000..310f19db --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SNodeGroupParamSecGroupId.php @@ -0,0 +1,84 @@ +get("Id"); + } + + /** + * Id: 安全组 ID。至多可以同时绑定5个安全组。 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @return string|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @param string $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * Name: 安全组名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 安全组名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/UK8SClient.php b/src/UK8S/UK8SClient.php index e5661c76..57afb0cd 100644 --- a/src/UK8S/UK8SClient.php +++ b/src/UK8S/UK8SClient.php @@ -56,6 +56,8 @@ use UCloud\UK8S\Apis\ListUK8SULSConfigResponse; use UCloud\UK8S\Apis\RemoveUK8SNodeGroupRequest; use UCloud\UK8S\Apis\RemoveUK8SNodeGroupResponse; +use UCloud\UK8S\Apis\UpdateUK8SNodeGroupRequest; +use UCloud\UK8S\Apis\UpdateUK8SNodeGroupResponse; use UCloud\UK8S\Apis\UpdateUK8SULSConfigRequest; use UCloud\UK8S\Apis\UpdateUK8SULSConfigResponse; @@ -117,18 +119,86 @@ public function addUK8SExistingUHost(AddUK8SExistingUHostRequest $request = null * "ClusterId" => (string) 集群ID * "ImageId" => (string) 镜像ID * "MachineType" => (string) 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 - * "MinimalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" - * "CPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * "CPU" => (integer) CPU个数 * "Mem" => (integer) 内存大小。单位:MB - * "GpuType" => (string) GPU类型 - * "GPU" => (integer) GPU卡核心数 * "BootDiskType" => (string) 磁盘类型 + * "BootDiskSize" => (integer) 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * "SubnetId" => (string) 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * "MinimalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * "GpuType" => (string) GPU类型 + * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) * "DataDiskSize" => (integer) 数据磁盘大小 * "DataDiskType" => (string) 磁盘类型 * "Tag" => (string) 业务组 * "ChargeType" => (string) 计费模式 - * "BootDiskSize" => (integer) 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 - * "SubnetId" => (string) 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * "UHostFamily" => (string) 主机规格族 + * "SecurityMode" => (string) 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * "NodeNamePrefix" => (string) 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。 + * "ZoneBaned" => (string) 重复 待删除 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "IsolationGroupId" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * "MaxPods" => (string) 默认110,生产环境建议小于等于110。 + * "UserData" => (string) 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * "InitScript" => (string) 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * "Taints" => (string) Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * "Labels" => (string) Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * "NetCapability" => (string) 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * "UNIFeature" => (boolean) 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组 ID。至多可以同时绑定5个安全组。 + * "Priority" => (string) 安全组优先级。取值范围[1, 5] + * "Name" => (string) 安全组名称。 + * ] + * ] + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "NetworkInterface" => (array) [ + * [ + * "EIP" => (object) [ + * "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 + * "CouponId" => (string) 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * ] + * ] + * ] + * "KubeletConfiguration" => (object) [ + * "ContainerLogMaxFiles" => (integer) 容器的日志文件个数上限,需大于等于2。控制台展示为containerLogMaxFiles + * "ContainerLogMaxSize" => (string) 容器日志文件轮换生成新文件的最大阈值,需以Mi结尾。控制台展示为containerLogMaxSize + * "ImageGCHighThresholdPercent" => (integer) 配置镜像的磁盘用量百分比阈值,一旦镜像用量超过此阈值,镜像垃圾收集会一直运行。取值范围[1, 100], 同时需大于ImageGCLowThresholdPercent取值。控制台展示为imageGCHighThresholdPercent + * "ImageGCLowThresholdPercent" => (integer) 配置镜像的磁盘用量百分比阈值,镜像用量低于此阈值时不会执行镜像垃圾收集操作。取值范围[1, 100], 同时需小于imageGCHighThresholdPercent取值。控制台展示为imageGCLowThresholdPercent + * "MaxPods" => (integer) Node能运行的Pod最大数量。需大于0。控制台展示为maxPods + * "EvictionHard" => (object) [ + * "MemoryAvailable" => (string) 触发Pod驱逐操作的硬性门限之内存用量: 需以Mi或Gi结尾。控制台展示为evictionHard - memory.available + * "ImagefsAvailable" => (string) 触发Pod驱逐操作的硬性门限之容器镜像剩余空间: 需以%结尾。控制台展示为evictionHard - imagefs.available + * "NodefsAvailable" => (string) 触发Pod驱逐操作的硬性门限之节点存储剩余空间: 需以%结尾。控制台展示为evictionHard - nodefs.available + * "NodefsInodesFree" => (string) 触发Pod驱逐操作的硬性门限节点inode剩余量: 需以%结尾。控制台展示为evictionHard - nodefs.inodesFree + * ] + * "EvictionSoft" => (object) [ + * "MemoryAvailable" => (string) 触发Pod驱逐操作的软性门限之内存用量: 需以Mi或Gi结尾。配置此值时必须同时配置EvictionSoftGracePeriod.MemoryAvailable。控制台展示为evictionSoft - memory.available + * "ImagefsAvailable" => (string) 触发Pod驱逐操作的软性门限之容器镜像剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.ImagefsAvailable。控制台展示为evictionSoft - imagefs.available + * "NodefsAvailable" => (string) 触发Pod驱逐操作的软性门限之节点存储剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsAvailable。控制台展示为evictionSoft - nodefs.available + * "NodefsInodesFree" => (string) 触发Pod驱逐操作的软性门限节点inode剩余量: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsInodesFree。控制台展示为evictionSoft - nodefs.inodesFree + * ] + * "EvictionSoftGracePeriod" => (object) [ + * "MemoryAvailable" => (string) MemoryAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - memory.available + * "ImagefsAvailable" => (string) ImagefsAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - imagefs.available + * "NodefsAvailable" => (string) NodefsAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - nodefs.available + * "NodefsInodesFree" => (string) NodefsInodesFree软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - nodefs.inodesFree + * ] + * "KubeReserved" => (object) [ + * "CPU" => (string) kubelet预留CPU资源,以m结尾。控制台展示为kubeReserved - cpu + * "Memory" => (string) kubelet预留内存资源,以Mi结尾。控制台展示为kubeReserved - memory + * "EphemeralStorage" => (string) kubelet预留存储空间,以Gi结尾。控制台展示为kubeReserved - ephemeral-storage + * "Pid" => (string) kubelet预留pid数量,必须大于等于500, string方式提供。控制台展示为kubeReserved - pid + * ] + * "SystemReserved" => (object) [ + * "CPU" => (string) 系统预留CPU资源,以m结尾。控制台展示为systemReserved - cpu + * "Memory" => (string) 系统预留内存资源,以Mi结尾。控制台展示为systemReserved - memory + * "EphemeralStorage" => (string) 系统预留存储空间,以Gi结尾。控制台展示为systemReserved - ephemeral-storage + * "Pid" => (string) 系统预留pid数量,必须大于等于500, string方式提供。控制台展示为systemReserved - pid + * ] + * ] * ] * * Outputs: @@ -1361,6 +1431,85 @@ public function removeUK8SNodeGroup(RemoveUK8SNodeGroupRequest $request = null) return new RemoveUK8SNodeGroupResponse($resp->toArray(), $resp->getRequestId()); } + /** + * UpdateUK8SNodeGroup - 修改UK8S节点池 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/update_uk8s_node_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeGroupId" => (string) 要修改的节点池Id + * "ClusterId" => (string) 要修改的集群ID + * "NodeGroupName" => (string) 节点池名字 + * "ImageId" => (string) 镜像ID + * "MachineType" => (string) 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "MinimalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * "UHostFamily" => (string) 主机规格族 + * "CPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * "Mem" => (integer) 内存大小。单位:MB + * "GpuType" => (string) GPU类型 + * "GPU" => (integer) GPU卡核心数 + * "BootDiskType" => (string) 磁盘类型 + * "DataDiskSize" => (integer) 数据磁盘大小 + * "DataDiskType" => (string) 磁盘类型 + * "Tag" => (string) 业务组 + * "ChargeType" => (string) 计费模式 + * "BootDiskSize" => (integer) 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * "SubnetId" => (string) 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * "ZoneBaned" => (string) 重复 待删除 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "IsolationGroupId" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * "MaxPods" => (string) 默认110,生产环境建议小于等于110。 + * "UserData" => (string) 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * "InitScript" => (string) 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * "Taints" => (string) Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * "Labels" => (string) Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * "NetCapability" => (string) 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * "UNIFeature" => (boolean) 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * "SecurityMode" => (string) 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * "NodeNamePrefix" => (string) 自定义主机名前缀。完整的自定义主机名为{NodeNamePrefix}-{NodeIP}。 + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组 ID。至多可以同时绑定5个安全组。 + * "Priority" => (string) 安全组优先级。取值范围[1, 5] + * "Name" => (string) 安全组名称。 + * ] + * ] + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "NetworkInterface" => (array) [ + * [ + * "EIP" => (object) [ + * "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 + * "CouponId" => (string) 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * ] + * ] + * ] + * "KubeletConfiguration" => (object) [ + * "ContainerLogMaxFiles" => (integer) 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeGroupId" => (string) 节点池ID + * ] + * + * @return UpdateUK8SNodeGroupResponse + * @throws UCloudException + */ + public function updateUK8SNodeGroup(UpdateUK8SNodeGroupRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUK8SNodeGroupResponse($resp->toArray(), $resp->getRequestId()); + } + /** * UpdateUK8SULSConfig - 更新指定UK8S集群的日志采集规则。 *