Merge pull request #9296 from hakman/disable-disk-evictions

Disable disk based evictions for Kubernetes 1.19
This commit is contained in:
Kubernetes Prow Robot 2020-06-08 03:53:46 -07:00 committed by GitHub
commit 0cfcd5feb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

View File

@ -101,13 +101,17 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
evictionHard := []string{
// TODO: Some people recommend 250Mi, but this would hurt small machines
"memory.available<100Mi",
// Disk eviction (evict old images)
}
// Disk based evictions are not detecting the correct disk capacity in Kubernetes 1.19 and are
// blocking scheduling by tainting worker nodes with "node.kubernetes.io/disk-pressure:NoSchedule"
// TODO: Re-enable once the Kubelet issue is fixed
if b.Context.IsKubernetesLT("1.19") {
// Disk based eviction (evict old images)
// We don't need to specify both, but it seems harmless / safer
"nodefs.available<10%",
"nodefs.inodesFree<5%",
"imagefs.available<10%",
"imagefs.inodesFree<5%",
evictionHard = append(evictionHard, "nodefs.available<10%")
evictionHard = append(evictionHard, "nodefs.inodesFree<5%")
evictionHard = append(evictionHard, "imagefs.available<10%")
evictionHard = append(evictionHard, "imagefs.inodesFree<5%")
}
clusterSpec.Kubelet.EvictionHard = fi.String(strings.Join(evictionHard, ","))
}