Skip to content

Conversation

@SwarnaBharathiMantena
Copy link
Contributor

Shared reservations can now be used with the gke-node-pool module.

Manual Testing:
A cluster with A3 megagpu nodepool was successfully created using a shared reservation. The test reservation was in project-a and it was used from project-b.

      reservation_affinity:
        consume_reservation_type: SPECIFIC_RESERVATION
        specific_reservations:
        - name: $(vars.reservation)
          project: project-a   # reservation owner project

Follow-up:
Integration test will be added in a follow-up PR.

Note:
The reason why the precondition is removed is stated below:

  1. The first logic - is covered in an earlier precondition.
  2. The second logic - there is not enough significance to that logic. What this logic checks is whether a specific reservation was passed without specifying block information. A reservation name can be passed with or without a blockname and is not linked to shared reservations.
  3. The third logic - the last condition in this logic states that the project of the reservation cannot be different from the project in which the reservation exists. This should not be the case as that is the whole point of a shared reservation - being able to used a reservation by accessing the reservation from another project.

@SwarnaBharathiMantena SwarnaBharathiMantena added the release-key-new-features Added to release notes under the "Key New Features" heading. label Dec 29, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @SwarnaBharathiMantena, 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 introducing support for shared reservations. This allows users to provision GKE node pools that utilize compute reservations owned by other projects, significantly increasing flexibility in resource management. The change involves removing a restrictive precondition and updating documentation to guide users on proper configuration.

Highlights

  • Shared Reservation Support: The gke-node-pool module now supports the use of shared reservations, allowing GKE node pools to consume reservations from different projects.
  • Precondition Removal: A precondition in main.tf that incorrectly restricted shared extended reservations has been removed. This change directly enables the new functionality.
  • Documentation Update: The README.md has been updated to clarify that shared reservations used with the module must be of type 'specific reservation'.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

Copy link
Contributor

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

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 enables support for shared reservations in the gke-node-pool module, which is a valuable addition. The change is implemented by removing a precondition that incorrectly blocked the use of reservations from different projects. The justification for this removal is clear and correct. The documentation in the README has also been updated to reflect this new capability.

I have one suggestion in modules/compute/gke-node-pool/README.md to improve the clarity of the documentation, in line with the repository style guide's emphasis on clear documentation.

I've noted your plan to add integration tests in a follow-up PR, which is acceptable. Overall, this is a great enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-key-new-features Added to release notes under the "Key New Features" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants