Skip to content

feat(gke): add timeout_delete and inline node pool timeout controls - #6382

Merged
shubpal07 merged 1 commit into
GoogleCloudPlatform:developfrom
shubpal07:shubham/gke-module-timeout-delete
Oct 6, 2026
Merged

shubpal07 merged 1 commit into
GoogleCloudPlatform:developfrom
shubpal07:shubham/gke-module-timeout-delete

Conversation

@shubpal07

@shubpal07 shubpal07 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds timeout_delete support and symmetric timeouts blocks across Cluster Toolkit's GKE modules (modules/scheduler/gke-cluster and modules/compute/gke-node-pool), along with positive duration validation and documentation on timeout_create, timeout_update, and timeout_delete.

Context

Previously, modules/scheduler/gke-cluster and modules/compute/gke-node-pool exposed timeout_create and timeout_update, but omitted timeout_delete. Additionally, the inline node pool resources inside modules/scheduler/gke-cluster (google_container_node_pool.system_node_pools and google_container_node_pool.cpu_np) did not wire timeouts blocks at all.

Exposing timeout_delete (default = null) and wiring create, update, and delete across all GKE cluster and node pool resources allows large-scale GKE deployments and automated test harnesses to configure explicit teardown and provisioning timeouts when needed, while defaulting to null (falling back to the provider defaults with zero impact or replacement diff on existing clusters).

Changes

  1. modules/compute/gke-node-pool:
    • Added timeout_delete variable (type = string, default = null) and wired delete = var.timeout_delete into google_container_node_pool.node_pool.
    • Added positive Go duration string validation (s, m, h units) and updated descriptions on timeout_create, timeout_update, and timeout_delete.
  2. modules/scheduler/gke-cluster:
    • Added timeout_delete variable (type = string, default = null) and wired delete = var.timeout_delete into google_container_cluster.gke_cluster.
    • Added timeouts { create = var.timeout_create, update = var.timeout_update, delete = var.timeout_delete } to google_container_node_pool.system_node_pools and google_container_node_pool.cpu_np.
    • Added positive Go duration string validation (s, m, h units) and updated descriptions on timeout_create, timeout_update, and timeout_delete.
  3. Documentation:
    • Regenerated README.md tables for both modules via tools/autodoc/terraform_docs.sh.

Terraform Provider Default Timeout References

When timeout_create, timeout_update, or timeout_delete are left at their default (null), Terraform falls back to the upstream google / google-beta provider defaults:

Validation

  • Verified terraform fmt -check, tflint, and terraform validate across both modules/compute/gke-node-pool and modules/scheduler/gke-cluster.
  • Tested variable validation rules across valid (null, "30m", "60m", "2h", "1h30m") and invalid ("0s", "0m", "-5m", "60", "") inputs.
  • Verified go test ./pkg/... ./cmd/... and tools/autodoc/terraform_docs.sh.

Change-Id: Ia6156332164a449115c2d4b9294dbbe788f3b40a
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the GKE modules within the Cluster Toolkit by providing granular control over resource operation timeouts. By exposing 'timeout_delete' and ensuring consistent 'timeouts' blocks are applied to all cluster and node pool resources, users can now explicitly manage provisioning and teardown durations, improving reliability for large-scale deployments and automated testing.

Highlights

  • Timeout Configuration: Added 'timeout_delete' support and integrated symmetric 'timeouts' blocks across GKE cluster and node pool resources.
  • Input Validation: Implemented robust validation for 'timeout_create', 'timeout_update', and 'timeout_delete' variables to ensure positive Go duration strings.
  • Documentation: Updated module README files to reflect the new timeout variables and their usage.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new timeout_delete variable and introduces input validation for timeout_create, timeout_update, and timeout_delete in both the gke-node-pool and gke-cluster modules. The validation ensures that the timeout values are either null or positive duration strings with 's', 'm', or 'h' units. The resource timeout blocks and README documentation have been updated accordingly. I have no feedback to provide as the changes are well-implemented and follow Terraform best practices.

@shubpal07 shubpal07 added the release-improvements Added to release notes under the "Improvements" heading. label Sep 28, 2026
@vikramvs-gg
vikramvs-gg self-requested a review October 5, 2026 17:40
@shubpal07
shubpal07 merged commit 9789281 into GoogleCloudPlatform:develop Oct 6, 2026
33 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-improvements Added to release notes under the "Improvements" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants