Fix ContainerNodePool defaulting cpu_cfs_quota to false in TGC/KCC - #18824
Open
cdmello-g wants to merge 1 commit into
Open
Fix ContainerNodePool defaulting cpu_cfs_quota to false in TGC/KCC#18824cdmello-g wants to merge 1 commit into
cdmello-g wants to merge 1 commit into
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @ScottSuarez, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
When kubeletConfig is defined on a GKE node pool in Config Connector (KCC) or terraform_google_conversion (TGC) without explicitly setting cpuCfsQuota, the boolean field defaulted to false, causing KCC to force-send cpuCfsQuota: false to the GKE Cluster Manager API. PR GoogleCloudPlatform#15268 fixed this for the standalone Terraform provider using raw config inspection, but this logic was omitted from TGC (tgc_next), leaving KCC vulnerable to the bug. This change ports the cpu_cfs_quota raw configuration check to tgc_next expandNodeConfig so that explicit false values are preserved via ForceSendFields while unset/null evaluates to true. Fixes hashicorp/terraform-provider-google#15767 Ref b/553981933, b/300067081, b/395145072
cdmello-g
force-pushed
the
fix-kcc-cpu-cfs-quota
branch
from
August 28, 2026 16:16
4a50a5f to
ce848d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When
kubeletConfigis defined on a GKE node pool in Config Connector (KCC) orterraform_google_conversion(TGC) without explicitly settingcpuCfsQuota, the field was evaluated tofalsebecause Terraform Plugin SDK maps populate the Go zero-value (false) for omitted boolean fields. This caused TGC/KCC to force-sendcpuCfsQuota: falseto the GKE Cluster Manager API.PR #15268 fixed this for the standalone Terraform CLI provider by inspecting
d.GetRawConfig(), but this logic was omitted fromtgc_next, leaving KCC vulnerable to the bug.Changes
Ports the
cpu_cfs_quotaraw configuration check fromnode_config.go.tmplintotgc_next/pkg/services/container/node_config.go(expandNodeConfig) so that:nc.KubeletConfig.CpuCfsQuotais explicitly set totrue(matching native GKE behavior).false,CpuCfsQuotais appended toForceSendFields.Fixes hashicorp/terraform-provider-google#15767
Ref b/553981933, b/300067081, b/395145072