Redefine IsEvictable to be customizable for a particular strategy#372
Conversation
|
|
||
| type constraint func(pod *v1.Pod) error | ||
|
|
||
| type evictable struct { |
There was a problem hiding this comment.
It seems odd that this is a private type but all the functions that work with it are public. Might be better as a public type, and then if we add more options to it in the future, it could be declared as a literal
I'm not sure on the name, I think something like EvictOptions might be clearer. wdyt?
There was a problem hiding this comment.
That was the idea. Keep the actual implementation hidden and just rely on a single IsEvictable invocation. I have created Options struct instead of having WithPriorityThreshold as a method.
2cc9676 to
5d9bee8
Compare
5d9bee8 to
6f27712
Compare
damemi
left a comment
There was a problem hiding this comment.
one nit on a comment but the rest looks good at this point
/approve
/hold
feel free to remove the hold whenever you're ready
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: damemi, ingvagabund The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Use WithXXX methods to extend the list of constraints to also provide a reasonable error message.
6f27712 to
d8251b9
Compare
|
/hold cancel |
|
/kind cleanup |
Redefine IsEvictable to be customizable for a particular strategy
…ces/release-4.16 chore(deps): update konflux references
Use WithXXX methods to extend the list of constraints to also
provide a reasonable error message.