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

support tags in cce node pool #993

Merged

Conversation

Jason-Zhang9309
Copy link
Collaborator

@Jason-Zhang9309 Jason-Zhang9309 commented Mar 18, 2021

What this PR does / why we need it:

support tags in cce node pool

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)
fixes #980

Special notes for your reviewer:

Release note:


PR Checklist

  • Tests added/passed.
  • Documentation updated.
  • Schema updated.

Acceptance Steps Performed

make testacc TEST='./huaweicloud' TESTARGS='-run TestAccCCENodePool_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run TestAccCCENodePool_tags -timeout 360m -parallel 4
=== RUN   TestAccCCENodePool_tags
=== PAUSE TestAccCCENodePool_tags
=== CONT  TestAccCCENodePool_tags
--- PASS: TestAccCCENodePool_tags (790.31s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       790.369s

@Jason-Zhang9309 Jason-Zhang9309 force-pushed the dev-cce-nodepool-tags branch 2 times, most recently from 914e66d to 6d74313 Compare March 18, 2021 09:33
"tags": {
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to the API document, tags can be updated. Please have a check.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can using tagsSchema() to replace it. @Jason-Zhang9309

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

max_node_count = 0
scale_down_cooldown_time = 0
priority = 0
type = "vm"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make the format happy

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -102,6 +102,8 @@ The following arguments are supported:

* `labels` - (Optional, Map, ForceNew) Tags of a Kubernetes node, key/value pair format. Changing this parameter will create a new resource.

* `tags` - (Optional, Map, ForceNew) Tags of a VM node, key/value pair format. Changing this parameter will create a new resource.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the Go programming specification, a single line of code should not exceed 120 characters.
The (All) document content should be adjusted later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"tags": {
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can using tagsSchema() to replace it. @Jason-Zhang9309

@Jason-Zhang9309 Jason-Zhang9309 force-pushed the dev-cce-nodepool-tags branch from 9ad5419 to c24204b Compare April 1, 2021 07:43
@Jason-Zhang9309
Copy link
Collaborator Author

new test result:

make testacc TEST='./huaweicloud' TESTARGS='-run TestAccCCENodePool_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run TestAccCCENodePool_tags -timeout 360m -parallel 4
=== RUN   TestAccCCENodePool_tags
=== PAUSE TestAccCCENodePool_tags
=== CONT  TestAccCCENodePool_tags
--- PASS: TestAccCCENodePool_tags (830.43s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       830.475s

@Jason-Zhang9309 Jason-Zhang9309 force-pushed the dev-cce-nodepool-tags branch from c24204b to 6536510 Compare April 2, 2021 07:26
Copy link
Collaborator

@ShiChangkuo ShiChangkuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShiChangkuo ShiChangkuo merged commit 814ef9f into huaweicloud:master Apr 2, 2021
@Jason-Zhang9309 Jason-Zhang9309 deleted the dev-cce-nodepool-tags branch April 2, 2021 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: enable specifying resource tag for CCE node pool.
3 participants