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

Add GKE cgroupMode Support #1463

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

gbrayut
Copy link
Member

@gbrayut gbrayut commented Mar 29, 2024

Add GKE cgroupMode Support

GKE 1.26 and later use cgroupv2 by default but has options for specifying CGROUP_MODE_V1, CGROUP_MODE_V2, or CGROUP_MODE_UNSPECIFIED via linux Config section. KCC currently supports sysctls settings in linuxNodeConfig, but not cgroupMode.

This PR backports the terraform provider implementation of cgroupMode from hashicorp/terraform-provider-google-beta#6435

Internal ticket: b/328125862

Tests Completed

  • Run make ready-pr to ensure this PR is ready for review.
  • Updated basic containercluster create.yaml resourcefixture and ran:
    go test -v -tags=integration ./pkg/controller/dynamic/ -test.run TestCreateNoChangeUpdateDelete -run-tests basic-containercluster -timeout 1800s | tee /tmp/out
  • More extensive create and update testing (v1,v2,unspecified,sysctls,etc)
  • python3 scripts/generate-field-diffs-tf-upgrade/generate_field_changes.py results:
* Resource ContainerCluster(v1beta1):
  * Added `spec.nodeConfig.linuxNodeConfig.cgroupMode` field.
  * Removed `spec.nodeConfig.linuxNodeConfig.required` field.
* Resource ContainerNodePool(v1beta1):
  * Added `spec.nodeConfig.linuxNodeConfig.cgroupMode` field.
  * Removed `spec.nodeConfig.linuxNodeConfig.required` field.

…erated files

* Resource ContainerCluster(v1beta1):
  * Added `spec.nodeConfig.linuxNodeConfig.cgroupMode` field.
  * Removed `spec.nodeConfig.linuxNodeConfig.required` field.
* Resource ContainerNodePool(v1beta1):
  * Added `spec.nodeConfig.linuxNodeConfig.cgroupMode` field.
  * Removed `spec.nodeConfig.linuxNodeConfig.required` field.
@maqiuyujoyce maqiuyujoyce self-assigned this Apr 2, 2024
@maqiuyujoyce maqiuyujoyce modified the milestones: 1.115, 1.116 Apr 2, 2024
@maqiuyujoyce
Copy link
Collaborator

/lgtm
/approve

@gbrayut thank you for supporting the new fields with thorough testing and description!

@google-oss-prow google-oss-prow bot added the lgtm label Apr 2, 2024
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maqiuyujoyce

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 422cb56 into GoogleCloudPlatform:master Apr 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants