rancher / rancher

Complete container management platform
http://rancher.com
Apache License 2.0
23.32k stars 2.96k forks source link

[RFE] Add option to set ephemeral-storage quota in Project/Namespace #29979

Open ansilh opened 3 years ago

ansilh commented 3 years ago

What kind of request is this (question/bug/enhancement/feature request): Enhancement

Description

High ephemeral storage usage causes node unavailability, Pod evictions. It would be good to have an option to set an ephemeral storage limit at the namespace/project level to control the space usage to avoid these situations.

As per below comment, the ephemeral-storage limits were not enabled as it was alpha https://github.com/rancher/rancher/issues/13277#issuecomment-421183444

Based on the upstream k8s code comment, the name of the resource is alpha. https://github.com/kubernetes/kubernetes/blob/release-1.19/pkg/apis/core/types.go#L4182

    // The resource name for ResourceEphemeralStorage is alpha and it can change across releases.
    ResourceEphemeralStorage ResourceName = "ephemeral-storage"

As per below PR , the feature itself is moved to beta https://github.com/kubernetes/kubernetes/pull/60159

gz#13239

ansilh commented 3 years ago

As per https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1029-ephemeral-storage-quotas

The current mechanism relies on periodically walking each ephemeral volume (emptydir, logdir, or container writable layer) and summing the space consumption. 
This method is slow, can be fooled, and has high latency (i. e. a pod could consume a lot of storage prior to the kubelet being aware of its overage and terminating it).

https://github.com/kubernetes/enhancements/issues/1029

vincebrannon commented 11 months ago

SURE-5144