Skip to content

Stop eviction of Pods with Local Storage PVC #633

@zuzzas

Description

@zuzzas

Is your feature request related to a problem? Please describe.

Here's the part where the descheduler decides whether Pod has a Local Storage. It does not take into account PVCs that are provisioned via a variation of local storage provisioned. Such as the default kubernetes.io/no-provisioner.

// IsPodWithLocalStorage returns true if the pod has local storage.
func IsPodWithLocalStorage(pod *v1.Pod) bool {
for _, volume := range pod.Spec.Volumes {
if volume.HostPath != nil || volume.EmptyDir != nil {
return true
}
}
return false
}

Describe the solution you'd like

I'd like to have a way to specify a list of provisioners for which Pods that are bound to a PVC with such provisioner should not be evicted.

Describe alternatives you've considered

There is the IgnorePVCPods option, but it applies to all Pods with any PVCs, and I'd like to discriminate between them.

What version of descheduler are you using?

descheduler version: v0.21.0

Metadata

Metadata

Labels

kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions