draino
draino copied to clipboard
Make eviction restriction parameter more generic to be able to support CRD
Today we can ask draino
to skip eviction on pods controlled by:
- daemonset
- statefulset
But there are other type of controlled that we can thinks of and with CRD, the list cannot even be preset.
It would be great to have a parameter that allow us to specify the type of control that we want to consider as exception at eviction time: replace
evictDaemonSetPods = app.Flag("evict-daemonset-pods", "Evict pods that were created by an extant DaemonSet.").Bool()
evictStatefulSetPods = app.Flag("evict-statefulset-pods", "Evict pods that were created by an extant StatefulSet.").Bool()
by
doNotEvictPodControlledBy = app.Flag("do-not-evict-controlled-by", "Do not evict pods that are controlled by the designated kind").Default(kubernetes.KindStatefulSet,kubernetes.KindDaemonSet).Strings()