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

Add support for inter-pod affinity strategy #47

Closed
concaf opened this issue Nov 28, 2017 · 7 comments
Closed

Add support for inter-pod affinity strategy #47

concaf opened this issue Nov 28, 2017 · 7 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@concaf
Copy link
Contributor

concaf commented Nov 28, 2017

For pods with podAffinity set using preferredDuringSchedulingIgnoredDuringExecution, it might be possible that at the time of scheduling on the current node, no pod with the set labels were running, but still the pod got scheduled on the current node since the nature of the affinity was preferred and not required.

In such a case, if the descheduler is run, it can do the following -

  1. finds pods running with podAffinity set using preferredDuringSchedulingIgnoredDuringExecution
  2. checks if the pods found in 1 are scheduled on the desired node or not
  3. if not, descheduler checks on other schedulable nodes if the desired pods are running where this podAffinity condition can be met
  4. if such a node is found, descheduler evicts the pod (and hopefully the scheduler schedules it on the desired node 🎉)

Maybe we could have a policy file describing the strategy like -

apiVersion: "descheduler/v1alpha1"
kind: "DeschedulerPolicy"
strategies:
  "RemovePodsViolatingPodAffinity":
     enabled: true

Does it make sense to support such a strategy?

@aveshagarwal
Copy link
Contributor

@containscafeine as I explained here: #46 (comment), first I'd suggest to address requiredDuringSchedulingIgnoredDuringExecution.

@ravisantoshgudimetla
Copy link
Contributor

@aveshagarwal - Can you assign appropriate milestone for this? We have pod anti-affinity strategy, do you want to include this in 0.4 release?

@komljen
Copy link

komljen commented May 21, 2018

I would like to have the ability to set podAffinityType for RemovePodsViolatingInterPodAntiAffinity strategy, similar to nodeAffinityType where we can set required or preffered affinity types. Does this issue covers that scenario?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 23, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 23, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

damemi pushed a commit to damemi/descheduler that referenced this issue Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants