-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow a node pool to be created before it is destroyed #256
Allow a node pool to be created before it is destroyed #256
Conversation
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 the contribution! This is definitely an interesting approach - my main question/concern is in how would we track which fields force a recreation (and hence must be in the keepers block)?
PTAL @morgante |
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.
Looking good, do you think you'd be able to add a test fixture which exercises this module/variant?
PTAL @morgante |
Added two examples and one test fixture. |
PTAL @morgante |
Thanks for the contribution! |
…efore-destroy-nodepools Allow a node pool to be created before it is destroyed
This change is inspired by hashicorp/terraform-provider-google#1054 (comment) .
Currently, if a node pool has to be recreated for any number of reasons, the node pool is deleted then, created. This can be a problem if it is the only node pool in the gke cluster and the new node pool cannot be provisioned. In this scenario, pods could not be scheduled.
This change allows a node pool to be created before it is deleted so that any issues with node pool creation and/or provisioning are discovered before the node pool is removed. This feature is controlled by the variable
node_pools_create_before_destroy
. In order to avoid node pool name collisions, a 4 character alphanumeric is added as a suffix to the name.