Skip to content

Add precondition and information on is_reservation_active input variable#5543

Merged
SwarnaBharathiMantena merged 8 commits into
GoogleCloudPlatform:developfrom
SwarnaBharathiMantena:swarnabm/add_info_is_active_res
Apr 24, 2026
Merged

Add precondition and information on is_reservation_active input variable#5543
SwarnaBharathiMantena merged 8 commits into
GoogleCloudPlatform:developfrom
SwarnaBharathiMantena:swarnabm/add_info_is_active_res

Conversation

@SwarnaBharathiMantena

@SwarnaBharathiMantena SwarnaBharathiMantena commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Reservation Handling Documentation: Introduced comprehensive documentation for the is_reservation_active input variable in the README.md, detailing its usage for targeting future or unfulfilled reservations in GKE node pools.

Configuration Precondition: Implemented a Terraform precondition in main.tf to enforce that static_node_count, autoscaling_min_node_count, autoscaling_max_node_count, and initial_node_count are not set when is_reservation_active is false.

@SwarnaBharathiMantena SwarnaBharathiMantena added the release-module-improvements Added to release notes under the "Module Improvements" heading. label Apr 22, 2026
@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 node pool module by improving the handling of Google Cloud reservations. It provides clear guidance and enforces validation for the is_reservation_active variable, allowing users to provision node pools against future or pending reservations without immediately specifying node counts. This prevents deployment errors and streamlines the workflow for managing reserved capacity.

Highlights

  • Reservation Handling Documentation: Introduced comprehensive documentation for the is_reservation_active input variable in the README.md, detailing its usage for targeting future or unfulfilled reservations in GKE node pools.
  • Configuration Precondition: Implemented a new Terraform precondition in main.tf to prevent misconfigurations by ensuring that node count variables (static_node_count, autoscaling_min_node_count, autoscaling_max_node_count) are not set when is_reservation_active is false.
  • Documentation Formatting and Typos: Corrected a typo in the Apache license URL across both README.md and main.tf, and applied minor formatting improvements to tables in README.md.
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 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 counter productive. 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 introduces the is_reservation_active variable to support GKE node pools with future reservations, adding a validation precondition and corresponding documentation. Feedback suggests using a level 2 header in the README for consistency and including initial_node_count in the validation logic and documentation. The changes also include minor formatting updates and accidental typos in the license URLs.

Comment thread modules/compute/gke-node-pool/README.md Outdated
Comment thread modules/compute/gke-node-pool/README.md Outdated
Comment thread modules/compute/gke-node-pool/main.tf Outdated
@SwarnaBharathiMantena

Copy link
Copy Markdown
Contributor Author

/gemini summary

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

This pull request improves the GKE node pool module by providing better support and validation for using Google Cloud reservations. It introduces a mechanism to target future or pending reservations by setting the is_reservation_active flag to false, while simultaneously adding strict configuration checks to prevent invalid node count settings in this state. The changes also include updated documentation to guide users through this workflow.

Highlights

  • Reservation Handling Documentation: Added detailed documentation in README.md explaining how to use the is_reservation_active variable to target future or unfulfilled GKE reservations.
  • Configuration Precondition: Implemented a Terraform precondition in main.tf to enforce that static_node_count, autoscaling_min_node_count, autoscaling_max_node_count, and initial_node_count are not set when is_reservation_active is false.
  • Documentation and Maintenance: Corrected a typo in the Apache license URL and updated the README.md to include initial_node_count in the reservation validation requirements.
Activity
  • Gemini Code Assist provided an initial summary and code review feedback.
  • Reviewer suggested using a level 2 header for the new documentation section.
  • Reviewer recommended including initial_node_count in the validation logic and documentation.
  • Author requested a summary update.

Comment thread modules/compute/gke-node-pool/main.tf Outdated
Comment thread modules/compute/gke-node-pool/README.md Outdated
Comment thread modules/compute/gke-node-pool/README.md Outdated
Comment thread modules/compute/gke-node-pool/README.md
Comment thread modules/compute/gke-node-pool/README.md Outdated
@SwarnaBharathiMantena SwarnaBharathiMantena marked this pull request as ready for review April 24, 2026 05:03
@SwarnaBharathiMantena SwarnaBharathiMantena requested a review from a team as a code owner April 24, 2026 05:03
@SwarnaBharathiMantena SwarnaBharathiMantena merged commit 40084de into GoogleCloudPlatform:develop Apr 24, 2026
20 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants