Added Configuration to enable/disable predicates #854
Added Configuration to enable/disable predicates #854
Conversation
Hi @thandayuthapani. Thanks for your PR. I'm waiting for a kubernetes-sigs or kubernetes 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. |
/cc @hex108 |
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.
Thanks!
Nit: The first commit seems not related, it will be better to send another PR for it. :)
|
||
/* | ||
User Should give predicatesEnable in this format(predicate.NodeConditionEnable, predicate.NodeUnschedulableEnable, predicate.PodTolerationEnable, | ||
predicate.MemoryPressureEnable, predicate.DiskPressureEnable, predicate.PIDPressureEnable, predicate.PodAffinityEnable). |
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.
There is no predicate.PodAffinityEnable
.
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.
Add it might be better to move them to the doc?
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.
First I was thinking whether PodAffinity Predicate should be default? Then I changed it to be default predicates, so in Doc I would have missed, will edit that.
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.
Doc has also been added for users to give configuration accordingly
pidPressureEnable bool | ||
} | ||
|
||
func initPredicateEnable() predicateEnable { |
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.
If all values are false
, perhaps we do not need this function?
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.
I thought it is better to initialize those values. WIll remove function block.
/ok-to-test |
hack/run-e2e-kind.sh
Outdated
export KIND_OPT=${KIND_OPT:=" --config ${ROOT_DIR}/hack/e2e-kind-config.yaml"} | ||
export KA_BIN=_output/bin | ||
export WAIT_TIME="--wait 20s" |
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.
only 20s
there, move --wait
to kind
command.
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.
Removed that commit from this PR and raised new PR for that commit
Yes will raise new PR for that commit |
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.
LGTM
*/ | ||
|
||
predicate := predicateEnable{ | ||
memoryPressureEnable: false, |
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.
Their default values are false.
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.
Yes, But Initializing those values is better, that is why have initialized it. What do you suggest?
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.
I think var predicate predicateEnable
is enough :) It is OK if you think we'd better initialize them explicitly.
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, thandayuthapani 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 |
What this PR does / why we need it:
Add Configuration for predicate plugin to enable/disable predicates algorithm
Which issue(s) this PR fixes
Fixes #802
Special notes for your reviewer:
Have added enabled or disabled option only for MemoryPressurePredicate, DiskPressurePredicate, PIDPressurePredicate. If necessary it can be added to other predicates as well.