Skip to content
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

chore: scall_enable > scale_enable for cce_node_pool #5154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data-sources/cce_node_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ In addition to all arguments above, the following attributes are exported:

* `extend_param` - Extended parameter.

* `scall_enable` - Whether auto scaling is enabled.
* `scale_enable` - Whether auto scaling is enabled.

* `min_node_count` - Minimum number of nodes allowed if auto scaling is enabled.

Expand Down
2 changes: 1 addition & 1 deletion docs/json/data-sources/cce_node_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"type": "number",
"computed": true
},
"scall_enable": {
"scale_enable": {
"type": "bool",
"computed": true
},
Expand Down
2 changes: 1 addition & 1 deletion docs/json/resources/cce_node_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"type": "number",
"optional": true
},
"scall_enable": {
"scale_enable": {
"type": "bool",
"optional": true
},
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/cce_node_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "huaweicloud_cce_node_pool" "node_pool" {
flavor_id = "s3.large.4"
availability_zone = var.availability_zone
key_pair = var.keypair
scall_enable = true
scale_enable = true
min_node_count = 1
max_node_count = 10
scale_down_cooldown_time = 100
Expand Down Expand Up @@ -60,7 +60,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = var.availability_zone
key_pair = var.key_pair
scall_enable = false
scale_enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -148,7 +148,7 @@ resource "huaweicloud_cce_node_pool" "node_pool" {
flavor_id = "s3.large.4"
availability_zone = var.availability_zone
key_pair = var.keypair
scall_enable = true
scale_enable = true
min_node_count = 1
max_node_count = 10
scale_down_cooldown_time = 100
Expand Down Expand Up @@ -219,7 +219,7 @@ The following arguments are supported:
The [object](#extend_params) structure is documented below.
Changing this parameter will create a new resource.

* `scall_enable` - (Optional, Bool) Specifies whether to enable auto scaling.
* `scale_enable` - (Optional, Bool) Specifies whether to enable auto scaling.
If Autoscaler is enabled, install the autoscaler add-on to use the auto scaling feature.

* `min_node_count` - (Optional, Int) Specifies the minimum number of nodes allowed if auto scaling is enabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
scale_enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 4
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = true
scale_enable = true
min_node_count = 2
max_node_count = 10
priority = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestAccNodePool_basic(t *testing.T) {
rc.CheckResourceExists(),
resource.TestCheckResourceAttr(resourceName, "name", updateName),
resource.TestCheckResourceAttr(resourceName, "current_node_count", "2"),
resource.TestCheckResourceAttr(resourceName, "scall_enable", "true"),
resource.TestCheckResourceAttr(resourceName, "enable", "true"),
resource.TestCheckResourceAttr(resourceName, "min_node_count", "2"),
resource.TestCheckResourceAttr(resourceName, "max_node_count", "9"),
resource.TestCheckResourceAttr(resourceName, "scale_down_cooldown_time", "100"),
Expand Down Expand Up @@ -128,7 +128,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -167,7 +167,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 2
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = true
enable = true
min_node_count = 2
max_node_count = 9
scale_down_cooldown_time = 100
Expand Down Expand Up @@ -212,7 +212,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -342,7 +342,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -390,7 +390,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -483,7 +483,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -550,7 +550,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -704,7 +704,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -784,7 +784,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down Expand Up @@ -855,7 +855,7 @@ resource "huaweicloud_cce_node_pool" "test" {
initial_node_count = 1
availability_zone = data.huaweicloud_availability_zones.test.names[0]
key_pair = huaweicloud_kps_keypair.test.name
scall_enable = false
enable = false
min_node_count = 0
max_node_count = 0
scale_down_cooldown_time = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func DataSourceCCENodePoolV3() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"scall_enable": {
"scale_enable": {
Type: schema.TypeBool,
Computed: true,
},
Expand Down Expand Up @@ -200,7 +200,7 @@ func dataSourceCceNodePoolsV3Read(_ context.Context, d *schema.ResourceData, met
d.Set("availability_zone", NodePool.Spec.NodeTemplate.Az),
d.Set("os", NodePool.Spec.NodeTemplate.Os),
d.Set("key_pair", NodePool.Spec.NodeTemplate.Login.SshKey),
d.Set("scall_enable", NodePool.Spec.Autoscaling.Enable),
d.Set("scale_enable", NodePool.Spec.Autoscaling.Enable),
d.Set("initial_node_count", NodePool.Spec.InitialNodeCount),
d.Set("current_node_count", NodePool.Status.CurrentNode),
d.Set("min_node_count", NodePool.Spec.Autoscaling.MinNodeCount),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func ResourceNodePool() *schema.Resource {
Optional: true,
ForceNew: true,
},
"scall_enable": {
"scale_enable": {
Type: schema.TypeBool,
Optional: true,
},
Expand Down Expand Up @@ -294,7 +294,7 @@ func buildNodePoolCreateOpts(d *schema.ResourceData) (*nodepools.CreateOpts, err
InitializedConditions: utils.ExpandToStringList(d.Get("initialized_conditions").([]interface{})),
},
Autoscaling: nodepools.AutoscalingSpec{
Enable: d.Get("scall_enable").(bool),
Enable: d.Get("scale_enable").(bool),
MinNodeCount: d.Get("min_node_count").(int),
MaxNodeCount: d.Get("max_node_count").(int),
ScaleDownCooldownTime: d.Get("scale_down_cooldown_time").(int),
Expand Down Expand Up @@ -402,7 +402,7 @@ func resourceNodePoolRead(_ context.Context, d *schema.ResourceData, meta interf
d.Set("os", s.Spec.NodeTemplate.Os),
d.Set("billing_mode", s.Spec.NodeTemplate.BillingMode),
d.Set("key_pair", s.Spec.NodeTemplate.Login.SshKey),
d.Set("scall_enable", s.Spec.Autoscaling.Enable),
d.Set("scale_enable", s.Spec.Autoscaling.Enable),
d.Set("min_node_count", s.Spec.Autoscaling.MinNodeCount),
d.Set("max_node_count", s.Spec.Autoscaling.MaxNodeCount),
d.Set("current_node_count", s.Status.CurrentNode),
Expand Down Expand Up @@ -449,7 +449,7 @@ func buildNodePoolUpdateOpts(d *schema.ResourceData) (*nodepools.UpdateOpts, err
Spec: nodepools.UpdateSpec{
InitialNodeCount: utils.Int(d.Get("initial_node_count").(int)),
Autoscaling: nodepools.AutoscalingSpec{
Enable: d.Get("scall_enable").(bool),
Enable: d.Get("scale_enable").(bool),
MinNodeCount: d.Get("min_node_count").(int),
MaxNodeCount: d.Get("max_node_count").(int),
ScaleDownCooldownTime: d.Get("scale_down_cooldown_time").(int),
Expand Down
Loading