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

Move maximum-pods-per-nodes-evicted logic under a single invocation #266

Merged
merged 2 commits into from
Apr 23, 2020

Conversation

ingvagabund
Copy link
Contributor

Each strategy implements a test for checking if a maximum number of pods per node was already evicted. The test duplicates a code that can be put under a single invocation. Thus, reducing the number of arguments passed to each strategy given EvictPod call can encapsulate both the check and the invocation of the pod eviction itself.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 20, 2020
@ingvagabund
Copy link
Contributor Author

@damemi @seanmalloy PTAL

@ingvagabund
Copy link
Contributor Author

ingvagabund commented Apr 20, 2020

Integrating part of #161 as well.

@ingvagabund
Copy link
Contributor Author

Also, if this PR gets merged first, #254 will need to be rebased.

pkg/descheduler/evictions/evictions.go Outdated Show resolved Hide resolved
pkg/descheduler/evictions/evictions.go Outdated Show resolved Hide resolved
pkg/descheduler/evictions/evictions.go Outdated Show resolved Hide resolved
pkg/descheduler/strategies/node_taint.go Show resolved Hide resolved
Each strategy implements a test for checking if a maximum number of pods per node
was already evicted. The test duplicates a code that can be put
under a single invocation. Thus, reducing the number of arguments passed
to each strategy given EvicPod call can encapsulate both the check
and the invocation of the pod eviction itself.
@seanmalloy
Copy link
Member

/lgtm
/assign @damemi

I think this looks good. I think it would be a good idea if @damemi reviews these changes too.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 22, 2020
Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@seanmalloy
Copy link
Member

/assign @ravisantoshgudimetla @aveshagarwal

@aveshagarwal
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aveshagarwal, ingvagabund

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2020
@k8s-ci-robot k8s-ci-robot merged commit 3a8dfc0 into kubernetes-sigs:master Apr 23, 2020
@ingvagabund ingvagabund deleted the pod-evictor branch April 23, 2020 23:20
@seanmalloy seanmalloy mentioned this pull request May 20, 2020
4 tasks
briend pushed a commit to briend/descheduler that referenced this pull request Feb 11, 2022
Move maximum-pods-per-nodes-evicted logic under a single invocation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants