diff --git a/CHANGELOG.md b/CHANGELOG.md index 3968f32b7f..95ebb9dcb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ -## 1.56.8 (Unreleased) +## 1.56.9 (Unreleased) +## 1.56.8 (May 26, 2021) + +ENHANCEMENTS: + +* Resource `tencentcloud_kubernetes_cluster_attachment.worker_config` add `desired_pod_num`. +* Resource `tencentcloud_kubernetes_cluster_attachment` add `worker_config_overrides`. +* Resource `tencentcloud_kubernetes_scale_worker` add `desired_pod_num`. +* Resource `tencentcloud_kubernetes_cluster` add `enable_customized_pod_cidr`, `base_pod_num`, `globe_desired_pod_num`, and `exist_instance`. +* Resource `tencentcloud_kubernetes_cluster` update available value of `cluster_os`. +* Resource `tencentcloud_as_lifecycle_hook` update `heartbeat_timeout` value ranges. + ## 1.56.7 (May 12, 2021) ENHANCEMENTS: diff --git a/go.mod b/go.mod index b4684915b4..b96bd68edc 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/mattn/go-colorable v0.1.6 // indirect github.com/mitchellh/go-homedir v1.1.0 github.com/pkg/errors v0.9.1 - github.com/tencentcloud/tencentcloud-sdk-go v1.0.155 + github.com/tencentcloud/tencentcloud-sdk-go v1.0.165 github.com/yangwenmai/ratelimit v0.0.0-20180104140304-44221c2292e1 github.com/zclconf/go-cty v1.4.2 // indirect golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect diff --git a/go.sum b/go.sum index e0ad7fbcb1..80567b0ccc 100644 --- a/go.sum +++ b/go.sum @@ -441,8 +441,8 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 h1:Xr9gkxfOP0KQWXKNqmwe8vEeSUiUj4Rlee9CMVX2ZUQ= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/tencentcloud/tencentcloud-sdk-go v1.0.155 h1:jFyQ7gV9e3HD4yRqTpN6P3+bZwqlYaAhkb87gTc2zT4= -github.com/tencentcloud/tencentcloud-sdk-go v1.0.155/go.mod h1:asUz5BPXxgoPGaRgZaVm1iGcUAuHyYUo1nXqKa83cvI= +github.com/tencentcloud/tencentcloud-sdk-go v1.0.165 h1:d9L8aoQ781XBO8pnE9EvFm64ptfBVMqVNcKQ2MS+TUM= +github.com/tencentcloud/tencentcloud-sdk-go v1.0.165/go.mod h1:asUz5BPXxgoPGaRgZaVm1iGcUAuHyYUo1nXqKa83cvI= github.com/tetafro/godot v0.3.7 h1:+mecr7RKrUKB5UQ1gwqEMn13sDKTyDR8KNIquB9mm+8= github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= diff --git a/tencentcloud/extension_tke.go b/tencentcloud/extension_tke.go index 68e77901a4..f624fe3f15 100644 --- a/tencentcloud/extension_tke.go +++ b/tencentcloud/extension_tke.go @@ -2,21 +2,19 @@ package tencentcloud const ( TKE_CLUSTER_OS_CENTOS72 = "centos7.2x86_64" - TKE_CLUSTER_OS_CENTOS76 = "centos7.6x86_64" - TKE_CLUSTER_OS_UBUNTU16 = "ubuntu16.04.1 LTSx86_64" - TKE_CLUSTER_OS_UBUNTU18 = "ubuntu18.04.1 LTSx86_64" + TKE_CLUSTER_OS_CENTOS76 = "centos7.6.0_x64" + TKE_CLUSTER_OS_UBUNTU18 = "ubuntu18.04.1x86_64" TKE_CLUSTER_OS_LINUX24 = "tlinux2.4x86_64" TKE_CLUSTER_OS_LINUX22 = "tlinux2.2(tkernel3)x86_64" TKE_CLUSTER_OS_LINUXF22 = "Tencent tlinux release 2.2 (Final)" ) -var TKE_CLUSTER_OS = []string{TKE_CLUSTER_OS_CENTOS72, TKE_CLUSTER_OS_CENTOS76, TKE_CLUSTER_OS_UBUNTU16, TKE_CLUSTER_OS_UBUNTU18, TKE_CLUSTER_OS_LINUX24} +var TKE_CLUSTER_OS = []string{TKE_CLUSTER_OS_CENTOS76, TKE_CLUSTER_OS_UBUNTU18, TKE_CLUSTER_OS_LINUX24} var tkeClusterOsMap = map[string]string{TKE_CLUSTER_OS_CENTOS72: TKE_CLUSTER_OS_CENTOS72, - TKE_CLUSTER_OS_CENTOS76: "centos7.6.0_x64", - TKE_CLUSTER_OS_UBUNTU16: TKE_CLUSTER_OS_UBUNTU16, - TKE_CLUSTER_OS_UBUNTU18: "ubuntu18.04.1x86_64", - TKE_CLUSTER_OS_LINUX24: "tlinux2.4x86_64", + TKE_CLUSTER_OS_CENTOS76: TKE_CLUSTER_OS_CENTOS76, + TKE_CLUSTER_OS_UBUNTU18: TKE_CLUSTER_OS_UBUNTU18, + TKE_CLUSTER_OS_LINUX24: TKE_CLUSTER_OS_LINUX24, TKE_CLUSTER_OS_LINUX22: TKE_CLUSTER_OS_LINUX22, TKE_CLUSTER_OS_LINUXF22: TKE_CLUSTER_OS_LINUXF22, } diff --git a/tencentcloud/resource_tc_as_lifecycle_hook.go b/tencentcloud/resource_tc_as_lifecycle_hook.go index aa52fb689f..ce51128618 100644 --- a/tencentcloud/resource_tc_as_lifecycle_hook.go +++ b/tencentcloud/resource_tc_as_lifecycle_hook.go @@ -65,8 +65,8 @@ func resourceTencentCloudAsLifecycleHook() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 300, - ValidateFunc: validateIntegerInRange(30, 3600), - Description: "Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~3600). and default value is `300`.", + ValidateFunc: validateIntegerInRange(30, 7200), + Description: "Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~7200). and default value is `300`.", }, "notification_metadata": { Type: schema.TypeString, diff --git a/tencentcloud/resource_tc_container_cluster.go b/tencentcloud/resource_tc_container_cluster.go index 9e16e7257c..1c90628b82 100644 --- a/tencentcloud/resource_tc_container_cluster.go +++ b/tencentcloud/resource_tc_container_cluster.go @@ -449,7 +449,7 @@ func resourceTencentCloudContainerClusterCreate(d *schema.ResourceData, meta int runInstancesParas := runInstancesPara.ToJsonString() cvms.Work = []string{runInstancesParas} - id, err := service.CreateCluster(ctx, basic, cAdvanced, cvms, iAdvanced, cidrSet, map[string]string{}) + id, err := service.CreateCluster(ctx, basic, cAdvanced, cvms, iAdvanced, cidrSet, map[string]string{}, nil, nil) if err != nil { return err } diff --git a/tencentcloud/resource_tc_kubernetes_cluster.go b/tencentcloud/resource_tc_kubernetes_cluster.go index 75a99fe104..09ea6efb12 100644 --- a/tencentcloud/resource_tc_kubernetes_cluster.go +++ b/tencentcloud/resource_tc_kubernetes_cluster.go @@ -549,9 +549,56 @@ func TkeCvmCreateInfo() map[string]*schema.Schema { Elem: &schema.Schema{Type: schema.TypeString}, Description: "Disaster recover groups to which a CVM instance belongs. Only support maximum 1.", }, + // InstanceAdvancedSettingsOverrides + "desired_pod_num": { + Type: schema.TypeInt, + ForceNew: true, + Optional: true, + Default: -1, + Description: "Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, " + + "and it override `[globe_]desired_pod_num` for current node. Either all the fields `desired_pod_num` or none.", + }, + } +} + +func TkeExistCvmCreateInfo() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "node_role": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + ValidateFunc: validateAllowedStringValue([]string{TKE_ROLE_WORKER, TKE_ROLE_MASTER_ETCD}), + Description: "Role of existed node. value:MASTER_ETCD or WORKER.", + }, + "instances_para": { + Type: schema.TypeList, + ForceNew: true, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "instance_ids": { + Type: schema.TypeList, + ForceNew: true, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Description: "Cluster IDs.", + }, + }, + }, + Description: "Reinstallation parameters of an existing instance.", + }, + "desired_pod_numbers": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeInt}, + Description: "Custom mode cluster, you can specify the number of pods for each node. corresponding to the existed_instances_para.instance_ids parameter.", + }, } } + func TkeNodePoolGlobalConfig() map[string]*schema.Schema { return map[string]*schema.Schema{ "is_scale_in_enabled": { @@ -627,9 +674,9 @@ func resourceTencentCloudTkeCluster() *schema.Resource { Type: schema.TypeString, ForceNew: true, Optional: true, - Default: TKE_CLUSTER_OS_UBUNTU16, + Default: TKE_CLUSTER_OS_LINUX24, Description: "Operating system of the cluster, the available values include: '" + strings.Join(TKE_CLUSTER_OS, "','") + - "'. Default is '" + TKE_CLUSTER_OS_UBUNTU16 + "'.", + "'. Default is '" + TKE_CLUSTER_OS_LINUX24 + "'.", }, "cluster_os_type": { Type: schema.TypeString, @@ -739,6 +786,19 @@ func resourceTencentCloudTkeCluster() *schema.Resource { ValidateFunc: validateAllowedStringValue(TKE_CLUSTER_NETWORK_TYPE), Description: "Cluster network type, GR or VPC-CNI. Default is GR.", }, + "enable_customized_pod_cidr": { + Type: schema.TypeBool, + ForceNew: true, + Optional: true, + Default: false, + Description: "Whether to enable the custom mode of node podCIDR size. Default is false.", + }, + "base_pod_num": { + Type: schema.TypeInt, + ForceNew: true, + Optional: true, + Description: "The number of basic pods. valid when enable_customized_pod_cidr=true.", + }, "is_non_static_ip_mode": { Type: schema.TypeBool, ForceNew: true, @@ -958,6 +1018,15 @@ func resourceTencentCloudTkeCluster() *schema.Resource { }, Description: "Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_worker'.", }, + "exist_instance": { + Type: schema.TypeList, + ForceNew: true, + Optional: true, + Elem: &schema.Resource{ + Schema: TkeExistCvmCreateInfo(), + }, + Description: "create tke cluster by existed instances.", + }, "tags": { Type: schema.TypeMap, Optional: true, @@ -1005,6 +1074,12 @@ func resourceTencentCloudTkeCluster() *schema.Resource { ForceNew: true, Description: "Mount target. Default is not mounting.", }, + "globe_desired_pod_num": { + Type: schema.TypeInt, + ForceNew: true, + Optional: true, + Description: "Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.", + }, "docker_graph_path": { Type: schema.TypeString, Optional: true, @@ -1269,6 +1344,37 @@ func tkeGetCvmRunInstancesPara(dMap map[string]interface{}, meta interface{}, return } +func tkeGetCvmExistInstancesPara(dMap map[string]interface{}) (tke.ExistedInstancesForNode, error) { + + inst := tke.ExistedInstancesForNode{} + + if temp, ok := dMap["instances_para"]; ok { + paras := temp.([]interface{}) + if len(paras) > 0 { + paraMap := paras[0].(map[string]interface{}) + instanceIds := paraMap["instance_ids"].([]interface{}) + inst.ExistedInstancesPara = &tke.ExistedInstancesPara{} + inst.ExistedInstancesPara.InstanceIds = make([]*string, 0) + for _, v := range instanceIds { + inst.ExistedInstancesPara.InstanceIds = append(inst.ExistedInstancesPara.InstanceIds, helper.String(v.(string))) + } + } + } + if temp, ok := dMap["desired_pod_numbers"]; ok { + inst.DesiredPodNumbers = make([]*int64, 0) + podNums := temp.([]interface{}) + for _, v := range podNums { + inst.DesiredPodNumbers = append(inst.DesiredPodNumbers, helper.Int64(int64(v.(int)))) + } + } + if temp, ok := dMap["node_role"]; ok { + nodeRole := temp.(string) + inst.NodeRole = &nodeRole + } + + return inst, nil +} + func tkeGetNodePoolGlobalConfig(d *schema.ResourceData) *tke.ModifyClusterAsGroupOptionAttributeRequest { request := tke.NewModifyClusterAsGroupOptionAttributeRequest() request.ClusterId = helper.String(d.Id()) @@ -1424,12 +1530,6 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface basic.ClusterOsType = d.Get("cluster_os_type").(string) - if basic.ClusterOsType == TKE_CLUSTER_OS_TYPE_DOCKER_CUSTOMIZE { - if cluster_os != TKE_CLUSTER_OS_UBUNTU18 && cluster_os != TKE_CLUSTER_OS_CENTOS76 { - return fmt.Errorf("Only 'centos7.6x86_64' or 'ubuntu18.04.1 LTSx86_64' support 'DOCKER_CUSTOMIZE' now, can not be " + basic.ClusterOs) - } - } - basic.ClusterVersion = d.Get("cluster_version").(string) if v, ok := d.GetOk("cluster_name"); ok { basic.ClusterName = v.(string) @@ -1446,6 +1546,10 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface advanced.IsNonStaticIpMode = d.Get("is_non_static_ip_mode").(bool) advanced.DeletionProtection = d.Get("deletion_protection").(bool) advanced.KubeProxyMode = d.Get("kube_proxy_mode").(string) + advanced.EnableCustomizedPodCIDR = d.Get("enable_customized_pod_cidr").(bool) + if v, ok := d.GetOk("base_pod_num"); ok { + advanced.BasePodNumber = int64(v.(int)) + } if extraArgs, ok := d.GetOk("cluster_extra_args"); ok { extraArgList := extraArgs.([]interface{}) @@ -1509,6 +1613,7 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface } } + overrideSettings := make([]tke.InstanceAdvancedSettings, 0) if masters, ok := d.GetOk("master_config"); ok { if clusterDeployType == TKE_DEPLOY_TYPE_MANAGED { return fmt.Errorf("if `cluster_deploy_type` is `MANAGED_CLUSTER` , You don't need define the master yourself") @@ -1524,6 +1629,13 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface cvms.Master = append(cvms.Master, paraJson) masterCount += count + + if v, ok := master["desired_pod_num"]; ok { + dpNum := int64(v.(int)) + if dpNum != -1 { + overrideSettings = append(overrideSettings, tke.InstanceAdvancedSettings{DesiredPodNumber: helper.Int64(dpNum)}) + } + } } if masterCount < 3 { return fmt.Errorf("if `cluster_deploy_type` is `TKE_DEPLOY_TYPE_INDEPENDENT` len(master_config) should >=3") @@ -1540,11 +1652,17 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface for index := range workerList { worker := workerList[index].(map[string]interface{}) paraJson, _, err := tkeGetCvmRunInstancesPara(worker, meta, vpcId, basic.ProjectId) - if err != nil { return err } cvms.Work = append(cvms.Work, paraJson) + + if v, ok := worker["desired_pod_num"]; ok { + dpNum := int64(v.(int)) + if dpNum != -1 { + overrideSettings = append(overrideSettings, tke.InstanceAdvancedSettings{DesiredPodNumber: helper.Int64(dpNum)}) + } + } } } @@ -1567,10 +1685,28 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface if temp, ok := d.GetOk("mount_target"); ok { iAdvanced.MountTarget = temp.(string) } + if temp, ok := d.GetOk("globe_desired_pod_num"); ok { + iAdvanced.DesiredPodNum = int64(temp.(int)) + } - service := TkeService{client: meta.(*TencentCloudClient).apiV3Conn} + // ExistedInstancesForNode + existIntances := make([]*tke.ExistedInstancesForNode, 0) + if instances, ok := d.GetOk("exist_instance"); ok { + instanceList := instances.([]interface{}) + for index := range instanceList { + instance := instanceList[index].(map[string]interface{}) + existedInstance, _ := tkeGetCvmExistInstancesPara(instance) + existIntances = append(existIntances, &existedInstance) + } + } + + // RunInstancesForNode(master_config+worker_config) 和 ExistedInstancesForNode 不能同时存在 + if len(cvms.Master)+len(cvms.Work) > 0 && len(existIntances) > 0 { + return fmt.Errorf("master_config+worker_config and exist_instance can not exist at the same time") + } - id, err := service.CreateCluster(ctx, basic, advanced, cvms, iAdvanced, cidrSet, tags) + service := TkeService{client: meta.(*TencentCloudClient).apiV3Conn} + id, err := service.CreateCluster(ctx, basic, advanced, cvms, iAdvanced, cidrSet, tags, existIntances, overrideSettings) if err != nil { return err } diff --git a/tencentcloud/resource_tc_kubernetes_cluster_attachment.go b/tencentcloud/resource_tc_kubernetes_cluster_attachment.go index 9f384cada2..0efe643ab0 100644 --- a/tencentcloud/resource_tc_kubernetes_cluster_attachment.go +++ b/tencentcloud/resource_tc_kubernetes_cluster_attachment.go @@ -89,6 +89,10 @@ resource "tencentcloud_kubernetes_cluster_attachment" "test_attach" { "test1" = "test1", "test2" = "test2", } + + worker_config_overrides { + desired_pod_num = 8 + } } ``` */ @@ -190,6 +194,12 @@ func TkeInstanceAdvancedSetting() map[string]*schema.Schema { Default: true, Description: "Indicate to schedule the adding node or not. Default is true.", }, + "desired_pod_num": { + Type: schema.TypeInt, + ForceNew: true, + Optional: true, + Description: "Indicate to set desired pod number in node. valid when the cluster is podCIDR.", + }, } } @@ -242,6 +252,16 @@ func resourceTencentCloudTkeClusterAttachment() *schema.Resource { }, Description: "Deploy the machine configuration information of the 'WORKER', commonly used to attach existing instances.", }, + "worker_config_overrides": { + Type: schema.TypeList, + ForceNew: true, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: TkeInstanceAdvancedSetting(), + }, + Description: "Override variable worker_config, commonly used to attach existing instances.", + }, "labels": { Type: schema.TypeMap, Optional: true, @@ -319,6 +339,10 @@ func tkeGetInstanceAdvancedPara(dMap map[string]interface{}, meta interface{}) ( setting.DockerGraphPath = helper.String(v.(string)) } + if v, ok := dMap["desired_pod_num"]; ok { + setting.DesiredPodNumber = helper.Int64(int64(v.(int))) + } + if temp, ok := dMap["extra_args"]; ok { extraArgs := helper.InterfacesStrings(temp.([]interface{})) clusterExtraArgs := tke.InstanceExtraArgs{} @@ -483,6 +507,16 @@ func resourceTencentCloudTkeClusterAttachmentCreate(d *schema.ResourceData, meta request.InstanceAdvancedSettings.Unschedulable = helper.Int64(v.(int64)) } + if workConfigOverrides, ok := d.GetOk("worker_config_overrides"); ok { + workConfigOverrideList := workConfigOverrides.([]interface{}) + request.InstanceAdvancedSettingsOverrides = make([]*tke.InstanceAdvancedSettings, 0, len(workConfigOverrideList)) + for _, conf := range workConfigOverrideList { + workConfigPara := conf.(map[string]interface{}) + setting := tkeGetInstanceAdvancedPara(workConfigPara, meta) + request.InstanceAdvancedSettingsOverrides = append(request.InstanceAdvancedSettingsOverrides, &setting) + } + } + /*cvm has been attached*/ var err error _, workers, err := tkeService.DescribeClusterInstances(ctx, *request.ClusterId) diff --git a/tencentcloud/resource_tc_kubernetes_scale_worker.go b/tencentcloud/resource_tc_kubernetes_scale_worker.go index ac0debfdd4..0a1e1eab40 100644 --- a/tencentcloud/resource_tc_kubernetes_scale_worker.go +++ b/tencentcloud/resource_tc_kubernetes_scale_worker.go @@ -20,6 +20,7 @@ variable "scale_instance_type" { resource tencentcloud_kubernetes_scale_worker test_scale { cluster_id = "cls-godovr32" + desired_pod_num = 16 labels = { "test1" = "test1", "test2" = "test2", @@ -161,6 +162,12 @@ func resourceTencentCloudTkeScaleWorker() *schema.Resource { Default: 0, Description: "Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.", }, + "desired_pod_num": { + Type: schema.TypeInt, + ForceNew: true, + Optional: true, + Description: "Indicate to set desired pod number in current node. Valid when the cluster enable customized pod cidr.", + }, "docker_graph_path": { Type: schema.TypeString, Optional: true, @@ -268,9 +275,9 @@ func resourceTencentCloudTkeScaleWorkerCreate(d *schema.ResourceData, meta inter return fmt.Errorf("cluster [%s] is not exist.", clusterId) } - dMap := make(map[string]interface{}, 4) - //mount_target, docker_graph_path, data_disk, extra_args - iAdvancedParas := []string{"mount_target", "docker_graph_path", "extra_args", "data_disk"} + dMap := make(map[string]interface{}, 5) + //mount_target, docker_graph_path, data_disk, extra_args, desired_pod_num + iAdvancedParas := []string{"mount_target", "docker_graph_path", "extra_args", "data_disk", "desired_pod_num"} for _, k := range iAdvancedParas { if v, ok := d.GetOk(k); ok { dMap[k] = v diff --git a/tencentcloud/service_tencentcloud_tke.go b/tencentcloud/service_tencentcloud_tke.go index 9ff4c9d612..6823ae43e0 100644 --- a/tencentcloud/service_tencentcloud_tke.go +++ b/tencentcloud/service_tencentcloud_tke.go @@ -29,15 +29,17 @@ type ClusterBasicSetting struct { } type ClusterAdvancedSettings struct { - Ipvs bool - AsEnabled bool - ContainerRuntime string - NodeNameType string - ExtraArgs ClusterExtraArgs - NetworkType string - IsNonStaticIpMode bool - DeletionProtection bool - KubeProxyMode string + Ipvs bool + AsEnabled bool + EnableCustomizedPodCIDR bool + BasePodNumber int64 + ContainerRuntime string + NodeNameType string + ExtraArgs ClusterExtraArgs + NetworkType string + IsNonStaticIpMode bool + DeletionProtection bool + KubeProxyMode string } type ClusterExtraArgs struct { @@ -56,6 +58,7 @@ type InstanceAdvancedSettings struct { DockerGraphPath string UserScript string Unschedulable int64 + DesiredPodNum int64 Labels []*tke.Label ExtraArgs tke.InstanceExtraArgs } @@ -390,6 +393,8 @@ func (me *TkeService) CreateCluster(ctx context.Context, iAdvanced InstanceAdvancedSettings, cidrSetting ClusterCidrSettings, tags map[string]string, + existedInstance []*tke.ExistedInstancesForNode, + overrideSettings []tke.InstanceAdvancedSettings, ) (id string, errRet error) { logId := getLogId(ctx) @@ -428,6 +433,8 @@ func (me *TkeService) CreateCluster(ctx context.Context, request.ClusterAdvancedSettings.AsEnabled = &advanced.AsEnabled request.ClusterAdvancedSettings.ContainerRuntime = &advanced.ContainerRuntime request.ClusterAdvancedSettings.NodeNameType = &advanced.NodeNameType + request.ClusterAdvancedSettings.EnableCustomizedPodCIDR = &advanced.EnableCustomizedPodCIDR + request.ClusterAdvancedSettings.BasePodNumber = &advanced.BasePodNumber request.ClusterAdvancedSettings.ExtraArgs = &tke.ClusterExtraArgs{ KubeAPIServer: common.StringPtrs(advanced.ExtraArgs.KubeAPIServer), KubeControllerManager: common.StringPtrs(advanced.ExtraArgs.KubeControllerManager), @@ -443,6 +450,7 @@ func (me *TkeService) CreateCluster(ctx context.Context, request.InstanceAdvancedSettings.DockerGraphPath = &iAdvanced.DockerGraphPath request.InstanceAdvancedSettings.UserScript = &iAdvanced.UserScript request.InstanceAdvancedSettings.Unschedulable = &iAdvanced.Unschedulable + request.InstanceAdvancedSettings.DesiredPodNumber = &iAdvanced.DesiredPodNum if len(iAdvanced.ExtraArgs.Kubelet) > 0 { request.InstanceAdvancedSettings.ExtraArgs = &iAdvanced.ExtraArgs } @@ -451,6 +459,10 @@ func (me *TkeService) CreateCluster(ctx context.Context, request.InstanceAdvancedSettings.Labels = iAdvanced.Labels } + if len(overrideSettings) > 0 && len(overrideSettings) != (len(cvms.Master)+len(cvms.Work)) { + return "", fmt.Errorf("len(overrideSettings) != (len(cvms.Master)+len(cvms.Work))") + } + request.RunInstancesForNode = []*tke.RunInstancesForNode{} if len(cvms.Master) != 0 { @@ -461,6 +473,7 @@ func (me *TkeService) CreateCluster(ctx context.Context, request.ClusterType = helper.String(TKE_DEPLOY_TYPE_INDEPENDENT) for v := range cvms.Master { node.RunInstancesPara = append(node.RunInstancesPara, &cvms.Master[v]) + node.InstanceAdvancedSettingsOverrides = append(node.InstanceAdvancedSettingsOverrides, &overrideSettings[v]) } request.RunInstancesForNode = append(request.RunInstancesForNode, &node) @@ -468,13 +481,16 @@ func (me *TkeService) CreateCluster(ctx context.Context, request.ClusterType = helper.String(TKE_DEPLOY_TYPE_MANAGED) } - var node tke.RunInstancesForNode - node.NodeRole = helper.String(TKE_ROLE_WORKER) - node.RunInstancesPara = []*string{} - for v := range cvms.Work { - node.RunInstancesPara = append(node.RunInstancesPara, &cvms.Work[v]) + if len(cvms.Work) != 0 { + var node tke.RunInstancesForNode + node.NodeRole = helper.String(TKE_ROLE_WORKER) + node.RunInstancesPara = []*string{} + for v := range cvms.Work { + node.RunInstancesPara = append(node.RunInstancesPara, &cvms.Work[v]) + node.InstanceAdvancedSettingsOverrides = append(node.InstanceAdvancedSettingsOverrides, &overrideSettings[v]) + } + request.RunInstancesForNode = append(request.RunInstancesForNode, &node) } - request.RunInstancesForNode = append(request.RunInstancesForNode, &node) request.ClusterCIDRSettings = &tke.ClusterCIDRSettings{} @@ -489,6 +505,10 @@ func (me *TkeService) CreateCluster(ctx context.Context, request.ClusterCIDRSettings.EniSubnetIds = common.StringPtrs(cidrSetting.EniSubnetIds) request.ClusterCIDRSettings.ClaimExpiredSeconds = &cidrSetting.ClaimExpiredSeconds + if len(existedInstance) > 0 { + request.ExistedInstancesForNode = existedInstance + } + ratelimit.Check(request.GetAction()) response, err := me.client.UseTkeClient().CreateCluster(request) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/client.go index ff47f9e790..91b6174add 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/client.go @@ -810,9 +810,7 @@ func NewDetachInstancesResponse() (response *DetachInstancesResponse) { // 本接口(DetachInstances)用于从伸缩组移出 CVM 实例,本接口不会销毁实例。 // * 如果移出指定实例后,伸缩组内处于`IN_SERVICE`状态的实例数量小于伸缩组最小值,接口将报错 // * 如果伸缩组处于`DISABLED`状态,移出操作不校验`IN_SERVICE`实例数量和最小值的关系 -// -// 如果伸缩组关联过 CLB,伸缩组在移出 CVM 实例时,AS 会将 CVM 与该 CLB 进行解挂载。 -// 具体来说,该动作是对称的:如果该 CVM 关联进伸缩组时,AS 进行过 CLB 的挂载动作,那么该 CVM 在离开伸缩组时,AS 会进行解挂载动作。 +// * 对于伸缩组配置的 CLB,实例在离开伸缩组时,AS 会进行解挂载动作 func (c *Client) DetachInstances(request *DetachInstancesRequest) (response *DetachInstancesResponse, err error) { if request == nil { request = NewDetachInstancesRequest() @@ -1125,9 +1123,7 @@ func NewRemoveInstancesResponse() (response *RemoveInstancesResponse) { // 本接口(RemoveInstances)用于从伸缩组删除 CVM 实例。根据当前的产品逻辑,如果实例由弹性伸缩自动创建,则实例会被销毁;如果实例系创建后加入伸缩组的,则会从伸缩组中移除,保留实例。 // * 如果删除指定实例后,伸缩组内处于`IN_SERVICE`状态的实例数量小于伸缩组最小值,接口将报错 // * 如果伸缩组处于`DISABLED`状态,删除操作不校验`IN_SERVICE`实例数量和最小值的关系 -// -// 如果伸缩组关联过 CLB,伸缩组在删除 CVM 实例时,AS 会将 CVM 与该 CLB 进行解挂载。 -// 具体来说,该动作是对称的:如果该 CVM 关联进伸缩组时,AS 进行过 CLB 的挂载动作,那么该 CVM 在离开伸缩组时,AS 会进行解挂载动作。 +// * 对于伸缩组配置的 CLB,实例在离开伸缩组时,AS 会进行解挂载动作 func (c *Client) RemoveInstances(request *RemoveInstancesRequest) (response *RemoveInstancesResponse, err error) { if request == nil { request = NewRemoveInstancesRequest() diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cbs/v20170312/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cbs/v20170312/models.go index ec439d76e0..a9e59da723 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cbs/v20170312/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cbs/v20170312/models.go @@ -86,14 +86,17 @@ type AttachDetail struct { type AttachDisksRequest struct { *tchttp.BaseRequest - // 将要被挂载的弹性云盘ID。通过[DescribeDisks](/document/product/362/16315)接口查询。单次最多可挂载10块弹性云盘。 - DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds" list` - // 云服务器实例ID。云盘将被挂载到此云服务器上,通过[DescribeInstances](/document/product/213/15728)接口查询。 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + // 将要被挂载的弹性云盘ID。通过[DescribeDisks](/document/product/362/16315)接口查询。单次最多可挂载10块弹性云盘。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds" list` + // 可选参数,不传该参数则仅执行挂载操作。传入`True`时,会在挂载成功后将云硬盘设置为随云主机销毁模式,仅对按量计费云硬盘有效。 DeleteWithInstance *bool `json:"DeleteWithInstance,omitempty" name:"DeleteWithInstance"` + + // 可选参数,用于控制云盘挂载时使用的挂载模式,目前仅对黑石裸金属机型有效。取值范围:
  • PF
  • VF + AttachMode *string `json:"AttachMode,omitempty" name:"AttachMode"` } func (r *AttachDisksRequest) ToJsonString() string { @@ -108,9 +111,10 @@ func (r *AttachDisksRequest) FromJsonString(s string) error { if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "DiskIds") delete(f, "InstanceId") + delete(f, "DiskIds") delete(f, "DeleteWithInstance") + delete(f, "AttachMode") if len(f) > 0 { return errors.New("AttachDisksRequest has unknown keys!") } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317/models.go index 26f5968b62..4210da7a59 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317/models.go @@ -798,6 +798,9 @@ type CreateListenerRequest struct { // 创建端口段监听器时必须传入此参数,用以标识结束端口。同时,入参Ports只允许传入一个成员,用以标识开始端口。【如果您需要体验端口段功能,请通过 [工单申请](https://console.cloud.tencent.com/workorder/category)】。 EndPort *uint64 `json:"EndPort,omitempty" name:"EndPort"` + + // 解绑后端目标时,是否发RST给客户端,此参数仅适用于TCP监听器。 + DeregisterTargetRst *bool `json:"DeregisterTargetRst,omitempty" name:"DeregisterTargetRst"` } func (r *CreateListenerRequest) ToJsonString() string { @@ -825,6 +828,7 @@ func (r *CreateListenerRequest) FromJsonString(s string) error { delete(f, "SessionType") delete(f, "KeepaliveEnable") delete(f, "EndPort") + delete(f, "DeregisterTargetRst") if len(f) > 0 { return errors.New("CreateListenerRequest has unknown keys!") } @@ -3327,6 +3331,10 @@ type Listener struct { // 仅支持Nat64 CLB TCP监听器 // 注意:此字段可能返回 null,表示取不到有效值。 Toa *bool `json:"Toa,omitempty" name:"Toa"` + + // 解绑后端目标时,是否发RST给客户端,(此参数仅对于TCP监听器有意义)。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DeregisterTargetRst *bool `json:"DeregisterTargetRst,omitempty" name:"DeregisterTargetRst"` } type ListenerBackend struct { @@ -4035,6 +4043,9 @@ type ModifyListenerRequest struct { // 是否开启长连接,此参数仅适用于HTTP/HTTPS监听器。 KeepaliveEnable *int64 `json:"KeepaliveEnable,omitempty" name:"KeepaliveEnable"` + + // 解绑后端目标时,是否发RST给客户端,此参数仅适用于TCP监听器。 + DeregisterTargetRst *bool `json:"DeregisterTargetRst,omitempty" name:"DeregisterTargetRst"` } func (r *ModifyListenerRequest) ToJsonString() string { @@ -4058,6 +4069,7 @@ func (r *ModifyListenerRequest) FromJsonString(s string) error { delete(f, "Scheduler") delete(f, "SniSwitch") delete(f, "KeepaliveEnable") + delete(f, "DeregisterTargetRst") if len(f) > 0 { return errors.New("ModifyListenerRequest has unknown keys!") } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index df556ce1f1..29f424f5b2 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -194,7 +194,7 @@ func CompleteCommonParams(request Request, region string) { params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_1.0.155" + params["RequestClient"] = "SDK_GO_1.0.165" } func ConstructParams(req Request) (err error) { diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dc/v20180410/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dc/v20180410/models.go index b1912b912f..23fe790aed 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dc/v20180410/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dc/v20180410/models.go @@ -1130,11 +1130,11 @@ type DirectConnect struct { // 注意:此字段可能返回 null,表示取不到有效值。 LocalZone *bool `json:"LocalZone,omitempty" name:"LocalZone"` - // 该物理专线下vlan 0的专线通道数量 + // 该物理专线下vlan 0的专用通道数量 // 注意:此字段可能返回 null,表示取不到有效值。 VlanZeroDirectConnectTunnelCount *uint64 `json:"VlanZeroDirectConnectTunnelCount,omitempty" name:"VlanZeroDirectConnectTunnelCount"` - // 该物理专线下非vlan 0的专线通道数量 + // 该物理专线下非vlan 0的专用通道数量 // 注意:此字段可能返回 null,表示取不到有效值。 OtherVlanDirectConnectTunnelCount *uint64 `json:"OtherVlanDirectConnectTunnelCount,omitempty" name:"OtherVlanDirectConnectTunnelCount"` diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725/client.go index 1fc2445584..e7cc9b0e81 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725/client.go @@ -370,6 +370,31 @@ func (c *Client) DescribeDBInstances(request *DescribeDBInstancesRequest) (respo return } +func NewDescribeSecurityGroupRequest() (request *DescribeSecurityGroupRequest) { + request = &DescribeSecurityGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("mongodb", APIVersion, "DescribeSecurityGroup") + return +} + +func NewDescribeSecurityGroupResponse() (response *DescribeSecurityGroupResponse) { + response = &DescribeSecurityGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 查询实例绑定的安全组 +func (c *Client) DescribeSecurityGroup(request *DescribeSecurityGroupRequest) (response *DescribeSecurityGroupResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupRequest() + } + response = NewDescribeSecurityGroupResponse() + err = c.Send(request, response) + return +} + func NewDescribeSlowLogPatternsRequest() (request *DescribeSlowLogPatternsRequest) { request = &DescribeSlowLogPatternsRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725/models.go index fd877b5441..25fd616ac3 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725/models.go @@ -1146,6 +1146,55 @@ func (r *DescribeDBInstancesResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DescribeSecurityGroupRequest struct { + *tchttp.BaseRequest + + // 实例ID,格式如:cmgo-p8vnipr5。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribeSecurityGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + if len(f) > 0 { + return errors.New("DescribeSecurityGroupRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例绑定的安全组 + Groups []*SecurityGroup `json:"Groups,omitempty" name:"Groups" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSecurityGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeSlowLogPatternsRequest struct { *tchttp.BaseRequest @@ -2106,6 +2155,45 @@ func (r *ResetDBInstancePasswordResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type SecurityGroup struct { + + // 所属项目id + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 创建时间 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 入站规则 + Inbound []*SecurityGroupBound `json:"Inbound,omitempty" name:"Inbound" list` + + // 出站规则 + Outbound []*SecurityGroupBound `json:"Outbound,omitempty" name:"Outbound" list` + + // 安全组id + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 安全组名称 + SecurityGroupName *string `json:"SecurityGroupName,omitempty" name:"SecurityGroupName"` + + // 安全组备注 + SecurityGroupRemark *string `json:"SecurityGroupRemark,omitempty" name:"SecurityGroupRemark"` +} + +type SecurityGroupBound struct { + + // 执行规则。ACCEPT或DROP + Action *string `json:"Action,omitempty" name:"Action"` + + // ip段。 + CidrIp *string `json:"CidrIp,omitempty" name:"CidrIp"` + + // 端口范围 + PortRange *string `json:"PortRange,omitempty" name:"PortRange"` + + // 传输层协议。tcp,udp或ALL + IpProtocol *string `json:"IpProtocol,omitempty" name:"IpProtocol"` +} + type ShardInfo struct { // 分片已使用容量 diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312/client.go index 88bd9893e9..ef31b0ace4 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312/client.go @@ -133,7 +133,7 @@ func NewCreateDBInstancesResponse() (response *CreateDBInstancesResponse) { return } -// 本接口 (CreateDBInstances) 用于创建一个或者多个PostgreSQL实例。 +// 本接口 (CreateDBInstances) 用于创建一个或者多个PostgreSQL实例,仅发货实例不会进行初始化。 func (c *Client) CreateDBInstances(request *CreateDBInstancesRequest) (response *CreateDBInstancesResponse, err error) { if request == nil { request = NewCreateDBInstancesRequest() @@ -143,6 +143,31 @@ func (c *Client) CreateDBInstances(request *CreateDBInstancesRequest) (response return } +func NewCreateInstancesRequest() (request *CreateInstancesRequest) { + request = &CreateInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("postgres", APIVersion, "CreateInstances") + return +} + +func NewCreateInstancesResponse() (response *CreateInstancesResponse) { + response = &CreateInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (CreateInstances) 用于创建一个或者多个PostgreSQL实例,通过此接口创建的实例无需进行初始化,可直接使用。 +func (c *Client) CreateInstances(request *CreateInstancesRequest) (response *CreateInstancesResponse, err error) { + if request == nil { + request = NewCreateInstancesRequest() + } + response = NewCreateInstancesResponse() + err = c.Send(request, response) + return +} + func NewCreateReadOnlyDBInstanceRequest() (request *CreateReadOnlyDBInstanceRequest) { request = &CreateReadOnlyDBInstanceRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312/models.go index bd37b884b7..445f15372f 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312/models.go @@ -204,7 +204,7 @@ type CreateDBInstancesRequest struct { // 售卖规格ID。该参数可以通过调用DescribeProductConfig的返回值中的SpecCode字段来获取。 SpecCode *string `json:"SpecCode,omitempty" name:"SpecCode"` - // PostgreSQL内核版本,目前支持:9.3.5、9.5.4、10.4三种版本。 + // PostgreSQL内核版本,目前支持以下版本:9.3.5、9.5.4、10.4、11.8、12.4 。 DBVersion *string `json:"DBVersion,omitempty" name:"DBVersion"` // 实例容量大小,单位:GB。 @@ -321,6 +321,141 @@ func (r *CreateDBInstancesResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type CreateInstancesRequest struct { + *tchttp.BaseRequest + + // 售卖规格ID。该参数可以通过调用DescribeProductConfig的返回值中的SpecCode字段来获取。 + SpecCode *string `json:"SpecCode,omitempty" name:"SpecCode"` + + // PostgreSQL内核版本,目前支持:9.3.5、9.5.4、10.4、11.8、12.4五种版本。 + DBVersion *string `json:"DBVersion,omitempty" name:"DBVersion"` + + // 实例容量大小,单位:GB。 + Storage *uint64 `json:"Storage,omitempty" name:"Storage"` + + // 一次性购买的实例数量。取值1-10。 + InstanceCount *uint64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 购买时长,单位:月。目前只支持1,2,3,4,5,6,7,8,9,10,11,12,24,36这些值,按量计费模式下该参数传1。 + Period *uint64 `json:"Period,omitempty" name:"Period"` + + // 可用区ID。该参数可以通过调用 DescribeZones 接口的返回值中的Zone字段来获取。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例字符集,目前只支持:UTF8、LATIN1。 + Charset *string `json:"Charset,omitempty" name:"Charset"` + + // 实例根账号用户名。 + AdminName *string `json:"AdminName,omitempty" name:"AdminName"` + + // 实例根账号用户名对应的密码。 + AdminPassword *string `json:"AdminPassword,omitempty" name:"AdminPassword"` + + // 项目ID。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 实例计费类型。目前支持:PREPAID(预付费,即包年包月),POSTPAID_BY_HOUR(后付费,即按量计费)。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 是否自动使用代金券。1(是),0(否),默认不使用。 + AutoVoucher *uint64 `json:"AutoVoucher,omitempty" name:"AutoVoucher"` + + // 代金券ID列表,目前仅支持指定一张代金券。 + VoucherIds []*string `json:"VoucherIds,omitempty" name:"VoucherIds" list` + + // 私有网络ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 已配置的私有网络中的子网ID。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 续费标记:0-正常续费(默认);1-自动续费。 + AutoRenewFlag *int64 `json:"AutoRenewFlag,omitempty" name:"AutoRenewFlag"` + + // 活动ID。 + ActivityId *int64 `json:"ActivityId,omitempty" name:"ActivityId"` + + // 实例名。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 是否需要支持Ipv6,1:是,0:否。 + NeedSupportIpv6 *uint64 `json:"NeedSupportIpv6,omitempty" name:"NeedSupportIpv6"` + + // 实例需要绑定的Tag信息,默认为空。 + TagList []*Tag `json:"TagList,omitempty" name:"TagList" list` + + // 安全组ID。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds" list` +} + +func (r *CreateInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SpecCode") + delete(f, "DBVersion") + delete(f, "Storage") + delete(f, "InstanceCount") + delete(f, "Period") + delete(f, "Zone") + delete(f, "Charset") + delete(f, "AdminName") + delete(f, "AdminPassword") + delete(f, "ProjectId") + delete(f, "InstanceChargeType") + delete(f, "AutoVoucher") + delete(f, "VoucherIds") + delete(f, "VpcId") + delete(f, "SubnetId") + delete(f, "AutoRenewFlag") + delete(f, "ActivityId") + delete(f, "Name") + delete(f, "NeedSupportIpv6") + delete(f, "TagList") + delete(f, "SecurityGroupIds") + if len(f) > 0 { + return errors.New("CreateInstancesRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 订单号列表。每个实例对应一个订单号。 + DealNames []*string `json:"DealNames,omitempty" name:"DealNames" list` + + // 冻结流水号。 + BillId *string `json:"BillId,omitempty" name:"BillId"` + + // 创建成功的实例ID集合,只在后付费情景下有返回值。 + DBInstanceIdSet []*string `json:"DBInstanceIdSet,omitempty" name:"DBInstanceIdSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type CreateReadOnlyDBInstanceRequest struct { *tchttp.BaseRequest @@ -1796,7 +1931,7 @@ type DisIsolateDBInstancesRequest struct { // 包年包月实例解隔离时购买时常 以月为单位 Period *int64 `json:"Period,omitempty" name:"Period"` - // 是否使用代金券 + // 是否使用代金券:true-使用,false-不使用,默认不使用 AutoVoucher *bool `json:"AutoVoucher,omitempty" name:"AutoVoucher"` // 代金券id列表 diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823/client.go index db823d1b43..cdf8379f55 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823/client.go @@ -368,6 +368,31 @@ func (c *Client) DeleteTables(request *DeleteTablesRequest) (response *DeleteTab return } +func NewDescribeApplicationsRequest() (request *DescribeApplicationsRequest) { + request = &DescribeApplicationsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tcaplusdb", APIVersion, "DescribeApplications") + return +} + +func NewDescribeApplicationsResponse() (response *DescribeApplicationsResponse) { + response = &DescribeApplicationsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 获取审批管理的申请单 +func (c *Client) DescribeApplications(request *DescribeApplicationsRequest) (response *DescribeApplicationsResponse, err error) { + if request == nil { + request = NewDescribeApplicationsRequest() + } + response = NewDescribeApplicationsResponse() + err = c.Send(request, response) + return +} + func NewDescribeClusterTagsRequest() (request *DescribeClusterTagsRequest) { request = &DescribeClusterTagsRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -768,6 +793,56 @@ func (c *Client) ImportSnapshots(request *ImportSnapshotsRequest) (response *Imp return } +func NewMergeTablesDataRequest() (request *MergeTablesDataRequest) { + request = &MergeTablesDataRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tcaplusdb", APIVersion, "MergeTablesData") + return +} + +func NewMergeTablesDataResponse() (response *MergeTablesDataResponse) { + response = &MergeTablesDataResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 合并指定表格 +func (c *Client) MergeTablesData(request *MergeTablesDataRequest) (response *MergeTablesDataResponse, err error) { + if request == nil { + request = NewMergeTablesDataRequest() + } + response = NewMergeTablesDataResponse() + err = c.Send(request, response) + return +} + +func NewModifyCensorshipRequest() (request *ModifyCensorshipRequest) { + request = &ModifyCensorshipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tcaplusdb", APIVersion, "ModifyCensorship") + return +} + +func NewModifyCensorshipResponse() (response *ModifyCensorshipResponse) { + response = &ModifyCensorshipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 修改集群审批状态 +func (c *Client) ModifyCensorship(request *ModifyCensorshipRequest) (response *ModifyCensorshipResponse, err error) { + if request == nil { + request = NewModifyCensorshipRequest() + } + response = NewModifyCensorshipResponse() + err = c.Send(request, response) + return +} + func NewModifyClusterMachineRequest() (request *ModifyClusterMachineRequest) { request = &ModifyClusterMachineRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1118,6 +1193,31 @@ func (c *Client) SetTableIndex(request *SetTableIndexRequest) (response *SetTabl return } +func NewUpdateApplyRequest() (request *UpdateApplyRequest) { + request = &UpdateApplyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tcaplusdb", APIVersion, "UpdateApply") + return +} + +func NewUpdateApplyResponse() (response *UpdateApplyResponse) { + response = &UpdateApplyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 更新申请单状态 +func (c *Client) UpdateApply(request *UpdateApplyRequest) (response *UpdateApplyResponse, err error) { + if request == nil { + request = NewUpdateApplyRequest() + } + response = NewUpdateApplyResponse() + err = c.Send(request, response) + return +} + func NewVerifyIdlFilesRequest() (request *VerifyIdlFilesRequest) { request = &VerifyIdlFilesRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823/models.go index efd16637a2..2a4a11bd5c 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823/models.go @@ -21,6 +21,103 @@ import ( tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" ) +type Application struct { + + // 审批单号 + ApplicationId *string `json:"ApplicationId,omitempty" name:"ApplicationId"` + + // 申请类型 + ApplicationType *int64 `json:"ApplicationType,omitempty" name:"ApplicationType"` + + // 集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 表格组名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + TableGroupName *string `json:"TableGroupName,omitempty" name:"TableGroupName"` + + // 表格名称 + TableName *string `json:"TableName,omitempty" name:"TableName"` + + // 申请人 + Applicant *string `json:"Applicant,omitempty" name:"Applicant"` + + // 建单时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 处理状态 -1 撤回 0-待审核 1-已经审核并提交任务 2-已驳回 + ApplicationStatus *int64 `json:"ApplicationStatus,omitempty" name:"ApplicationStatus"` + + // 表格组Id + TableGroupId *string `json:"TableGroupId,omitempty" name:"TableGroupId"` + + // 已提交的任务Id,未提交申请为0 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 腾讯云上table的唯一键 + // 注意:此字段可能返回 null,表示取不到有效值。 + TableInstanceId *string `json:"TableInstanceId,omitempty" name:"TableInstanceId"` + + // 更新时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` + + // 审批人 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExecuteUser *string `json:"ExecuteUser,omitempty" name:"ExecuteUser"` + + // 执行状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExecuteStatus *string `json:"ExecuteStatus,omitempty" name:"ExecuteStatus"` + + // 该申请单是否可以被当前用户审批 + // 注意:此字段可能返回 null,表示取不到有效值。 + CanCensor *bool `json:"CanCensor,omitempty" name:"CanCensor"` + + // 该申请单是否可以被当前用户撤回 + // 注意:此字段可能返回 null,表示取不到有效值。 + CanWithdrawal *bool `json:"CanWithdrawal,omitempty" name:"CanWithdrawal"` +} + +type ApplyResult struct { + + // 申请单id + ApplicationId *string `json:"ApplicationId,omitempty" name:"ApplicationId"` + + // 申请类型 + ApplicationType *int64 `json:"ApplicationType,omitempty" name:"ApplicationType"` + + // 处理状态 0-待审核 1-已经审核并提交任务 2-已驳回 + // 注意:此字段可能返回 null,表示取不到有效值。 + ApplicationStatus *int64 `json:"ApplicationStatus,omitempty" name:"ApplicationStatus"` + + // 已提交的任务Id + // 注意:此字段可能返回 null,表示取不到有效值。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 错误信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Error *ErrorInfo `json:"Error,omitempty" name:"Error"` +} + +type ApplyStatus struct { + + // 集群id-申请单id + ApplicationId *string `json:"ApplicationId,omitempty" name:"ApplicationId"` + + // 处理状态-1-撤回 1-通过 2-驳回,非0状态的申请单不可改变状态。 + ApplicationStatus *int64 `json:"ApplicationStatus,omitempty" name:"ApplicationStatus"` + + // 申请单类型 + ApplicationType *int64 `json:"ApplicationType,omitempty" name:"ApplicationType"` + + // 集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + type ClearTablesRequest struct { *tchttp.BaseRequest @@ -153,6 +250,13 @@ type ClusterInfo struct { // 独占proxy机器信息 // 注意:此字段可能返回 null,表示取不到有效值。 ProxyList []*ProxyDetailInfo `json:"ProxyList,omitempty" name:"ProxyList" list` + + // 是否开启审核 0-不开启 1-开启 + Censorship *int64 `json:"Censorship,omitempty" name:"Censorship"` + + // 审批人uin列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + DbaUins []*string `json:"DbaUins,omitempty" name:"DbaUins" list` } type CompareIdlFilesRequest struct { @@ -222,6 +326,33 @@ func (r *CompareIdlFilesResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type CompareTablesInfo struct { + + // 源表格的集群id + SrcTableClusterId *string `json:"SrcTableClusterId,omitempty" name:"SrcTableClusterId"` + + // 源表格的表格组id + SrcTableGroupId *string `json:"SrcTableGroupId,omitempty" name:"SrcTableGroupId"` + + // 源表格的表名 + SrcTableName *string `json:"SrcTableName,omitempty" name:"SrcTableName"` + + // 目标表格的集群id + DstTableClusterId *string `json:"DstTableClusterId,omitempty" name:"DstTableClusterId"` + + // 目标表格的表格组id + DstTableGroupId *string `json:"DstTableGroupId,omitempty" name:"DstTableGroupId"` + + // 目标表格的表名 + DstTableName *string `json:"DstTableName,omitempty" name:"DstTableName"` + + // 源表格的实例id + SrcTableInstanceId *string `json:"SrcTableInstanceId,omitempty" name:"SrcTableInstanceId"` + + // 目标表格的实例id + DstTableInstanceId *string `json:"DstTableInstanceId,omitempty" name:"DstTableInstanceId"` +} + type CreateBackupRequest struct { *tchttp.BaseRequest @@ -261,8 +392,13 @@ type CreateBackupResponse struct { Response *struct { // 创建的备份任务ID列表 + // 注意:此字段可能返回 null,表示取不到有效值。 TaskIds []*string `json:"TaskIds,omitempty" name:"TaskIds" list` + // 创建的备份申请ID列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ApplicationIds []*string `json:"ApplicationIds,omitempty" name:"ApplicationIds" list` + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` @@ -871,6 +1007,86 @@ func (r *DeleteTablesResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DescribeApplicationsRequest struct { + *tchttp.BaseRequest + + // 集群ID,用于获取指定集群的单据 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 分页 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 分页 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 申请单状态,用于过滤 + CensorStatus *int64 `json:"CensorStatus,omitempty" name:"CensorStatus"` + + // 表格组id,用于过滤 + TableGroupId *string `json:"TableGroupId,omitempty" name:"TableGroupId"` + + // 表格名,用于过滤 + TableName *string `json:"TableName,omitempty" name:"TableName"` + + // 申请人uin,用于过滤 + Applicant *string `json:"Applicant,omitempty" name:"Applicant"` + + // 申请类型,用于过滤 + ApplyType *int64 `json:"ApplyType,omitempty" name:"ApplyType"` +} + +func (r *DescribeApplicationsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeApplicationsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "Limit") + delete(f, "Offset") + delete(f, "CensorStatus") + delete(f, "TableGroupId") + delete(f, "TableName") + delete(f, "Applicant") + delete(f, "ApplyType") + if len(f) > 0 { + return errors.New("DescribeApplicationsRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeApplicationsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 申请单列表 + Applications []*Application `json:"Applications,omitempty" name:"Applications" list` + + // 申请单个数 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeApplicationsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeApplicationsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeClusterTagsRequest struct { *tchttp.BaseRequest @@ -1792,6 +2008,9 @@ type Filter struct { // 过滤字段值 Value *string `json:"Value,omitempty" name:"Value"` + + // 过滤字段值 + Values []*string `json:"Values,omitempty" name:"Values" list` } type IdlFileInfo struct { @@ -1942,6 +2161,150 @@ type MachineInfo struct { MachineNum *int64 `json:"MachineNum,omitempty" name:"MachineNum"` } +type MergeTableResult struct { + + // 任务Id + // 注意:此字段可能返回 null,表示取不到有效值。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 成功时此字段返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Error *ErrorInfo `json:"Error,omitempty" name:"Error"` + + // 对比的表格信息 + Table *CompareTablesInfo `json:"Table,omitempty" name:"Table"` + + // 申请单Id + // 注意:此字段可能返回 null,表示取不到有效值。 + ApplicationId *string `json:"ApplicationId,omitempty" name:"ApplicationId"` +} + +type MergeTablesDataRequest struct { + *tchttp.BaseRequest + + // 选取的表格 + SelectedTables []*MergeTablesInfo `json:"SelectedTables,omitempty" name:"SelectedTables" list` + + // true只做对比,false既对比又执行 + IsOnlyCompare *bool `json:"IsOnlyCompare,omitempty" name:"IsOnlyCompare"` +} + +func (r *MergeTablesDataRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *MergeTablesDataRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SelectedTables") + delete(f, "IsOnlyCompare") + if len(f) > 0 { + return errors.New("MergeTablesDataRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type MergeTablesDataResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 合服结果集 + Results []*MergeTableResult `json:"Results,omitempty" name:"Results" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *MergeTablesDataResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *MergeTablesDataResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type MergeTablesInfo struct { + + // 合服的表格信息 + MergeTables *CompareTablesInfo `json:"MergeTables,omitempty" name:"MergeTables"` + + // 是否检查索引 + CheckIndex *bool `json:"CheckIndex,omitempty" name:"CheckIndex"` +} + +type ModifyCensorshipRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群是否开启审核 0-关闭 1-开启 + Censorship *int64 `json:"Censorship,omitempty" name:"Censorship"` + + // 审批人uin列表 + Uins []*string `json:"Uins,omitempty" name:"Uins" list` +} + +func (r *ModifyCensorshipRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCensorshipRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "Censorship") + delete(f, "Uins") + if len(f) > 0 { + return errors.New("ModifyCensorshipRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCensorshipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 已加入审批人的uin + // 注意:此字段可能返回 null,表示取不到有效值。 + Uins []*string `json:"Uins,omitempty" name:"Uins" list` + + // 集群是否开启审核 0-关闭 1-开启 + Censorship *int64 `json:"Censorship,omitempty" name:"Censorship"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyCensorshipResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCensorshipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type ModifyClusterMachineRequest struct { *tchttp.BaseRequest @@ -3229,6 +3592,10 @@ type TableResultNew struct { // 任务ID列表,对于创建多任务的接口有效 // 注意:此字段可能返回 null,表示取不到有效值。 TaskIds []*string `json:"TaskIds,omitempty" name:"TaskIds" list` + + // 腾讯云申请审核单Id + // 注意:此字段可能返回 null,表示取不到有效值。 + ApplicationId *string `json:"ApplicationId,omitempty" name:"ApplicationId"` } type TableRollbackResultNew struct { @@ -3378,6 +3745,59 @@ type TaskInfoNew struct { Content *string `json:"Content,omitempty" name:"Content"` } +type UpdateApplyRequest struct { + *tchttp.BaseRequest + + // 申请单状态 + ApplyStatus []*ApplyStatus `json:"ApplyStatus,omitempty" name:"ApplyStatus" list` +} + +func (r *UpdateApplyRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateApplyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ApplyStatus") + if len(f) > 0 { + return errors.New("UpdateApplyRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateApplyResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 已更新的申请单列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ApplyResults []*ApplyResult `json:"ApplyResults,omitempty" name:"ApplyResults" list` + + // 更新数量 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateApplyResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateApplyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type VerifyIdlFilesRequest struct { *tchttp.BaseRequest diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924/client.go index 51105961e8..0bc6641d63 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924/client.go @@ -918,6 +918,31 @@ func (c *Client) DescribeApplicationTriggerPersonal(request *DescribeApplication return } +func NewDescribeChartDownloadInfoRequest() (request *DescribeChartDownloadInfoRequest) { + request = &DescribeChartDownloadInfoRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tcr", APIVersion, "DescribeChartDownloadInfo") + return +} + +func NewDescribeChartDownloadInfoResponse() (response *DescribeChartDownloadInfoResponse) { + response = &DescribeChartDownloadInfoResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 用于在企业版中返回Chart的下载信息 +func (c *Client) DescribeChartDownloadInfo(request *DescribeChartDownloadInfoRequest) (response *DescribeChartDownloadInfoResponse, err error) { + if request == nil { + request = NewDescribeChartDownloadInfoRequest() + } + response = NewDescribeChartDownloadInfoResponse() + err = c.Send(request, response) + return +} + func NewDescribeExternalEndpointStatusRequest() (request *DescribeExternalEndpointStatusRequest) { request = &DescribeExternalEndpointStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924/models.go index 1b651d72bf..fb9ee5ca7e 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924/models.go @@ -1985,6 +1985,67 @@ func (r *DescribeApplicationTriggerPersonalResponse) FromJsonString(s string) er return json.Unmarshal([]byte(s), &r) } +type DescribeChartDownloadInfoRequest struct { + *tchttp.BaseRequest + + // 实例ID + RegistryId *string `json:"RegistryId,omitempty" name:"RegistryId"` + + // 命名空间 + NamespaceName *string `json:"NamespaceName,omitempty" name:"NamespaceName"` + + // Chart包的名称 + ChartName *string `json:"ChartName,omitempty" name:"ChartName"` + + // Chart包的版本 + ChartVersion *string `json:"ChartVersion,omitempty" name:"ChartVersion"` +} + +func (r *DescribeChartDownloadInfoRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeChartDownloadInfoRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RegistryId") + delete(f, "NamespaceName") + delete(f, "ChartName") + delete(f, "ChartVersion") + if len(f) > 0 { + return errors.New("DescribeChartDownloadInfoRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeChartDownloadInfoResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 用于下载的url的预签名地址 + PreSignedDownloadURL *string `json:"PreSignedDownloadURL,omitempty" name:"PreSignedDownloadURL"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeChartDownloadInfoResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeChartDownloadInfoResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeExternalEndpointStatusRequest struct { *tchttp.BaseRequest diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go index 9666743858..72b8bd02cc 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go @@ -793,6 +793,31 @@ func (c *Client) DescribeClusterAsGroups(request *DescribeClusterAsGroupsRequest return } +func NewDescribeClusterCommonNamesRequest() (request *DescribeClusterCommonNamesRequest) { + request = &DescribeClusterCommonNamesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterCommonNames") + return +} + +func NewDescribeClusterCommonNamesResponse() (response *DescribeClusterCommonNamesResponse) { + response = &DescribeClusterCommonNamesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50 +func (c *Client) DescribeClusterCommonNames(request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) { + if request == nil { + request = NewDescribeClusterCommonNamesRequest() + } + response = NewDescribeClusterCommonNamesResponse() + err = c.Send(request, response) + return +} + func NewDescribeClusterEndpointStatusRequest() (request *DescribeClusterEndpointStatusRequest) { request = &DescribeClusterEndpointStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1093,6 +1118,31 @@ func (c *Client) DescribeEKSClusters(request *DescribeEKSClustersRequest) (respo return } +func NewDescribeEnableVpcCniProgressRequest() (request *DescribeEnableVpcCniProgressRequest) { + request = &DescribeEnableVpcCniProgressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEnableVpcCniProgress") + return +} + +func NewDescribeEnableVpcCniProgressResponse() (response *DescribeEnableVpcCniProgressResponse) { + response = &DescribeEnableVpcCniProgressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口用于查询开启vpc-cni模式的任务进度 +func (c *Client) DescribeEnableVpcCniProgress(request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { + if request == nil { + request = NewDescribeEnableVpcCniProgressRequest() + } + response = NewDescribeEnableVpcCniProgressResponse() + err = c.Send(request, response) + return +} + func NewDescribeExistedInstancesRequest() (request *DescribeExistedInstancesRequest) { request = &DescribeExistedInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1393,6 +1443,31 @@ func (c *Client) DescribeRouteTableConflicts(request *DescribeRouteTableConflict return } +func NewEnableVpcCniNetworkTypeRequest() (request *EnableVpcCniNetworkTypeRequest) { + request = &EnableVpcCniNetworkTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "EnableVpcCniNetworkType") + return +} + +func NewEnableVpcCniNetworkTypeResponse() (response *EnableVpcCniNetworkTypeResponse) { + response = &EnableVpcCniNetworkTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 +func (c *Client) EnableVpcCniNetworkType(request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { + if request == nil { + request = NewEnableVpcCniNetworkTypeRequest() + } + response = NewEnableVpcCniNetworkTypeResponse() + err = c.Send(request, response) + return +} + func NewGetUpgradeInstanceProgressRequest() (request *GetUpgradeInstanceProgressRequest) { request = &GetUpgradeInstanceProgressRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go index 44edfe1736..7a39540e24 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go @@ -96,6 +96,11 @@ type AddExistedInstancesRequest struct { // 校验规则相关选项,可配置跳过某些校验规则。目前支持GlobalRouteCIDRCheck(跳过GlobalRouter的相关校验),VpcCniCIDRCheck(跳过VpcCni相关校验) SkipValidateOptions []*string `json:"SkipValidateOptions,omitempty" name:"SkipValidateOptions" list` + + // 参数InstanceAdvancedSettingsOverride数组用于定制化地配置各台instance,与InstanceIds顺序对应。当传入InstanceAdvancedSettingsOverrides数组时,将覆盖默认参数InstanceAdvancedSettings;当没有传入参数InstanceAdvancedSettingsOverrides时,InstanceAdvancedSettings参数对每台instance生效。 + // + // 参数InstanceAdvancedSettingsOverride数组的长度应与InstanceIds数组一致;当长度大于InstanceIds数组长度时将报错;当长度小于InstanceIds数组时,没有对应配置的instace将使用默认配置。 + InstanceAdvancedSettingsOverrides []*InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverrides,omitempty" name:"InstanceAdvancedSettingsOverrides" list` } func (r *AddExistedInstancesRequest) ToJsonString() string { @@ -119,6 +124,7 @@ func (r *AddExistedInstancesRequest) FromJsonString(s string) error { delete(f, "SecurityGroupIds") delete(f, "NodePool") delete(f, "SkipValidateOptions") + delete(f, "InstanceAdvancedSettingsOverrides") if len(f) > 0 { return errors.New("AddExistedInstancesRequest has unknown keys!") } @@ -663,6 +669,15 @@ type ClusterVersion struct { Versions []*string `json:"Versions,omitempty" name:"Versions" list` } +type CommonName struct { + + // 子账户UIN + SubaccountUin *string `json:"SubaccountUin,omitempty" name:"SubaccountUin"` + + // 子账户客户端证书中的CommonName字段 + CN *string `json:"CN,omitempty" name:"CN"` +} + type CreateClusterAsGroupRequest struct { *tchttp.BaseRequest @@ -2184,6 +2199,63 @@ func (r *DescribeClusterAsGroupsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DescribeClusterCommonNamesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 子账户列表,不可超出最大值50 + SubaccountUins []*string `json:"SubaccountUins,omitempty" name:"SubaccountUins" list` + + // 角色ID列表,不可超出最大值50 + RoleIds []*string `json:"RoleIds,omitempty" name:"RoleIds" list` +} + +func (r *DescribeClusterCommonNamesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterCommonNamesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "SubaccountUins") + delete(f, "RoleIds") + if len(f) > 0 { + return errors.New("DescribeClusterCommonNamesRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterCommonNamesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 子账户Uin与其客户端证书的CN字段映射 + CommonNames []*CommonName `json:"CommonNames,omitempty" name:"CommonNames" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterCommonNamesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterCommonNamesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeClusterEndpointStatusRequest struct { *tchttp.BaseRequest @@ -2886,6 +2958,59 @@ func (r *DescribeEKSClustersResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DescribeEnableVpcCniProgressRequest struct { + *tchttp.BaseRequest + + // 开启vpc-cni的集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeEnableVpcCniProgressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEnableVpcCniProgressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return errors.New("DescribeEnableVpcCniProgressRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEnableVpcCniProgressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 任务进度的描述:Running/Succeed/Failed + Status *string `json:"Status,omitempty" name:"Status"` + + // 当任务进度为Failed时,对任务状态的进一步描述,例如IPAMD组件安装失败 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorMessage *string `json:"ErrorMessage,omitempty" name:"ErrorMessage"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEnableVpcCniProgressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEnableVpcCniProgressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeExistedInstancesRequest struct { *tchttp.BaseRequest @@ -3667,6 +3792,68 @@ type EksCluster struct { TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification" list` } +type EnableVpcCniNetworkTypeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 开启vpc-cni的模式,tke-route-eni开启的是策略路由模式,tke-direct-eni开启的是独立网卡模式 + VpcCniType *string `json:"VpcCniType,omitempty" name:"VpcCniType"` + + // 是否开启固定IP模式 + EnableStaticIp *bool `json:"EnableStaticIp,omitempty" name:"EnableStaticIp"` + + // 使用的容器子网 + Subnets []*string `json:"Subnets,omitempty" name:"Subnets" list` + + // 在固定IP模式下,Pod销毁后退还IP的时间,传参必须大于300;不传默认IP永不销毁。 + ExpiredSeconds *uint64 `json:"ExpiredSeconds,omitempty" name:"ExpiredSeconds"` +} + +func (r *EnableVpcCniNetworkTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableVpcCniNetworkTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "VpcCniType") + delete(f, "EnableStaticIp") + delete(f, "Subnets") + delete(f, "ExpiredSeconds") + if len(f) > 0 { + return errors.New("EnableVpcCniNetworkTypeRequest has unknown keys!") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableVpcCniNetworkTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableVpcCniNetworkTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableVpcCniNetworkTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type EnhancedService struct { // 开启云安全服务。若不指定该参数,则默认开启云安全服务。 @@ -3745,6 +3932,9 @@ type ExistedInstancesForNode struct { // 节点高级设置,会覆盖集群级别设置的InstanceAdvancedSettings(当前只对节点自定义参数ExtraArgs生效) InstanceAdvancedSettingsOverride *InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverride,omitempty" name:"InstanceAdvancedSettingsOverride"` + + // 自定义模式集群,可指定每个节点的pod数量 + DesiredPodNumbers []*int64 `json:"DesiredPodNumbers,omitempty" name:"DesiredPodNumbers" list` } type ExistedInstancesPara struct { @@ -3959,6 +4149,10 @@ type InstanceAdvancedSettings struct { // 节点相关的自定义参数信息 // 注意:此字段可能返回 null,表示取不到有效值。 ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 该节点属于podCIDR大小自定义模式时,可指定节点上运行的pod数量上限 + // 注意:此字段可能返回 null,表示取不到有效值。 + DesiredPodNumber *int64 `json:"DesiredPodNumber,omitempty" name:"DesiredPodNumber"` } type InstanceDataDiskMountSetting struct { @@ -5104,6 +5298,18 @@ type RunSecurityServiceEnabled struct { type SetNodePoolNodeProtectionRequest struct { *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点id + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 节点是否需要移出保护 + ProtectedFromScaleIn *bool `json:"ProtectedFromScaleIn,omitempty" name:"ProtectedFromScaleIn"` } func (r *SetNodePoolNodeProtectionRequest) ToJsonString() string { @@ -5118,6 +5324,10 @@ func (r *SetNodePoolNodeProtectionRequest) FromJsonString(s string) error { if err := json.Unmarshal([]byte(s), &f); err != nil { return err } + delete(f, "ClusterId") + delete(f, "NodePoolId") + delete(f, "InstanceIds") + delete(f, "ProtectedFromScaleIn") if len(f) > 0 { return errors.New("SetNodePoolNodeProtectionRequest has unknown keys!") } @@ -5128,6 +5338,14 @@ type SetNodePoolNodeProtectionResponse struct { *tchttp.BaseResponse Response *struct { + // 成功设置的节点id + // 注意:此字段可能返回 null,表示取不到有效值。 + SucceedInstanceIds []*string `json:"SucceedInstanceIds,omitempty" name:"SucceedInstanceIds" list` + + // 没有成功设置的节点id + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds" list` + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go index 64bf55e39d..54b29956bb 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go @@ -256,6 +256,10 @@ type Address struct { // 弹性公网IP的网络计费模式。注意,传统账户类型账户的弹性公网IP没有网络计费模式属性,值为空。 // 注意:此字段可能返回 null,表示取不到有效值。 InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 弹性公网IP关联的标签列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet" list` } type AddressChargePrepaid struct { @@ -1169,6 +1173,9 @@ type AttachNetworkInterfaceRequest struct { // CVM实例ID。形如:ins-r8hr2upy。 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 网卡的挂载类型:0 标准型,1扩展型,默认值0。 + AttachType *uint64 `json:"AttachType,omitempty" name:"AttachType"` } func (r *AttachNetworkInterfaceRequest) ToJsonString() string { @@ -1185,6 +1192,7 @@ func (r *AttachNetworkInterfaceRequest) FromJsonString(s string) error { } delete(f, "NetworkInterfaceId") delete(f, "InstanceId") + delete(f, "AttachType") if len(f) > 0 { return errors.New("AttachNetworkInterfaceRequest has unknown keys!") } @@ -1925,6 +1933,9 @@ type CreateAndAttachNetworkInterfaceRequest struct { // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] Tags []*Tag `json:"Tags,omitempty" name:"Tags" list` + + // 绑定类型:0 标准型 1 扩展型。 + AttachType *uint64 `json:"AttachType,omitempty" name:"AttachType"` } func (r *CreateAndAttachNetworkInterfaceRequest) ToJsonString() string { @@ -1948,6 +1959,7 @@ func (r *CreateAndAttachNetworkInterfaceRequest) FromJsonString(s string) error delete(f, "SecurityGroupIds") delete(f, "NetworkInterfaceDescription") delete(f, "Tags") + delete(f, "AttachType") if len(f) > 0 { return errors.New("CreateAndAttachNetworkInterfaceRequest has unknown keys!") } @@ -6012,6 +6024,9 @@ type DescribeAddressesRequest struct { //
  • address-type - String - 是否必填:否 - (过滤条件)按照 IP类型 进行过滤。可选值:'EIP','AnycastEIP','HighQualityEIP'
  • //
  • address-isp - String - 是否必填:否 - (过滤条件)按照 运营商类型 进行过滤。可选值:'BGP','CMCC','CUCC', 'CTCC'
  • //
  • dedicated-cluster-id - String - 是否必填:否 - (过滤条件)按照 CDC 的唯一 ID 过滤。CDC 唯一 ID 形如:cluster-11112222。
  • + //
  • tag-key - String - 是否必填:否 - (过滤条件)按照标签键进行过滤。
  • + //
  • tag-value - String - 是否必填:否 - (过滤条件)按照标签值进行过滤。
  • + //
  • tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。tag-key使用具体的标签键进行替换。
  • Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 @@ -6304,11 +6319,14 @@ type DescribeBandwidthPackagesRequest struct { // 每次请求的`Filters`的上限为10。参数不支持同时指定`BandwidthPackageIds`和`Filters`。详细的过滤条件如下: //
  • bandwidth-package_id - String - 是否必填:否 - (过滤条件)按照带宽包的唯一标识ID过滤。
  • //
  • bandwidth-package-name - String - 是否必填:否 - (过滤条件)按照 带宽包名称过滤。不支持模糊过滤。
  • - //
  • network-type - String - 是否必填:否 - (过滤条件)按照带宽包的类型过滤。类型包括'BGP','SINGLEISP'和'ANYCAST'。
  • - //
  • charge-type - String - 是否必填:否 - (过滤条件)按照带宽包的计费类型过滤。计费类型包括'TOP5_POSTPAID_BY_MONTH'和'PERCENT95_POSTPAID_BY_MONTH'
  • + //
  • network-type - String - 是否必填:否 - (过滤条件)按照带宽包的类型过滤。类型包括'HIGH_QUALITY_BGP','BGP','SINGLEISP'和'ANYCAST'。
  • + //
  • charge-type - String - 是否必填:否 - (过滤条件)按照带宽包的计费类型过滤。计费类型包括'TOP5_POSTPAID_BY_MONTH'和'PERCENT95_POSTPAID_BY_MONTH'。
  • //
  • resource.resource-type - String - 是否必填:否 - (过滤条件)按照带宽包资源类型过滤。资源类型包括'Address'和'LoadBalance'
  • //
  • resource.resource-id - String - 是否必填:否 - (过滤条件)按照带宽包资源Id过滤。资源Id形如'eip-xxxx','lb-xxxx'
  • //
  • resource.address-ip - String - 是否必填:否 - (过滤条件)按照带宽包资源Ip过滤。
  • + //
  • tag-key - String - 是否必填:否 - (过滤条件)按照标签键进行过滤。
  • + //
  • tag-value - String - 是否必填:否 - (过滤条件)按照标签值进行过滤。
  • + //
  • tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。tag-key使用具体的标签键进行替换。
  • Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` // 查询带宽包偏移量 @@ -8305,12 +8323,20 @@ type DescribeNetworkInterfaceLimitResponse struct { *tchttp.BaseResponse Response *struct { - // 弹性网卡配额 + // 标准型弹性网卡配额 EniQuantity *int64 `json:"EniQuantity,omitempty" name:"EniQuantity"` - // 每个弹性网卡可以分配的IP配额 + // 每个标准型弹性网卡可以分配的IP配额 EniPrivateIpAddressQuantity *int64 `json:"EniPrivateIpAddressQuantity,omitempty" name:"EniPrivateIpAddressQuantity"` + // 扩展型网卡配额 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExtendEniQuantity *int64 `json:"ExtendEniQuantity,omitempty" name:"ExtendEniQuantity"` + + // 每个扩展型弹性网卡可以分配的IP配额 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExtendEniPrivateIpAddressQuantity *int64 `json:"ExtendEniPrivateIpAddressQuantity,omitempty" name:"ExtendEniPrivateIpAddressQuantity"` + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` @@ -8980,6 +9006,8 @@ type DescribeSubnetsRequest struct { //
  • zone - String - (过滤条件)可用区。
  • //
  • tag-key - String -是否必填:否- (过滤条件)按照标签键进行过滤。
  • //
  • tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例2。
  • + //
  • cdc-id - String - 是否必填:否 - (过滤条件)按照cdc信息进行过滤。过滤出来制定cdc下的子网。
  • + //
  • is-cdc-subnet - String - 是否必填:否 - (过滤条件)按照是否是cdc子网进行过滤。取值:“0”-非cdc子网,“1”--cdc子网
  • Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` // 偏移量,默认为0。 @@ -11320,10 +11348,10 @@ func (r *HaVipDisassociateAddressIpResponse) FromJsonString(s string) error { type IKEOptionsSpecification struct { - // 加密算法,可选值:'3DES-CBC', 'AES-CBC-128', 'AES-CBS-192', 'AES-CBC-256', 'DES-CBC',默认为3DES-CBC + // 加密算法,可选值:'3DES-CBC', 'AES-CBC-128', 'AES-CBS-192', 'AES-CBC-256', 'DES-CBC','SM4', 默认为3DES-CBC PropoEncryAlgorithm *string `json:"PropoEncryAlgorithm,omitempty" name:"PropoEncryAlgorithm"` - // 认证算法:可选值:'MD5', 'SHA1',默认为MD5 + // 认证算法:可选值:'MD5', 'SHA1','SHA-256' 默认为MD5 PropoAuthenAlgorithm *string `json:"PropoAuthenAlgorithm,omitempty" name:"PropoAuthenAlgorithm"` // 协商模式:可选值:'AGGRESSIVE', 'MAIN',默认为MAIN @@ -11825,6 +11853,9 @@ type MigrateNetworkInterfaceRequest struct { // 待迁移的目的CVM实例ID。 DestinationInstanceId *string `json:"DestinationInstanceId,omitempty" name:"DestinationInstanceId"` + + // 网卡绑定类型:0 标准型 1 扩展型。 + AttachType *uint64 `json:"AttachType,omitempty" name:"AttachType"` } func (r *MigrateNetworkInterfaceRequest) ToJsonString() string { @@ -11842,6 +11873,7 @@ func (r *MigrateNetworkInterfaceRequest) FromJsonString(s string) error { delete(f, "NetworkInterfaceId") delete(f, "SourceInstanceId") delete(f, "DestinationInstanceId") + delete(f, "AttachType") if len(f) > 0 { return errors.New("MigrateNetworkInterfaceRequest has unknown keys!") } @@ -14602,6 +14634,10 @@ type NetworkInterface struct { // 网卡所关联的CDC实例ID。 // 注意:此字段可能返回 null,表示取不到有效值。 CdcId *string `json:"CdcId,omitempty" name:"CdcId"` + + // 弹性网卡类型:0:标准型/1:扩展型。默认值为0。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AttachType *uint64 `json:"AttachType,omitempty" name:"AttachType"` } type NetworkInterfaceAttachment struct { @@ -15583,7 +15619,7 @@ type Resource struct { type ResourceDashboard struct { - // Vpc实例ID,例如:vpc-f1xjkw1b。 + // Vpc实例ID,例如:vpc-bq4bzxpj。 VpcId *string `json:"VpcId,omitempty" name:"VpcId"` // 子网实例ID,例如:subnet-bthucmmy。 @@ -15598,7 +15634,7 @@ type ResourceDashboard struct { // 对等连接。 Pcx *uint64 `json:"Pcx,omitempty" name:"Pcx"` - // 当前已使用的IP总数。 + // 统计当前除云服务器 IP、弹性网卡IP和网络探测IP以外的所有已使用的IP总数。云服务器 IP、弹性网卡IP和网络探测IP单独计数。 Ip *uint64 `json:"Ip,omitempty" name:"Ip"` // NAT网关。 diff --git a/vendor/modules.txt b/vendor/modules.txt index cdd5c53214..493374578b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -525,7 +525,7 @@ github.com/stretchr/testify/mock github.com/subosito/gotenv # github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 github.com/tdakkota/asciicheck -# github.com/tencentcloud/tencentcloud-sdk-go v1.0.155 +# github.com/tencentcloud/tencentcloud-sdk-go v1.0.165 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/apigateway/v20180808 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cam/v20190116 diff --git a/website/docs/r/as_lifecycle_hook.html.markdown b/website/docs/r/as_lifecycle_hook.html.markdown index 96d9cf2cef..55f0d728d1 100644 --- a/website/docs/r/as_lifecycle_hook.html.markdown +++ b/website/docs/r/as_lifecycle_hook.html.markdown @@ -34,7 +34,7 @@ The following arguments are supported: * `lifecycle_transition` - (Required) The instance state to which you want to attach the lifecycle hook. Valid values: `INSTANCE_LAUNCHING` and `INSTANCE_TERMINATING`. * `scaling_group_id` - (Required, ForceNew) ID of a scaling group. * `default_result` - (Optional) Defines the action the AS group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. Valid values: `CONTINUE` and `ABANDON`. The default value is `CONTINUE`. -* `heartbeat_timeout` - (Optional) Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~3600). and default value is `300`. +* `heartbeat_timeout` - (Optional) Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~7200). and default value is `300`. * `notification_metadata` - (Optional) Contains additional information that you want to include any time AS sends a message to the notification target. * `notification_queue_name` - (Optional) For CMQ_QUEUE type, a name of queue must be set. * `notification_target_type` - (Optional) Target type. Valid values: `CMQ_QUEUE`, `CMQ_TOPIC`. diff --git a/website/docs/r/kubernetes_cluster.html.markdown b/website/docs/r/kubernetes_cluster.html.markdown index df5f1a4634..61810e72a9 100644 --- a/website/docs/r/kubernetes_cluster.html.markdown +++ b/website/docs/r/kubernetes_cluster.html.markdown @@ -278,6 +278,7 @@ resource "tencentcloud_kubernetes_cluster" "test_node_pool_global_config" { The following arguments are supported: * `vpc_id` - (Required, ForceNew) Vpc Id of the cluster. +* `base_pod_num` - (Optional, ForceNew) The number of basic pods. valid when enable_customized_pod_cidr=true. * `claim_expired_seconds` - (Optional) Claim expired seconds to recycle ENI. This field can only set when field `network_type` is 'VPC-CNI'. `claim_expired_seconds` must greater or equal than 300 and less than 15768000. * `cluster_as_enabled` - (Optional, ForceNew) Indicates whether to enable cluster node auto scaler. Default is false. * `cluster_cidr` - (Optional, ForceNew) A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments. @@ -292,13 +293,16 @@ The following arguments are supported: * `cluster_max_service_num` - (Optional, ForceNew) The maximum number of services in the cluster. Default is 256. Must be a multiple of 16. * `cluster_name` - (Optional) Name of the cluster. * `cluster_os_type` - (Optional, ForceNew) Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'. -* `cluster_os` - (Optional, ForceNew) Operating system of the cluster, the available values include: 'centos7.2x86_64','centos7.6x86_64','ubuntu16.04.1 LTSx86_64','ubuntu18.04.1 LTSx86_64','tlinux2.4x86_64'. Default is 'ubuntu16.04.1 LTSx86_64'. +* `cluster_os` - (Optional, ForceNew) Operating system of the cluster, the available values include: 'centos7.6.0_x64','ubuntu18.04.1x86_64','tlinux2.4x86_64'. Default is 'tlinux2.4x86_64'. * `cluster_version` - (Optional) Version of the cluster, Default is '1.10.5'. * `container_runtime` - (Optional, ForceNew) Runtime type of the cluster, the available values include: 'docker' and 'containerd'. Default is 'docker'. * `deletion_protection` - (Optional) Indicates whether cluster deletion protection is enabled. Default is false. * `docker_graph_path` - (Optional, ForceNew) Docker graph path. Default is `/var/lib/docker`. +* `enable_customized_pod_cidr` - (Optional, ForceNew) Whether to enable the custom mode of node podCIDR size. Default is false. * `eni_subnet_ids` - (Optional) Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field `network_type` is 'VPC-CNI'. `eni_subnet_ids` can not empty once be set. +* `exist_instance` - (Optional, ForceNew) create tke cluster by existed instances. * `extra_args` - (Optional, ForceNew) Custom parameter information related to the node. +* `globe_desired_pod_num` - (Optional, ForceNew) Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes. * `ignore_cluster_cidr_conflict` - (Optional, ForceNew) Indicates whether to ignore the cluster cidr conflict error. Default is false. * `is_non_static_ip_mode` - (Optional, ForceNew) Indicates whether static ip mode is enabled. Default is false. * `kube_proxy_mode` - (Optional) Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required. @@ -328,6 +332,16 @@ The `data_disk` object supports the following: * `disk_type` - (Optional, ForceNew) Types of disk, available values: `CLOUD_PREMIUM` and `CLOUD_SSD`. * `snapshot_id` - (Optional, ForceNew) Data disk snapshot ID. +The `exist_instance` object supports the following: + +* `desired_pod_numbers` - (Optional, ForceNew) Custom mode cluster, you can specify the number of pods for each node. corresponding to the existed_instances_para.instance_ids parameter. +* `instances_para` - (Optional, ForceNew) Reinstallation parameters of an existing instance. +* `node_role` - (Optional, ForceNew) Role of existed node. value:MASTER_ETCD or WORKER. + +The `instances_para` object supports the following: + +* `instance_ids` - (Required, ForceNew) Cluster IDs. + The `master_config` object supports the following: * `instance_type` - (Required, ForceNew) Specified types of CVM instance. @@ -336,6 +350,7 @@ The `master_config` object supports the following: * `cam_role_name` - (Optional, ForceNew) CAM role name authorized to access. * `count` - (Optional, ForceNew) Number of cvm. * `data_disk` - (Optional, ForceNew) Configurations of data disk. +* `desired_pod_num` - (Optional, ForceNew) Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override `[globe_]desired_pod_num` for current node. Either all the fields `desired_pod_num` or none. * `disaster_recover_group_ids` - (Optional, ForceNew) Disaster recover groups to which a CVM instance belongs. Only support maximum 1. * `enhanced_monitor_service` - (Optional, ForceNew) To specify whether to enable cloud monitor service. Default is TRUE. * `enhanced_security_service` - (Optional, ForceNew) To specify whether to enable cloud security service. Default is TRUE. @@ -374,6 +389,7 @@ The `worker_config` object supports the following: * `cam_role_name` - (Optional, ForceNew) CAM role name authorized to access. * `count` - (Optional, ForceNew) Number of cvm. * `data_disk` - (Optional, ForceNew) Configurations of data disk. +* `desired_pod_num` - (Optional, ForceNew) Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override `[globe_]desired_pod_num` for current node. Either all the fields `desired_pod_num` or none. * `disaster_recover_group_ids` - (Optional, ForceNew) Disaster recover groups to which a CVM instance belongs. Only support maximum 1. * `enhanced_monitor_service` - (Optional, ForceNew) To specify whether to enable cloud monitor service. Default is TRUE. * `enhanced_security_service` - (Optional, ForceNew) To specify whether to enable cloud security service. Default is TRUE. diff --git a/website/docs/r/kubernetes_cluster_attachment.html.markdown b/website/docs/r/kubernetes_cluster_attachment.html.markdown index 1297c1627d..9e807856ca 100644 --- a/website/docs/r/kubernetes_cluster_attachment.html.markdown +++ b/website/docs/r/kubernetes_cluster_attachment.html.markdown @@ -97,6 +97,10 @@ resource "tencentcloud_kubernetes_cluster_attachment" "test_attach" { "test1" = "test1", "test2" = "test2", } + + worker_config_overrides { + desired_pod_num = 8 + } } ``` @@ -111,6 +115,7 @@ The following arguments are supported: * `labels` - (Optional, ForceNew) Labels of tke attachment exits CVM. * `password` - (Optional, ForceNew) Password to access, should be set if `key_ids` not set. * `unschedulable` - (Optional, ForceNew) Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling. +* `worker_config_overrides` - (Optional, ForceNew) Override variable worker_config, commonly used to attach existing instances. * `worker_config` - (Optional, ForceNew) Deploy the machine configuration information of the 'WORKER', commonly used to attach existing instances. The `data_disk` object supports the following: @@ -121,9 +126,20 @@ The `data_disk` object supports the following: * `file_system` - (Optional, ForceNew) File system, e.g. `ext3/ext4/xfs`. * `mount_target` - (Optional, ForceNew) Mount target. +The `worker_config_overrides` object supports the following: + +* `data_disk` - (Optional, ForceNew) Configurations of data disk. +* `desired_pod_num` - (Optional, ForceNew) Indicate to set desired pod number in node. valid when the cluster is podCIDR. +* `docker_graph_path` - (Optional, ForceNew) Docker graph path. Default is `/var/lib/docker`. +* `extra_args` - (Optional, ForceNew) Custom parameter information related to the node. This is a white-list parameter. +* `is_schedule` - (Optional, ForceNew) Indicate to schedule the adding node or not. Default is true. +* `mount_target` - (Optional, ForceNew) Mount target. Default is not mounting. +* `user_data` - (Optional, ForceNew) Base64-encoded User Data text, the length limit is 16KB. + The `worker_config` object supports the following: * `data_disk` - (Optional, ForceNew) Configurations of data disk. +* `desired_pod_num` - (Optional, ForceNew) Indicate to set desired pod number in node. valid when the cluster is podCIDR. * `docker_graph_path` - (Optional, ForceNew) Docker graph path. Default is `/var/lib/docker`. * `extra_args` - (Optional, ForceNew) Custom parameter information related to the node. This is a white-list parameter. * `is_schedule` - (Optional, ForceNew) Indicate to schedule the adding node or not. Default is true. diff --git a/website/docs/r/kubernetes_node_pool.html.markdown b/website/docs/r/kubernetes_node_pool.html.markdown index c4fd99e11b..4bc0eccf87 100644 --- a/website/docs/r/kubernetes_node_pool.html.markdown +++ b/website/docs/r/kubernetes_node_pool.html.markdown @@ -157,6 +157,7 @@ The `data_disk` object supports the following: The `node_config` object supports the following: * `data_disk` - (Optional, ForceNew) Configurations of data disk. +* `desired_pod_num` - (Optional, ForceNew) Indicate to set desired pod number in node. valid when the cluster is podCIDR. * `docker_graph_path` - (Optional, ForceNew) Docker graph path. Default is `/var/lib/docker`. * `extra_args` - (Optional, ForceNew) Custom parameter information related to the node. This is a white-list parameter. * `is_schedule` - (Optional, ForceNew) Indicate to schedule the adding node or not. Default is true. diff --git a/website/docs/r/kubernetes_scale_worker.html.markdown b/website/docs/r/kubernetes_scale_worker.html.markdown index a0012e98ed..22d6725dd9 100644 --- a/website/docs/r/kubernetes_scale_worker.html.markdown +++ b/website/docs/r/kubernetes_scale_worker.html.markdown @@ -29,7 +29,8 @@ variable "scale_instance_type" { } resource tencentcloud_kubernetes_scale_worker test_scale { - cluster_id = "cls-godovr32" + cluster_id = "cls-godovr32" + desired_pod_num = 16 labels = { "test1" = "test1", "test2" = "test2", @@ -116,6 +117,7 @@ The following arguments are supported: * `cluster_id` - (Required, ForceNew) ID of the cluster. * `worker_config` - (Required, ForceNew) Deploy the machine configuration information of the 'WORK' service, and create <=20 units for common users. * `data_disk` - (Optional, ForceNew) Configurations of data disk. +* `desired_pod_num` - (Optional, ForceNew) Indicate to set desired pod number in current node. Valid when the cluster enable customized pod cidr. * `docker_graph_path` - (Optional, ForceNew) Docker graph path. Default is `/var/lib/docker`. * `extra_args` - (Optional, ForceNew) Custom parameter information related to the node. * `labels` - (Optional, ForceNew) Labels of kubernetes scale worker created nodes. @@ -144,6 +146,7 @@ The `worker_config` object supports the following: * `cam_role_name` - (Optional, ForceNew) CAM role name authorized to access. * `count` - (Optional, ForceNew) Number of cvm. * `data_disk` - (Optional, ForceNew) Configurations of data disk. +* `desired_pod_num` - (Optional, ForceNew) Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override `[globe_]desired_pod_num` for current node. Either all the fields `desired_pod_num` or none. * `disaster_recover_group_ids` - (Optional, ForceNew) Disaster recover groups to which a CVM instance belongs. Only support maximum 1. * `enhanced_monitor_service` - (Optional, ForceNew) To specify whether to enable cloud monitor service. Default is TRUE. * `enhanced_security_service` - (Optional, ForceNew) To specify whether to enable cloud security service. Default is TRUE.