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: Add support for CPU quota configs for node pools #1032

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

stanley98yu
Copy link
Contributor

Add support for setting CPU limits on pods and reallocation intervals as cpu_cfs_quota and cpu_cfs_quota_period under kubelet_config for node pools.

Issue reference: #962.

@stanley98yu stanley98yu self-assigned this Oct 20, 2021
@comment-bot-dev
Copy link

comment-bot-dev commented Oct 20, 2021

Thanks for the PR! 🚀
✅ Lint checks have passed.

@stanley98yu stanley98yu marked this pull request as ready for review October 20, 2021 15:41
@stanley98yu stanley98yu requested review from Jberlinsky and a team as code owners October 20, 2021 15:41
Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! Do you mind adding this to one of the examples/tests?

@stanley98yu
Copy link
Contributor Author

@morgante Thank you for reviewing! I added in a test as requested, but I have a question. There's a note on the Terraform Google provider docs that says:

Note: At the time of writing (2020/08/18) the GKE API rejects the none value and accepts an invalid default value instead. While this remains true, not specifying the kubelet_config block should be the equivalent of specifying none.

My understanding is if the user wants cpu_manager_policy to be "none" then they would not specify any kubelet_config field at all (so the kubelet_config block won't be generated), and to default to "static" if kubelet_config is generated to avoid the issue above. Is this correct or at least the best way to handle this?

@stanley98yu
Copy link
Contributor Author

It's also not clear to me why the build is failing. Seems like #1035 was facing the same issue but approved anyway?

@morgante
Copy link
Contributor

My understanding is if the user wants cpu_manager_policy to be "none" then they would not specify any kubelet_config field at all (so the kubelet_config block won't be generated), and to default to "static" if kubelet_config is generated to avoid the issue above. Is this correct or at least the best way to handle this?

Yes, I think your understanding is correct and the implementation you have (conditionally generating the block) is the right workaround.

It's also not clear to me why the build is failing. Seems like #1035 was facing the same issue but approved anyway?

It's an unrelated issue, we can ignore that test failure.

@morgante morgante merged commit 80252f3 into master Oct 27, 2021
@stanley98yu stanley98yu deleted the feature/kubelet-config branch October 29, 2021 13:41
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this pull request Jul 15, 2024
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.

None yet

3 participants