• Kubernetes Submit Queue's avatar
    Merge pull request #41149 from sjenning/qos-memory-limits · 9cc54809
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 41919, 41149, 42350, 42351, 42285)
    
    kubelet: enable qos-level memory limits
    
    ```release-note
    Experimental support to reserve a pod's memory request from being utilized by pods in lower QoS tiers.
    ```
    
    Enables the QoS-level memory cgroup limits described in https://github.com/kubernetes/community/pull/314
    
    **Note: QoS level cgroups have to be enabled for any of this to take effect.**
    
    Adds a new `--experimental-qos-reserved` flag that can be used to set the percentage of a resource to be reserved at the QoS level for pod resource requests.
    
    For example, `--experimental-qos-reserved="memory=50%`, means that if a Guaranteed pod sets a memory request of 2Gi, the Burstable and BestEffort QoS memory cgroups will have their `memory.limit_in_bytes` set to `NodeAllocatable - (2Gi*50%)` to reserve 50% of the guaranteed pod's request from being used by the lower QoS tiers.
    
    If a Burstable pod sets a request, its reserve will be deducted from the BestEffort memory limit.
    
    The result is that:
    - Guaranteed limit matches root cgroup at is not set by this code
    - Burstable limit is `NodeAllocatable - Guaranteed reserve`
    - BestEffort limit is `NodeAllocatable - Guaranteed reserve - Burstable reserve`
    
    The only resource currently supported is `memory`; however, the code is generic enough that other resources can be added in the future.
    
    @derekwaynecarr @vishh
    9cc54809
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
docs Loading commit data...
examples Loading commit data...
federation Loading commit data...
hack Loading commit data...
hooks Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
staging Loading commit data...
test Loading commit data...
third_party Loading commit data...
translations Loading commit data...
vendor Loading commit data...
.bazelrc Loading commit data...
.gazelcfg.json Loading commit data...
.generated_files Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
BUILD.bazel Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
OWNERS Loading commit data...
OWNERS_ALIASES Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
WORKSPACE Loading commit data...
code-of-conduct.md Loading commit data...
labels.yaml Loading commit data...