Skip to content

Commit d4bdba3

Browse files
author
junchuguo
committed
update tke
1 parent 7540508 commit d4bdba3

11 files changed

+26
-13
lines changed

tencentcloud/resource_tc_kubernetes_as_scaling_group.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ func ResourceTencentCloudKubernetesAsScalingGroup() *schema.Resource {
186186
Elem: &schema.Schema{Type: schema.TypeString},
187187
Description: "Custom parameter information related to the node.",
188188
},
189+
"unschedulable": {
190+
Type: schema.TypeInt,
191+
Optional: true,
192+
ForceNew: true,
193+
Default: 0,
194+
Description: "Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.",
195+
},
189196
},
190197
}
191198
}
@@ -844,7 +851,9 @@ func resourceKubernetesAsScalingGroupCreate(d *schema.ResourceData, meta interfa
844851
}
845852

846853
labels := GetTkeLabels(d, "labels")
847-
854+
if temp, ok := d.GetOk("unschedulable"); ok {
855+
iAdvanced.Unschedulable = int64(temp.(int))
856+
}
848857
if temp, ok := d.GetOk("extra_args"); ok {
849858
extraArgs := helper.InterfacesStrings(temp.([]interface{}))
850859
for _, extraArg := range extraArgs {

tencentcloud/resource_tc_kubernetes_as_scaling_group_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ resource "tencentcloud_kubernetes_as_scaling_group" "as_test" {
212212
}
213213
214214
}
215-
215+
unschedulable = 0
216216
labels = {
217217
"test1" = "test1",
218218
"test2" = "test2",
@@ -271,7 +271,7 @@ resource "tencentcloud_kubernetes_as_scaling_group" "as_test" {
271271
}
272272
273273
}
274-
274+
unschedulable = 1
275275
labels = {
276276
"test1" = "test1",
277277
"test2" = "test2",

tencentcloud/resource_tc_kubernetes_cluster.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,8 @@ func resourceTencentCloudTkeCluster() *schema.Resource {
834834
Type: schema.TypeInt,
835835
Optional: true,
836836
ForceNew: true,
837-
Description: "Sets whether the joining node participates in the schedule.",
837+
Default: 0,
838+
Description: "Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.",
838839
},
839840
"mount_target": {
840841
Type: schema.TypeString,
@@ -1296,9 +1297,8 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface
12961297
iAdvanced.ExtraArgs.Kubelet = append(iAdvanced.ExtraArgs.Kubelet, &extraArgs[i])
12971298
}
12981299
}
1299-
13001300
if temp, ok := d.GetOk("unschedulable"); ok {
1301-
iAdvanced.Unschedulable = temp.(int64)
1301+
iAdvanced.Unschedulable = int64(temp.(int))
13021302
}
13031303
if temp, ok := d.GetOk("docker_graph_path"); ok {
13041304
iAdvanced.DockerGraphPath = temp.(string)

tencentcloud/resource_tc_kubernetes_cluster_attachment.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ func resourceTencentCloudTkeClusterAttachment() *schema.Resource {
252252
Type: schema.TypeInt,
253253
Optional: true,
254254
ForceNew: true,
255-
Description: "Sets whether the joining node participates in the schedule.",
255+
Default: 0,
256+
Description: "Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.",
256257
},
257258
//compute
258259
"security_groups": {

tencentcloud/resource_tc_kubernetes_node_pool.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ func ResourceTencentCloudKubernetesNodePool() *schema.Resource {
331331
Type: schema.TypeInt,
332332
Optional: true,
333333
ForceNew: true,
334-
Description: "Sets whether the joining node participates in the schedule.",
334+
Default: 0,
335+
Description: "Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.",
335336
},
336337
"taints": {
337338
Type: schema.TypeList,

tencentcloud/resource_tc_kubernetes_scale_worker.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ func resourceTencentCloudTkeScaleWorker() *schema.Resource {
158158
Type: schema.TypeInt,
159159
Optional: true,
160160
ForceNew: true,
161-
Description: "Sets whether the joining node participates in the schedule.",
161+
Default: 0,
162+
Description: "Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.",
162163
},
163164
"docker_graph_path": {
164165
Type: schema.TypeString,

website/docs/r/kubernetes_as_scaling_group.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ The following arguments are supported:
141141
* `cluster_id` - (Required, ForceNew) ID of the cluster.
142142
* `extra_args` - (Optional, ForceNew) Custom parameter information related to the node.
143143
* `labels` - (Optional, ForceNew) Labels of kubernetes AS Group created nodes.
144+
* `unschedulable` - (Optional, ForceNew) Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
144145

145146
The `auto_scaling_config` object supports the following:
146147

website/docs/r/kubernetes_cluster.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ The following arguments are supported:
240240
* `project_id` - (Optional) Project ID, default value is 0.
241241
* `service_cidr` - (Optional, ForceNew) A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
242242
* `tags` - (Optional) The tags of the cluster.
243-
* `unschedulable` - (Optional, ForceNew) Sets whether the joining node participates in the schedule.
243+
* `unschedulable` - (Optional, ForceNew) Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
244244
* `worker_config` - (Optional, ForceNew) 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'.
245245

246246
The `cluster_extra_args` object supports the following:

website/docs/r/kubernetes_cluster_attachment.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ The following arguments are supported:
110110
* `key_ids` - (Optional, ForceNew) The key pair to use for the instance, it looks like skey-16jig7tx, it should be set if `password` not set.
111111
* `labels` - (Optional, ForceNew) Labels of tke attachment exits CVM.
112112
* `password` - (Optional, ForceNew) Password to access, should be set if `key_ids` not set.
113-
* `unschedulable` - (Optional, ForceNew) Sets whether the joining node participates in the schedule.
113+
* `unschedulable` - (Optional, ForceNew) Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
114114
* `worker_config` - (Optional, ForceNew) Deploy the machine configuration information of the 'WORKER', commonly used to attach existing instances.
115115

116116
The `data_disk` object supports the following:

website/docs/r/kubernetes_node_pool.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The following arguments are supported:
123123
* `scaling_mode` - (Optional, ForceNew) Auto scaling mode. Valid values are `CLASSIC_SCALING`(scaling by create/destroy instances), `WAKE_UP_STOPPED_SCALING`(Boot priority for expansion. When expanding the capacity, the shutdown operation is given priority to the shutdown of the instance. If the number of instances is still lower than the expected number of instances after the startup, the instance will be created, and the method of destroying the instance will still be used for shrinking).
124124
* `subnet_ids` - (Optional, ForceNew) ID list of subnet, and for VPC it is required.
125125
* `taints` - (Optional) Taints of kubernetes node pool created nodes.
126-
* `unschedulable` - (Optional, ForceNew) Sets whether the joining node participates in the schedule.
126+
* `unschedulable` - (Optional, ForceNew) Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
127127

128128
The `auto_scaling_config` object supports the following:
129129

0 commit comments

Comments
 (0)