Skip to content

feat: Add Enable GKE Slice Controller#5375

Merged
SwarnaBharathiMantena merged 10 commits into
GoogleCloudPlatform:developfrom
jamOne-:slice-controller
Mar 24, 2026
Merged

feat: Add Enable GKE Slice Controller#5375
SwarnaBharathiMantena merged 10 commits into
GoogleCloudPlatform:developfrom
jamOne-:slice-controller

Conversation

@jamOne-
Copy link
Copy Markdown
Contributor

@jamOne- jamOne- commented Mar 20, 2026

Description

This PR adds support for enabling the GKE Slice Controller in the gke-cluster module, allowing users to provision Super-slicing topologies.

Changes made:

  • modules/scheduler/gke-cluster:
    • Added a new boolean variable enable_slice_controller (defaults to false for backwards compatibility).
    • Configured the slice_controller_config block within the google_container_cluster resource to conditionally enable the addon based on the variable.
  • Documentation: Updated the module's README.md via make format.

Motivation and Context

Super-slicing support in CT.

How Has This Been Tested?

  • Executed make tests locally, passing all Terraform/Packer syntax, golden copy, and Go unit validations.
  • Executed make format to ensure Terraform formatting and auto-generated terraform-docs are up to date.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@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 introduces the capability to enable the GKE Slice Controller, enhancing support for super-slicing topologies in GKE clusters. Concurrently, it improves the flexibility of GKE node pool configurations by making the linux_node_config block dynamic, ensuring that node-specific Linux settings are only applied when explicitly defined.

Highlights

  • GKE Slice Controller Enabled: The GKE Slice Controller has been enabled within the gke-cluster module, providing support for super-slicing topologies. A new input variable, enable_slice_controller, was introduced to control this feature.
  • Dynamic GKE Node Pool Configuration: The linux_node_config block in the gke-node-pool module was refactored to be dynamic. This change allows the linux_node_config and its nested hugepages_config to be conditionally applied only when relevant values are provided, preventing Terraform errors when these configurations are not needed. The default for the linux_node_config variable was also updated from an empty map to null to support this dynamic behavior.
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.

Copy link
Copy Markdown
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 introduces two main changes. First, it enables the GKE Slice Controller by adding a new enable_slice_controller variable to the gke-cluster module. Second, it improves the handling of linux_node_config in the gke-node-pool module by making the configuration block dynamic. This ensures the block is only created when necessary, improving the module's robustness.

The changes are well-implemented. I have one suggestion to improve the readability of a complex condition in the gke-node-pool module.

Comment thread modules/compute/gke-node-pool/main.tf Outdated
@jamOne- jamOne- changed the base branch from main to develop March 20, 2026 11:26
@github-actions github-actions Bot added the external PR from external contributor label Mar 20, 2026
@jamOne- jamOne- changed the title feat: Enable GKE Slice Controller and Validations feat: Add Enable GKE Slice Controller Mar 20, 2026
@jamOne- jamOne- marked this pull request as ready for review March 20, 2026 14:01
@jamOne- jamOne- requested review from a team and samskillman as code owners March 20, 2026 14:01
@aslam-quad
Copy link
Copy Markdown
Contributor

/gcbrun

Comment thread modules/scheduler/gke-cluster/main.tf
@SwarnaBharathiMantena
Copy link
Copy Markdown
Contributor

If this input variable is supported starting with a certain version of google-beta / google provider, please update the versions.tf file as well.

@shubpal07 shubpal07 self-requested a review March 23, 2026 09:12
Copy link
Copy Markdown
Contributor

@shubpal07 shubpal07 left a comment

Choose a reason for hiding this comment

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

To support GKE slice controller, we might need specific version pinnings and validations.
Requesting to specify min. version requirements (if any) to these.

  1. Min. GKE version required and channel (and corresponding validation)
  2. Min. Google beta provider version.
  3. Min Kueue version required (if any). We might need to check if that min. version is supported by tookit.
  4. Mutual Exclusion with DWS (If yes, we may need validation here as well)

@SwarnaBharathiMantena SwarnaBharathiMantena added the release-module-improvements Added to release notes under the "Module Improvements" heading. label Mar 23, 2026
@jamOne- jamOne- marked this pull request as draft March 23, 2026 11:07
@jamOne- jamOne- marked this pull request as ready for review March 23, 2026 12:59
@jamOne-
Copy link
Copy Markdown
Contributor Author

jamOne- commented Mar 23, 2026

@SwarnaBharathiMantena @shubpal07 bumped the TF versions and added the GKE version check.

DWS and Kueue are actually unrelated with this GKE cluster setting.

@SwarnaBharathiMantena
Copy link
Copy Markdown
Contributor

/gcbrun

@shubpal07
Copy link
Copy Markdown
Contributor

/gcbrun

@shubpal07
Copy link
Copy Markdown
Contributor

Ran tests using babysit

Copy link
Copy Markdown
Contributor

@SwarnaBharathiMantena SwarnaBharathiMantena left a comment

Choose a reason for hiding this comment

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

LGTM

@SwarnaBharathiMantena SwarnaBharathiMantena enabled auto-merge (squash) March 24, 2026 08:24
Copy link
Copy Markdown
Contributor

@shubpal07 shubpal07 left a comment

Choose a reason for hiding this comment

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

LGTM!

@SwarnaBharathiMantena
Copy link
Copy Markdown
Contributor

/gcbrun

@SwarnaBharathiMantena SwarnaBharathiMantena merged commit a12aa37 into GoogleCloudPlatform:develop Mar 24, 2026
19 of 75 checks passed
jamOne- added a commit to jamOne-/cluster-toolkit that referenced this pull request Mar 25, 2026
jamOne- added a commit to jamOne-/cluster-toolkit that referenced this pull request Mar 25, 2026
jamOne- added a commit to jamOne-/cluster-toolkit that referenced this pull request Mar 25, 2026
jamOne- added a commit to jamOne-/cluster-toolkit that referenced this pull request Mar 26, 2026
jamOne- added a commit to jamOne-/cluster-toolkit that referenced this pull request Mar 26, 2026
FIoannides pushed a commit to FIoannides/cluster-toolkit that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from external contributor 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.

4 participants