-
Notifications
You must be signed in to change notification settings - Fork 54
[FR] evict tainted pods after period #18
Comments
🤔 This feature requires some some kind of time based trigger. For me it fits better into the operator pattern than the admission controller hook. |
I had started implementing this a while back as a goroutine that periodically lists and deletes pods if the given annotation is older than a given duration: https://github.com/cruise-automation/k-rail/compare/exec-taint-label#diff-a6ad059d9beaf8a3c7bdcd2b41ab23b5R18 It's largely there, I think the remaining piece was to add the annotation to pods from the no exec policy and tests. I could see the operator watch pattern working also so that the periodic polling is not needed. I haven't touched the feature since early November. I'm open to your help on it or for you to take it over if you wish. Feel free to spike on an approach that we can discuss 👍 |
Oh, I just noticed that the WIP is using Delete rather than the Eviction API: https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api We should use the eviction API because it respects PodDisruptionBudgets and some other things. |
👋 The k-rail project has been deprecated and is no longer under active development. We recommend taking a look at OPA Gatekeeper to see if it might meet your needs going forward. Thanks for your contribution(s) to the project! |
Add a policy that evicts tainted pods after some configurable period has elapsed
https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api
The text was updated successfully, but these errors were encountered: