-
Notifications
You must be signed in to change notification settings - Fork 38
fix: remove cpu limit from resources in values.yaml and update schema accordingly #143
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: macneib The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @macneib. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of completely removing CPU limit from helm chart I think it would be better if it was made optional. Other users of the ACK controllers may still want to set this value.
Hey @knottnt Thanks for the feedback! Just to clarify, this change removes the default CPU limit from We aim to avoid artificial CPU throttling in our environment, especially with Karpenter in use, and we enforce this pattern with a Kyverno policy. However, this change won't prevent other users from setting CPU limits if they want to. That said, if we want to make it more explicit that CPU limits are optional, I’d be happy to add a note in Would this work for you?
This way, it’s clear to all users that:
|
I have some reservations about changing the default install behavior from having a limit to having no limit at all. For users upgrading ACK controllers using the default CPU limit this would require them to add an explicit set just to keep the previous behavior. For your use case would removing CPU limit from the set of required properties work? You could then explicitly set |
@macneib: Also any changes to the helm chart should be done in the code-generator repo's Helm templates. We use those files to keep our Helm charts consistent across all ACK controllers. |
This fails on https://github.com/aws-controllers-k8s/code-generator/blob/main/templates/helm/values.schema.json
|
Description of changes:
Why remove
cpu
limits:Setting CPU limits in Kubernetes can lead to unnecessary throttling due to how the Linux kernel enforces cgroup quotas. When a container hits its CPU limit, it is throttled even if the node has available CPU capacity. This can degrade application performance, especially for bursty or latency-sensitive workloads.
In our environment, we use Karpenter for dynamic provisioning. Karpenter works best when it can observe actual resource usage. Setting cpu requests without limits allows the scheduler and Karpenter to make better decisions about bin-packing and scaling, while avoiding performance degradation from artificial throttling.
We also enforce this practice with a Kyverno policy that disallows setting CPU limits, helping ensure consistent resource behavior cluster-wide.
Reference: Kubernetes docs on CPU limits
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.