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(cgroup): add support for configuring Linux cgroup mode in autopilot clusters #2282

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ameausoone
Copy link

@Ameausoone Ameausoone commented Feb 13, 2025

This update introduces a new linux_cgroup_mode variable to specify the cgroup hierarchy mode for autopilot Kubernetes nodes. Supported values include CGROUP_MODE_UNSPECIFIED, CGROUP_MODE_V1, and CGROUP_MODE_V2. Adjusted cluster configurations to include dynamic management of the Linux node configuration based on this variable.

  • make build

Closes #2264

@Ameausoone Ameausoone requested review from apeabody, ericyz and a team as code owners February 13, 2025 16:26
…lot clusters

This update introduces a new `linux_cgroup_mode` variable to specify the cgroup hierarchy mode for autopilot Kubernetes nodes. Supported values include `CGROUP_MODE_UNSPECIFIED`, `CGROUP_MODE_V1`, and `CGROUP_MODE_V2`. Adjusted cluster configurations to include dynamic management of the Linux node configuration based on this variable.
Updated the condition block in `node_pools_cgroup_mode` validation across multiple variables files to use a more readable multi-line format.
Updated variable validation logic to use the `coalesce` function instead of conditional operators for `node_pools_cgroup_mode`, improving readability and consistency across modules.
type = string
description = "Specifies the Linux cgroup mode for autopilot Kubernetes nodes in the cluster. Accepted values are `CGROUP_MODE_UNSPECIFIED`, `CGROUP_MODE_V1`, and `CGROUP_MODE_V2`, which determine the control group hierarchy used for resource management."
validation {
condition = var.node_pools_cgroup_mode == null || contains([
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately Terraform doesn't short circuit evaluation, so you will need a try() around contains() for null handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No option to set cgroup under beta-autopilot-private-cluster
2 participants