kubernetes-sigs / descheduler

Descheduler for Kubernetes
https://sigs.k8s.io/descheduler
Apache License 2.0
4.36k stars 662 forks source link

topologySpreadConstraints: handle `nodeTaintsPolicy` and `nodeAffinityPolicy` constraints #1208

Closed nitindagar0 closed 1 year ago

nitindagar0 commented 1 year ago

In this PR Incorporated Marc's Changes for node-affinity as well as fixed failing test cases. Below is more information on existing PR

https://github.com/kubernetes-sigs/descheduler/pull/1205

linux-foundation-easycla[bot] commented 1 year ago

CLA Signed

The committers listed above are authorized under a signed CLA.

k8s-ci-robot commented 1 year ago

Welcome @nitindagar0!

It looks like this is your first PR to kubernetes-sigs/descheduler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/descheduler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot commented 1 year ago

Hi @nitindagar0. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign a7i for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-sigs/descheduler/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
nitindagar0 commented 1 year ago

Hi @a7i & @damemi, Please review this PR. The test cases have been fixed which were failing in existing PR https://github.com/kubernetes-sigs/descheduler/pull/1205.

nitindagar0 commented 1 year ago

Also we are not able to access/fork this repo using our microsoft account and Hence we are using our personal account. Please allow our "nitindagar_microsoft" account to get the access.

damemi commented 1 year ago

@nitindagar0 thanks, should we close #1205 if this replaces it? Also please see the comment from that PR about if the new plans for NodeFit spec will fit with this: https://github.com/kubernetes-sigs/descheduler/pull/1205#issuecomment-1648842029

I would also still like to see some test cases that clearly demonstrate the use case for this and shows that the new feature addresses that use case.

Regarding not being able to fork the repo, this is a public repo that anyone should be able to access. We don't grant individual accounts access and can't do that anyway as the repo's access is controlled by kubernetes-sig org policies. I tried to see your nitindagar_microsoft account and it looks like I need Microsoft SSO, so maybe you have some github policies from there preventing that account from forking publicly.

damemi commented 1 year ago

/ok-to-test

nitindagar0 commented 1 year ago

/retest

nitindagar0 commented 1 year ago

@damemi we have gone through NodeFit spec this looks like a good approach for finding out eligble nodes but right now we wanted to quickly fix the issue and once nodefit spec PR is merged we will plan to use that.

for the other PR, Lets wait for Marc to close that as he is on leave and will be back in couple of days.

we are working on test cases and will add some more tests for this new behaviour.

nitindagar0 commented 1 year ago

@damemi , I have added few more test cases to test the new behaviour. Please review

a7i commented 1 year ago

/retest-required

a7i commented 1 year ago

/label tide/merge-method-squash

a7i commented 1 year ago

/retitle topologySpreadConstraints: handle nodeTaintsPolicy and nodeAffinityPolicy constraints

a7i commented 1 year ago

/cc @knelasevero @ingvagabund

a7i commented 1 year ago

@MarcPow @nitindagar0 Would you please add an e2e test for this here? Let me know if you run into any issues with that

nitindagar0 commented 1 year ago

@MarcPow @nitindagar0 Would you please add an e2e test for this here? Let me know if you run into any issues with that

Wanted to understand more, What exact scenarios we wanted to add in e2e test cases, we already added scenario specific to nodeaffinity and node selector in tsc_test file

a7i commented 1 year ago

@MarcPow @nitindagar0 Would you please add an e2e test for this here? Let me know if you run into any issues with that

Wanted to understand more, What exact scenarios we wanted to add in e2e test cases, we already added scenario specific to nodeaffinity and node selector in tsc_test file

@nitindagar0 end-to-end tests run against a local Kubernetes cluster and test against real Kubernetes resources. It has several benefits such as:

If you can squash your commits, I can help with adding an extra commit with a simple end-to-end test.

nitindagar0 commented 1 year ago

@a7i I was able to squash last four commits only and pushed the changes

nitindagar0 commented 1 year ago

Hi @a7i, any update for E2E test case, We squashed the commits last week as you suggested

a7i commented 1 year ago

hey @nitindagar0 I do not have permission to push. Can you enable maintainers to edit?

nitindagar0 commented 1 year ago

@a7i Thankyou for adding e2e test case in the PR. Also I have checked "allow maintainers to edit" on this PR. I have also added you as collaborator in the forked repo "deschedulerUpdate"

nitindagar0 commented 1 year ago

Since you have created a separate PR. Should this PR be closed ?

a7i commented 1 year ago

You can either cherry-pick my commit or we can close this PR

nitindagar0 commented 1 year ago

Closing this PR as required changes are available in following PR 1218