fix: GKE cluster update behavior#1518
Merged
Merged
Conversation
ddc7edd to
352d2c2
Compare
Collaborator
|
This change is currently targeting Rancher v2.12.0 which coincides with v8.0.0 of this project. Please let me know if you need this to be backported to other versions. |
matttrach
approved these changes
May 30, 2025
Collaborator
|
Please sign your commits with a valid key so that we can merge. |
352d2c2 to
b4698af
Compare
krunalhinguu
added a commit
to krunalhinguu/terraform-provider-rancher2
that referenced
this pull request
Jun 3, 2025
krunalhinguu
added a commit
to krunalhinguu/terraform-provider-rancher2
that referenced
this pull request
Jun 3, 2025
krunalhinguu
added a commit
to krunalhinguu/terraform-provider-rancher2
that referenced
this pull request
Jun 3, 2025
This was referenced Jun 4, 2025
matttrach
pushed a commit
that referenced
this pull request
Jun 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
#1499 This PR resolves an issue where any change to a GKE cluster's
node_poolin Terraform caused a full cluster replacement, which was disruptive and not necessary in most cases.Problem
In the existing implementation of the
rancher2_clusterresource for GKE clusters, thenode_poolblock was marked withForceNew, which forced a full replacement of the cluster whenever any node pool change was made. This made it impossible to perform in-place updates like scaling or updating node pool properties without recreating the entire cluster.Solution
ForceNewfrom thenode_poolfield in the Terraform schema.node_poolentries.These changes allow users to modify existing GKE node pools without triggering full cluster recreation, improving usability and minimizing downtime.
Testing
Manual Testing
Automated Testing
rancher2_clusterstill pass, confirming backward compatibility.QA Testing Considerations
Regressions Considerations
node_poolupdate behavior could potentially cause issues if Rancher expects fields that are no longer being sent.