Kubelet: Allow setting thresholds for container image garbage collection

Summary

We want to be able explicitly setting both values HighThresholdPercent and LowThresholdPercent in Kubelet configuration file, see 1.

Use Cases

Allow freeing disk space on the nodes without manual interaction.

Proposal

Make both values mentioned above available in the nix configuration settings in order to allow overriding those. Also set proper default values, like:

imageGCHighThresholdPercent: 75
imageGCLowThresholdPercent: 70

Those make sense since Kubernetes starts evicting pods when only 15 percent of the image filesystem are available, see 2. That way we have a puffer of 10 percent disk space.

Specification

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this section are to be interpreted as described in RFC 2119.

Edited by Tony Fiedler
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information