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

Add initial_node_count support to gke-node-pool #3068

Merged

Conversation

sharabiani
Copy link
Collaborator

Support for initial_node_count added to gke-node-pool module.
Set it to provision the number of desired nodes right away after node-pool creation without the need for manual resize using cloud console.

The setting will be considered only when creating a node-pool and in the next deployments it will be ignored.

Manual tests:

  • Added the initial_node_count setting to a node-pool in a blueprint
  • Provisioned the blueprint
  • Verified the number of provisioned nodes on Cloud Console

@sharabiani sharabiani added the release-module-improvements Added to release notes under the "Module Improvements" heading. label Sep 24, 2024
@sharabiani sharabiani self-assigned this Sep 24, 2024
Copy link
Contributor

@ankitkinra ankitkinra left a comment

Choose a reason for hiding this comment

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

If we ignore this setting update, then wouldn't our subsequent configurations using this node count be incorrect ?

Does this setting work with autoscaling ? How does this relate to static_node_count ?

@sharabiani
Copy link
Collaborator Author

sharabiani commented Sep 25, 2024

@ankitkinra

If we ignore this setting update, then wouldn't our subsequent configurations using this node count be incorrect ?

It's recommended to ignore it for updates because if the node_pool resized manually, this setting will cause node_pool recreation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool.html#initial_node_count

Does this setting work with autoscaling ? How does this relate to static_node_count ?

node_count and initial_node_count cannot be set together:
https://github.com/hashicorp/terraform-provider-google/blob/6be57bdad382050af99b07d4b35ede995bfd97fe/google/services/container/resource_container_node_pool.go#L940
I added two precondition to control node_count and min/max total node count in autoscaling.

@sharabiani sharabiani merged commit ece0d4a into GoogleCloudPlatform:develop Sep 26, 2024
8 of 53 checks passed
@tpdownes tpdownes mentioned this pull request Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-module-improvements Added to release notes under the "Module Improvements" heading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants