Skip to content

Commit

Permalink
Merge pull request #9475 from hakman/disk-based-evictions
Browse files Browse the repository at this point in the history
Re-enable disk based evictions for Kubernetes 1.19
  • Loading branch information
k8s-ci-robot authored Jul 10, 2020
2 parents 04ec3dd + 06df2cc commit 13491ab
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions pkg/model/components/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,13 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
evictionHard := []string{
// TODO: Some people recommend 250Mi, but this would hurt small machines
"memory.available<100Mi",
}
// 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.IsKubernetesLT("1.19") {

// Disk based eviction (evict old images)
// We don't need to specify both, but it seems harmless / safer
evictionHard = append(evictionHard, "nodefs.available<10%")
evictionHard = append(evictionHard, "nodefs.inodesFree<5%")
evictionHard = append(evictionHard, "imagefs.available<10%")
evictionHard = append(evictionHard, "imagefs.inodesFree<5%")
"nodefs.available<10%",
"nodefs.inodesFree<5%",
"imagefs.available<10%",
"imagefs.inodesFree<5%",
}
clusterSpec.Kubelet.EvictionHard = fi.String(strings.Join(evictionHard, ","))
}
Expand Down

0 comments on commit 13491ab

Please sign in to comment.