-
Notifications
You must be signed in to change notification settings - Fork 640
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
Introduce RemoveFailedPods strategy #610
Conversation
Hi @a7i. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks pretty thorough, a couple notes but fundamentally solid imo
/assign @seanmalloy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to squash, then I can approve
One nit though, which I'd like your input on, is maybe the new StrategyParam validator should be in its own package? It's minor but it would be nice to keep the strategies
package to strategy code.
I was also not really sure about the way it wraps the "common" params inside another struct for the new strategy, but I suppose that's the best way to accomplish that (with the common params embedded). Hopefully we can start moving other strategies to use this function too and clean up their duped code
Ok, I can do that. something like As far as wrapping the common params, I don't have a clever idea. If it was just a validator, could use interface. But it's also a parser that returns the parsed params so the return type gets tricky. |
@a7i maybe just |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
I think the validation
package will have some room to evolve as we implement it in other strategies but it looks good now. Thanks @a7i
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a7i, damemi 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given all strategies use the same StrategyParameters
type it makes sense to put all the validation under the same package as all the params are shared across multiple strategies. On the other hand each strategy accesses a subset of the parameters so some part of the validation needs to stay as close to each strategy as possible.
The rest looks good.
pkg/descheduler/strategies/validation/failedpods_strategyparams.go
Outdated
Show resolved
Hide resolved
/lgtm |
Introduce RemoveFailedPods strategy
Closes issue #596