-
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
Extend google_container_node_pool documentation on nodepool changes #17522
Comments
Just to make clear: this is a request to improve documentation. Solving the issue behind this goes beyond the scope of this ticket and probably requires the cooperation of the GCP terraform provider developers and GCP itself. |
Hi @nemethloci you can found an alternative documented here for this scenario: So you can approach features like strategy and blue_green_settings for upgrades adjusting it according to your requirements. |
Hi @ggtisc the feature you referenced is valid only with regard to upgrades and unfortunately does not apply when changing other aspects of the nodepool, which my request is about (ie: disk type, node type...) |
@nemethloci could you please provide the code of the resource |
Here you go:
|
One more update: google support has confirmed, that it is expected, that both upon nodepool deletion and manual draining of all nodes of a nodepool, unless the autoscaler is disabled first, new nodes would be spinned of without being cordoned by the autoscaler. As such the 'workaround' process to be used is:
|
@nemethloci is this the same issue of the 17668? |
Note from triage: this doesn't look like a duplicate - that issue was raised by the same author. |
Yes and no:
Why I have raised two tickets: when I originally reported the documentation related (this) ticket, I thought (based on some early feedback from google engineers), that google will admit, that this is a bug and they will fix it themselves, hence there would be no need to alter the terraform provider itself. |
FYI: google have created a feature request (without any commitment with regard to timeline): |
I think GoogleCloudPlatform/magic-modules#12014 will at least partially help, by allowing in-place updates (without recreating the node pool) of at least some of the fields in I didn't mark this as being "fixed by" that, because I'm not 100% sure it solves all cases and if it's the same underlying issue, but feel free to update that and / or comment here if you think that should fix it. |
Agreed that in-place updates help, but there are still some ForceNew fields within |
Community Note
Terraform Version
v1.7.4
Affected Resource(s)
google_container_node_pool
Terraform Configuration
Debug Output
No response
Expected Behavior
In case of a nodepool change, that requires changing the underlying template (which is immutable), the provider would ideally:
This is unfortunately not the current behavior probably because the above process would require the 'interaction' of multiple providers (google provider to manage the nodepools and the kubernetes provider to drain the nodes. Not sure if the nodepool resize operation on the GCP API could be abused for draining...?). Considering the nodepool upgrades work as expected following the above approach I think it would worth to emphasize in the documentation what would happen in case of non-version related changes to the node pool resource.
This would be especially important as not being aware of the above can contain service outage (see actual behavior for details)
Actual Behavior
Without create_before_destroy flag the nodepool is deleted and then recreated resulting in complete outage with regard to the services bound to the nodepool. In case it is set, there will still be outage of all services as:
Steps to reproduce
terraform apply
Important Factoids
No response
References
#10895
b/331218437
The text was updated successfully, but these errors were encountered: