-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add support node config for GKE node pool #184
Add support node config for GKE node pool #184
Conversation
Looking forward to this getting merged. |
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.
Thanks for this @aadidenko! It mostly looks good to merge, just a few quick comments.
@@ -85,6 +87,34 @@ func resourceContainerNodePoolCreate(d *schema.ResourceData, meta interface{}) e | |||
InitialNodeCount: int64(nodeCount), | |||
} | |||
|
|||
if v, ok := d.GetOk("node_config"); ok { | |||
nodeConfigs := v.([]interface{}) | |||
if len(nodeConfigs) > 1 { |
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.
Instead of this check, let's set MaxItems: 1
in the schema itself (and then we can get rid of this check in resource_container_cluster.go
too)
|
||
nodePool.Config.OauthScopes = scopes | ||
} | ||
} |
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.
What about the other fields? (local_ssd_count, service_account, metadata, image_type, labels, tags)
} | ||
}`, acctest.RandString(10), acctest.RandString(10)) | ||
|
||
func nodepoolCheckMatch(attributes map[string]string, attr string, gcp interface{}) 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.
nit: typically we put helpers like this above the resource test vars
Looks good, thanks! I can merge this once the conflicts are resolved :) |
- Set max items in node config schema - Fill missing node config fields - Put test helpers above than test vars
7a34f6b
to
c1236a3
Compare
* Add support node config for GKE node pool * Review fixes: - Set max items in node config schema - Fill missing node config fields - Put test helpers above than test vars * Update checks in node pool tests * Fix node pool check match
* Add support node config for GKE node pool * Review fixes: - Set max items in node config schema - Fill missing node config fields - Put test helpers above than test vars * Update checks in node pool tests * Fix node pool check match
* Add support node config for GKE node pool * Review fixes: - Set max items in node config schema - Fill missing node config fields - Put test helpers above than test vars * Update checks in node pool tests * Fix node pool check match
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
No description provided.