Skip to content

Commit

Permalink
[CCE] Add runtime container option (#2146)
Browse files Browse the repository at this point in the history
[CCE] Add runtime container option

Summary of the Pull Request
PR Checklist

 Refers to: #2141
 Tests added/passed.
 Documentation updated.
 Schema updated.
 Release notes added.

Acceptance Steps Performed
=== RUN   TestAccCCENodesV3Basic
--- PASS: TestAccCCENodesV3Basic (181.11s)

PASS

=== RUN   TestAccCCENodesV3DataSource_basic
--- PASS:  TestAccCCENodesV3DataSource_basic (4.70s)

PASS

=== RUN   TestAccCCENodePoolsV3_basic
--- PASS: TestAccCCENodePoolsV3_basic (200.10s)

PASS

Process finished with exit code 0

Reviewed-by: Artem Lifshits
  • Loading branch information
vladimirvshivkov authored Apr 20, 2023
1 parent 0853f08 commit 69cac08
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 31 deletions.
2 changes: 2 additions & 0 deletions docs/data-sources/cce_node_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ All above argument parameters can be exported as attribute parameters along with
* `volumetype` - Disk type.
* `extend_param` - Disk expansion parameters.
* `kms_id` - The Encryption KMS ID of the data volume.

* `runtime` - The runtime of the node.
7 changes: 6 additions & 1 deletion docs/resources/cce_node_pool_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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"
os = "EulerOS 2.9"
flavor = "s2.xlarge.2"
initial_node_count = 2
availability_zone = var.availability_zone
Expand All @@ -27,6 +27,7 @@ resource "opentelekomcloud_cce_node_pool_v3" "node_pool_1" {
max_node_count = 9
scale_down_cooldown_time = 100
priority = 1
runtime = "containerd"
root_volume {
size = 40
Expand Down Expand Up @@ -113,6 +114,10 @@ the AZ based on the AZ sequence. For more details see

* `k8s_tags` - (Optional) Tags of a Kubernetes node, key/value pair format.

* `runtime` - (Optional) Container runtime. Changing this parameter will create a new resource. Options are:
`docker` - Docker
`containerd` - Containerd

* `taints` - (Optional) Taints to created nodes to configure anti-affinity.
* `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 (.).
Expand Down
7 changes: 6 additions & 1 deletion docs/resources/cce_node_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ resource "opentelekomcloud_cce_node_v3" "node_1" {
cluster_id = var.cluster_id
availability_zone = var.availability_zone
os = "EulerOS 2.5"
os = "EulerOS 2.9"
flavor_id = "s2.large.2"
key_pair = var.ssh_key
runtime = "containerd"
bandwidth_size = 100
Expand Down Expand Up @@ -75,6 +76,10 @@ The following arguments are supported:

* `annotations` - (Optional) Node annotation, key/value pair format. Changing this parameter will create a new resource

* `runtime` - (Optional) Container runtime. Changing this parameter will create a new resource. Options are:
`docker` - Docker
`containerd` - Containerd

* `taints` - (Optional) Taints to created nodes to configure anti-affinity.
* `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 (.).
Expand Down
19 changes: 11 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ require (
github.com/jinzhu/copier v0.3.5
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
github.com/mitchellh/go-homedir v1.1.0
github.com/opentelekomcloud/gophertelekomcloud v0.6.1-0.20230414111725-7597df636788
github.com/opentelekomcloud/gophertelekomcloud v0.6.1
github.com/unknwon/com v1.0.1
golang.org/x/crypto v0.1.0
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
golang.org/x/sync v0.1.0
gopkg.in/yaml.v2 v2.4.0
)

Expand All @@ -26,7 +26,7 @@ require (
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
Expand All @@ -44,6 +44,7 @@ require (
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
Expand All @@ -52,15 +53,17 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/stretchr/testify v1.8.1 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.12.1 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading

0 comments on commit 69cac08

Please sign in to comment.