-
Notifications
You must be signed in to change notification settings - Fork 521
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
Additional kubelet configuration settings #2930
Conversation
6803ac4
to
209c2bc
Compare
209c2bc
to
6fe6ece
Compare
Should #2742 be part of this as well? |
My initial reaction was yes, but after reading through that some more, I think it might be safer to keep that one separate. It has some special casing since it's only applicable to 1.25 and later. I think if this one merges first, that one could just get added to the same migration if it ends up being in the same release cycle. But I think it would be better to keep that separate in its own PR. |
I am very happy with this PR as I just needed a shutdown-grace-period ! |
de09c8a
to
245536d
Compare
Rebased to resolve merge conflicts. |
245536d
to
c9e6018
Compare
Added memory manager policy and settings. |
1b8e061
to
9507287
Compare
Rebased to address conflict in |
9507287
to
059ad49
Compare
1107e7d
to
94f9eec
Compare
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.
LGTM!
This adds a setting to be able to set the KubeletConfig value `cpuCFSQuota` to `false`. Signed-off-by: Sean McGinnis <stmcg@amazon.com>
This adds the settings: - `settings.kubernetes.shutdown-grace-period` - `settings.kubernetes.shutdown-grace-period-for-critical-pods` These control how long kubelet will wait on shutdown for pods to exit, and what portion of that period to dedicate to waiting for critical pods to exit. Signed-off-by: Sean McGinnis <stmcg@amazon.com>
This adds the settings: - `settings.kubernetes.eviction-soft` - `settings.kubernetes.eviction-soft-grace-period` - `settings.kubernetes.eviction-max-pod-grace-period` To configure the Kubelet soft eviction settings. This is similar to the existing ``settings.kubernetes.eviction-hard` with additional configuration needed to control the behavior of the soft eviction thresholds. Signed-off-by: Sean McGinnis <stmcg@amazon.com>
sources/api/migration/migrations/v1.14.0/kubelet-config-settings/src/main.rs
Outdated
Show resolved
Hide resolved
This adds a `NonNegativeInteger` type to our model to be able to model setting values that need to be between 0 and i32::MAX. Signed-off-by: Sean McGinnis <stmcg@amazon.com>
This enables the kubelet memory manager and allows setting its values and the memory manager policy. Signed-off-by: Sean McGinnis <stmcg@amazon.com>
Signed-off-by: Sean McGinnis <stmcg@amazon.com>
Hi @stmcginnis, First of all, thanks for this PR. Just out of curiosity, wanted to know if this is going to be part of the 1.14.0 release. |
Hi @sanjeevpandey19! Yes, hoping to have this part of the 1.14.0 release. Everything is subject to change based on what is found and testing and other issues of course, but hoping to have this in a 1.14.0 release in the very near future. ;) |
Issue number:
Closes: #2877
Closes: #1792
Closes: #1445
Closes: #2977
Description of changes:
This adds new settings that can be used for soft eviction, graceful shutdown, CPU quota enforcement, and memory manager policy.
The new settings are:
Soft eviction
settings.kubernetes.eviction-soft
settings.kubernetes.eviction-soft-grace-period
settings.kubernetes.eviction-max-pod-grace-period
eviction-soft
is the same as the existingeviction-hard
but allows a grace period before pods are evicted. Theeviction-soft-grace-period
allows setting this grace period for each of the support eviction keys.eviction-max-grace-period
is used to set an overall maximum for the eviction grace period.Graceful shutdown
settings.kubernetes.shutdown-grace-period
settings.kubernetes.shutdown-grace-period-for-critical-pods
These allow setting a grace period to wait on node shut down to allow pods to exit. Of that grace period, a portion can be dedicated to making sure critical pods are shut down.
CPU quota enforcement
settings.kubernetes.cpu-cfs-quota-enforced
This sets a flag telling kubelet whether or not to enforce quota for containers that specify CPU limits. The default behavior is to enforce these quotas.
For additional reference on the kubelet setting values, see the node eviction documentation and the
KubeletConfiguration
docs.Memory manager
settings.kubernetes.memory-manager-policy
settings.kubernetes.memory-manager-reserved-memory
Allows configuring kubelet settings for the memory manager.
Testing done:
Built and deployed a cluster. Configured these settings with:
Verified values were accepted. The performed:
Verified the config file had the expected configuration keys and values. Then ran:
And made sure there were no errors or issues with service operation.
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.