-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CCE] Resource opentelekomcloud_cce_node_pool_v3 (#825)
[CCE] Resource opentelekomcloud_cce_node_pool_v3 Summary of the Pull Request Resolve #806 Based on #807 Co-authored-by: Philipp Eckel philipp.eckel@coyoapp.com PR Checklist Refers to: #806, #807 Tests added/passed. Documentation updated. Schema updated. Acceptance Steps Performed === RUN TestAccCCENodePoolsV3_basic --- PASS: TestAccCCENodePoolsV3_basic (924.48s) PASS Process finished with exit code 0 Reviewed-by: Anton Kachurin <katchuring@gmail.com> Reviewed-by: Rodion Gyrbu <fpsoff@outlook.com> Reviewed-by: Anton Sidelnikov <None> Reviewed-by: None <None>
- Loading branch information
1 parent
cbf3a86
commit 42a2b94
Showing
7 changed files
with
883 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
subcategory: "Cloud Container Engine (CCE)" | ||
--- | ||
|
||
# opentelekomcloud_cce_node_pool_v3 | ||
|
||
Add a node pool to a container cluster. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
variable "cluster_id" {} | ||
variable "ssh_key" {} | ||
variable "availability_zone" {} | ||
resource "opentelekomcloud_cce_node_pool_v3" "node_pool_1" { | ||
cluster_id = var.cluster_id | ||
name = "opentelekomcloud-cce-node-pool_test" | ||
os = "EulerOS 2.5" | ||
flavor = "s2.xlarge.2" | ||
initial_node_count = 2 | ||
availability_zone = var.availability_zone | ||
key_pair = var.ssh_key | ||
scale_enable = true | ||
min_node_count = 2 | ||
max_node_count = 9 | ||
scale_down_cooldown_time = 100 | ||
priority = 1 | ||
root_volume { | ||
size = 40 | ||
volumetype = "SSD" | ||
} | ||
data_volumes { | ||
size = 100 | ||
volumetype = "SSD" | ||
} | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
The following arguments are supported: | ||
|
||
* `cluster_id` - (Required) ID of the cluster. Changing this parameter will create a new resource. | ||
|
||
* `flavor` - (Required) Specifies the flavor id. Changing this parameter will create a new resource. | ||
|
||
* `availability_zone` - (Required) specify the name of the available partition (AZ). Changing this parameter will create a new resource. | ||
|
||
* `key_pair` - (Optional) Key pair name when logging in to select the key pair mode. This parameter and password are alternative. Changing this parameter will create a new resource. | ||
|
||
* `password` - (Optional) Key pair name when logging in to select the key pair mode. This parameter and password are alternative. Changing this parameter will create a new resource. | ||
|
||
* `os` - (Optional) Node OS. Changing this parameter will create a new resource. | ||
|
||
Supported OS depends on kubernetes version of the cluster. | ||
* Clusters of Kubernetes `v1.13` or later support `EulerOS 2.5`. | ||
* Clusters of Kubernetes `v1.17` or later support `EulerOS 2.5` and `CentOS 7.7`. | ||
|
||
* `name` - (Required) Node Pool Name. | ||
|
||
* `initial_node_count` - (Required) Initial number of expected nodes in the node pool. | ||
|
||
* `subnet_id` - (Optional) The ID of the subnet to which the NIC belongs. Changing this parameter will create a new resource. | ||
|
||
* `preinstall` - (Optional) Script required before installation. The input value can be a Base64 encoded string or not. | ||
Changing this parameter will create a new resource. | ||
|
||
* `postinstall` - (Optional) Script required after installation. The input value can be a Base64 encoded string or not. | ||
Changing this parameter will create a new resource. | ||
|
||
* `scale_enable` - (Optional) Whether to enable auto scaling. If Autoscaler is enabled, install the autoscaler add-on to use the auto scaling feature. | ||
|
||
* `min_node_count` - (Optional) Minimum number of nodes allowed if auto scaling is enabled. | ||
|
||
* `max_node_count` - (Optional) Maximum number of nodes allowed if auto scaling is enabled. | ||
|
||
* `scale_down_cooldown_time` - (Optional) Interval between two scaling operations, in minutes. | ||
|
||
* `server_group_reference` - (Optional) ECS group ID. If this parameter is specified, all nodes in the node pool will be created in this ECS group. | ||
|
||
* `priority` - (Optional) Weight of a node pool. A node pool with a higher weight has a higher priority during scaling. | ||
|
||
* `user_tags` - (Optional) Tag of a VM, key/value pair format. Changing this parameter will create a new resource. | ||
|
||
* `k8s_tags` - (Optional) Tags of a Kubernetes node, key/value pair format. Changing this parameter will create a new resource. | ||
|
||
* `taints` - (Optional) Taints to created nodes to configure anti-affinity. Changing this parameter will create a new resource. | ||
* `key` - (Required) A key must contain 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain name can be used as the prefix of a key. | ||
* `value` - (Required) A value must start with a letter or digit and can contain a maximum of 63 characters, including letters, digits, hyphens (-), underscores (_), and periods (.). | ||
* `effect` - (Optional) Available options are `NoSchedule`, `PreferNoSchedule`, and `NoExecute`. | ||
|
||
* `root_volume` - (Required) It corresponds to the system disk related configuration. Changing this parameter will create a new resource. | ||
* `size` - (Required) Disk size in GB. | ||
* `volumetype` - (Required) Disk type. | ||
* `extend_param` - (Optional) Disk expansion parameters. | ||
|
||
* `data_volumes` - (Required) Represents the data disk to be created. Changing this parameter will create a new resource. | ||
* `size` - (Required) Disk size in GB. | ||
* `volumetype` - (Required) Disk type. | ||
* `extend_param` - (Optional) Disk expansion parameters. | ||
|
||
## Attributes Reference | ||
|
||
All above argument parameters can be exported as attribute parameters along with attribute reference. | ||
|
||
* `status` - Node status information. | ||
|
||
* `id` - Specifies a resource ID in UUID format. | ||
|
||
* `billing_mode ` - Billing mode of a node. | ||
|
||
## Timeouts | ||
|
||
This resource provides the following timeouts configuration options: | ||
|
||
- `create` - Default is 20 minutes. | ||
|
||
- `delete` - Default is 20 minutes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.