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

feat(gke-cluster-standard): Set optionnal default_node_pool configuration #2175

Conversation

anthonyhaussman
Copy link
Contributor

@anthonyhaussman anthonyhaussman commented Mar 26, 2024

Description

Add the possibility to set and initialize a default_node_pool to correctly size GKE Control-Planes in a restoration process.

Explanation

As I understand the reason for disabling the creation of the default_node_pool is to take advantage of the gke-nodepool module, I want to give the option to add this node_pool with a specific size to size Control-Planes during a Disaster Recovery Plan using the GKE restoration features.

To add more details, in my test when I used the gke-nodepool to add a nodePool after the creation of the cluster and launch directly a restore process, this one failed due to the resize of Control-Plane by adding nodes.
This action can take a long time, around 45 minutes.

By setting the initial default_node_pool at the creation of the cluster, GKE Control-Planes do not need to resize and improve the restoration process time by a lot.

That's why I would like to add this option.

By default, it keeps the same behavior as before and does not create the default_node_pool.
Furthermore, a validation block has been added to force to set the initial_node_count if remove_pool has been disabled.

The option can be simply added by setting:

  default_node_pool = {
    remove_pool        = false
    initial_node_count = 12
  }

I hope to have been clear enough. 🙏


Checklist

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

@anthonyhaussman anthonyhaussman force-pushed the feat/gke-cluster-standard/default_node_pool_option branch from 4aa95f8 to 3729d38 Compare March 26, 2024 11:11
@anthonyhaussman anthonyhaussman force-pushed the feat/gke-cluster-standard/default_node_pool_option branch from 3729d38 to 9ed6368 Compare March 26, 2024 11:14
@ludoo
Copy link
Collaborator

ludoo commented Mar 26, 2024

Thanks for the thorough explanation, it kind of does make sense to me. @juliocc WDYT?

@anthonyhaussman anthonyhaussman marked this pull request as ready for review March 26, 2024 11:19
@anthonyhaussman anthonyhaussman force-pushed the feat/gke-cluster-standard/default_node_pool_option branch 3 times, most recently from 100d57e to 4b79ab5 Compare March 26, 2024 13:03
@juliocc
Copy link
Collaborator

juliocc commented Mar 26, 2024

TIL. Makes complete sense sense.

@anthonyhaussman anthonyhaussman force-pushed the feat/gke-cluster-standard/default_node_pool_option branch from 4b79ab5 to 835c2f9 Compare March 26, 2024 14:45
@ludoo ludoo enabled auto-merge (squash) March 26, 2024 14:47
auto-merge was automatically disabled March 26, 2024 14:47

Head branch was pushed to by a user without write access

@anthonyhaussman anthonyhaussman force-pushed the feat/gke-cluster-standard/default_node_pool_option branch from 835c2f9 to 3186f2d Compare March 26, 2024 14:47
@anthonyhaussman anthonyhaussman force-pushed the feat/gke-cluster-standard/default_node_pool_option branch from 3186f2d to fff098a Compare March 26, 2024 14:48
@ludoo ludoo enabled auto-merge (squash) March 26, 2024 14:49
modules/gke-cluster-standard/variables.tf Outdated Show resolved Hide resolved
auto-merge was automatically disabled March 26, 2024 15:10

Head branch was pushed to by a user without write access

@anthonyhaussman anthonyhaussman force-pushed the feat/gke-cluster-standard/default_node_pool_option branch from 56c81ae to 2e42ecb Compare March 26, 2024 15:11
@juliocc juliocc merged commit 0f44e58 into GoogleCloudPlatform:master Mar 26, 2024
9 checks passed
@anthonyhaussman anthonyhaussman deleted the feat/gke-cluster-standard/default_node_pool_option branch March 28, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants