Skip to content

Commit

Permalink
Merge pull request #9296 from hakman/disable-disk-evictions
Browse files Browse the repository at this point in the history
Disable disk based evictions for Kubernetes 1.19
  • Loading branch information
k8s-ci-robot authored Jun 8, 2020
2 parents 671252e + 87ad779 commit 0cfcd5f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pkg/model/components/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ","))
}
Expand Down

0 comments on commit 0cfcd5f

Please sign in to comment.