-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSK:Support for setting essd disk performance and automatic disk snapshot policies for cluster and node pool nodes. #3371
Conversation
@@ -877,6 +902,26 @@ func resourceAlicloudCSKubernetesUpdate(d *schema.ResourceData, meta interface{} | |||
} | |||
} | |||
|
|||
if d.HasChange("worker_disk_category") { | |||
args.WorkerSystemDiskCategory = aliyungoecs.DiskCategory(d.Get("worker_disk_category").(string)) | |||
d.SetPartial("worker_disk_category") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d.SetPartial 应该在对接的 Update API 调用完成之后进行 SetPartial,作用是当 API 调用成功后将变更的属性写入到 state 文件中
"worker_disk_category": "cloud_essd", | ||
"worker_disk_size": "100", | ||
"worker_disk_performance_level": "PL0", | ||
"worker_disk_snapshot_policy_id": "${alicloud_snapshot_policy.default.id}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worker_disk_snapshot_policy_id 模板中引用其他资源的也需要 check,值为 CHECKSET 检查该值是否有返回;
[]string 类型的例如 worker_vswitch_ids check 返回值的元素个数 "worker_vswitch_ids.#": "1", ;
另外 worker_disk_performance_level,worker_disk_snapshot_policy_id 应该测试下扩容后是否能正常修改;
"worker_data_disks": []map[string]string{{"category": "cloud_essd", "size": "120", "auto_snapshot_policy_id": "${alicloud_snapshot_policy.default.id}", "performance_level": "PL0"}}, | ||
}), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheck(map[string]string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个和 cs_kubernets 存在同样的问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我加一下
@@ -193,13 +194,17 @@ The following example is the definition of `master_vswtich_ids` block, the `work | |||
* `category`: the type of the data disks. Valid values: `cloud`, `cloud_efficiency`, `cloud_ssd` and `cloud_essd`. Default to `cloud_efficiency`. | |||
* `size`: the size of a data disk, Its valid value range [40~32768] in GB. Unit: GiB. | |||
* `encrypted`: specifies whether to encrypt data disks. Valid values: true and false. | |||
* `performance_level` - (Optional, Available in 1.120.0+) Worker node data disk performance level, when `category` values `cloud_essd`, the optional values are `PL0`, `PL1`, `PL2` or `PL3`, but the specific performance level is related to the disk capacity. For more information, see [Enhanced SSDs](https://www.alibabacloud.com/help/doc-detail/122389.htm). Default is `PL1`. | |||
* `auto_snapshot_policy_id` - (Optional, Available in 1.120.0+) Worker node data disk auto snapshot policy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个属性是之前的版本添加的吧,我看本次没有新增这个属性
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以前就有但是未对外公开。
No description provided.