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

Added Configuration to enable/disable predicates #854

Merged
merged 1 commit into from May 18, 2019

Conversation

Projects
None yet
4 participants
@thandayuthapani
Copy link
Member

commented May 16, 2019

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.

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

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 /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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k82cn

This comment has been minimized.

Copy link
Collaborator

commented May 16, 2019

/cc @hex108

@hex108
Copy link
Member

left a comment

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).

This comment has been minimized.

Copy link
@hex108

hex108 May 16, 2019

Member

There is no predicate.PodAffinityEnable.

This comment has been minimized.

Copy link
@hex108

hex108 May 16, 2019

Member

Add it might be better to move them to the doc?

This comment has been minimized.

Copy link
@thandayuthapani

thandayuthapani May 17, 2019

Author Member

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.

This comment has been minimized.

Copy link
@thandayuthapani

thandayuthapani May 17, 2019

Author Member

Doc has also been added for users to give configuration accordingly

pidPressureEnable bool
}

func initPredicateEnable() predicateEnable {

This comment has been minimized.

Copy link
@hex108

hex108 May 16, 2019

Member

If all values are false, perhaps we do not need this function?

This comment has been minimized.

Copy link
@thandayuthapani

thandayuthapani May 17, 2019

Author Member

I thought it is better to initialize those values. WIll remove function block.

@k82cn

This comment has been minimized.

Copy link
Collaborator

commented May 17, 2019

/ok-to-test

export KIND_OPT=${KIND_OPT:=" --config ${ROOT_DIR}/hack/e2e-kind-config.yaml"}
export KA_BIN=_output/bin
export WAIT_TIME="--wait 20s"

This comment has been minimized.

Copy link
@k82cn

k82cn May 17, 2019

Collaborator

only 20s there, move --wait to kind command.

This comment has been minimized.

Copy link
@thandayuthapani

thandayuthapani May 17, 2019

Author Member

Removed that commit from this PR and raised new PR for that commit

@thandayuthapani

This comment has been minimized.

Copy link
Member Author

commented May 17, 2019

Thanks!

Nit: The first commit seems not related, it will be better to send another PR for it. :)

Yes will raise new PR for that commit

@thandayuthapani thandayuthapani force-pushed the thandayuthapani:master branch from 8fb0373 to e72b2c2 May 17, 2019

@hex108
Copy link
Member

left a comment

LGTM

*/

predicate := predicateEnable{
memoryPressureEnable: false,

This comment has been minimized.

Copy link
@hex108

hex108 May 17, 2019

Member

Their default values are false.

This comment has been minimized.

Copy link
@thandayuthapani

thandayuthapani May 17, 2019

Author Member

Yes, But Initializing those values is better, that is why have initialized it. What do you suggest?

This comment has been minimized.

Copy link
@hex108

hex108 May 17, 2019

Member

I think var predicate predicateEnable is enough :) It is OK if you think we'd better initialize them explicitly.

@hex108

This comment has been minimized.

Copy link
Member

commented May 17, 2019

/lgtm

@k82cn

This comment has been minimized.

Copy link
Collaborator

commented May 18, 2019

/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented May 18, 2019

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 6bb37fb into kubernetes-sigs:master May 18, 2019

4 checks passed

cla/linuxfoundation thandayuthapani authorized
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
pull-kube-batch-verify Job succeeded.
Details
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.