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 name_prefix for node pool creation #1377

Open
dodwmd opened this issue Aug 27, 2022 · 2 comments
Open

support name_prefix for node pool creation #1377

dodwmd opened this issue Aug 27, 2022 · 2 comments
Labels
enhancement New feature or request triaged Scoped and ready for work

Comments

@dodwmd
Copy link

dodwmd commented Aug 27, 2022

TL;DR

Currently the module requires 'name' to be specified but container_node_pool supports an alternative via name_prefix to allow for node pool's to be created with a prefix and a randomly generated suffix. The purpose is to allow for the alteration of node pool's while allowing workloads to migrate before the old node pool's are destroyed. Can the module be updated to support this functionality. Currently we manage this by multi-stage changes where new node pools are created, workloads migrated, then the old node pool is removed from terraform. This creates a higher burden on change than is necessary when managing a large amount of clusters.

Terraform Resources

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#name_prefix

variables_defaults.tf line 27, in locals:
│   27:       [for node_pool in var.node_pools : node_pool["name"]],
main.tf line 48, in locals:
│   48:   node_pool_names = [for np in toset(var.node_pools) : np.name]
variables_defaults.tf line 47, in locals:
│   47:       [for node_pool in var.node_pools : node_pool["name"]],
variables_defaults.tf line 57, in locals:
│   57:       [for node_pool in var.node_pools : node_pool["name"]],
variables_defaults.tf line 67, in locals:
│   67:       [for node_pool in var.node_pools : node_pool["name"]],

Detailed design

No response

Additional information

No response

@dodwmd dodwmd added the enhancement New feature or request label Aug 27, 2022
@bharathkkb
Copy link
Member

@dodwmd thanks for the report! An alternative for this use case could be using the update variant modules
https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/tree/master/modules/beta-public-cluster-update-variant#node-pool-update-variant

@bharathkkb bharathkkb added the triaged Scoped and ready for work label Sep 7, 2022
@lrh00000
Copy link

lrh00000 commented Sep 7, 2022

@dodwmd thanks for the report! An alternative for this use case could be using the update variant modules https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/tree/master/modules/beta-public-cluster-update-variant#node-pool-update-variant

Are there plans to implement this for private clusters as well? Current immutable node pool situation is extremely annoying, it is impossible to make any change without disruption. This is a real disappointment, aws eks module doesn't have such problems, it is easy to add nodes to node pools. I can't even import node pools to a gke cluster, current gke terraform module is unusable in production until this fix is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged Scoped and ready for work
Projects
None yet
Development

No branches or pull requests

3 participants