Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip cordon on nodes that are running some type of pods #94

Open
dbenque opened this issue Sep 17, 2020 · 1 comment
Open

Skip cordon on nodes that are running some type of pods #94

dbenque opened this issue Sep 17, 2020 · 1 comment

Comments

@dbenque
Copy link
Contributor

dbenque commented Sep 17, 2020

Today we can skip the drain activity on some kind of pods:

--evict-daemonset-pods     Evict pods that were created by an extant DaemonSet.
--evict-emptydir-pods      Evict pods with local storage, i.e. with emptyDir volumes.
--evict-unreplicated-pods  Evict pods that were not created by a replication controller.
--evict-statefulset-pods Evict pods that were created by an extant StatefulSet.
--protected-pod-annotation=KEY[=VALUE] ...

The problem is that even if we block the drain, the associated node is cordon. On a long run that could lead to have a lot of cordon nodes, leading to some operational issues.

Would you agree to add some options to exclude from cordon nodes based on the type of pods that they are running? Example:

--no-cordon-node-with-statefulset-pod
--no-cordon-node-with-unreplicated-pod
--no-cordon-node-with-protected-pod
--no-cordon-node-if-pod-cannot-be-drain  // this one is kind of a superset of all the other (but daemonset of course)

WDYT?

On the implementation side that would lead to run a pod informer, that would result in more resource consumption. More options, more power, but also more resources required :)

@dbenque
Copy link
Contributor Author

dbenque commented Oct 12, 2020

I have some code ready for this, but it was built on top of a work that already integrate #99 and #90 , so waiting for these 2 PRs to progress before pushing a PR with the code:
https://github.com/DataDog/draino/commit/256dbecf37e1afd2e53c65090aeb0ae8be163001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant