-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
feat(scheduler): use api server to watch scheduled pods #82338
feat(scheduler): use api server to watch scheduled pods #82338
Conversation
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.
Generally LGTM. Some comments below.
|
||
scheduled := int32(0) | ||
scheduledCh := make(chan struct{}, 1) | ||
schedulerConfigArgs.PodInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ |
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 can not remember where do we start PodInformer
routine :(, do you know 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.
kubernetes/test/integration/util/util.go
Lines 79 to 92 in 64a6718
sched := scheduler.NewFromConfig(config) | |
scheduler.AddAllEventHandlers(sched, | |
v1.DefaultSchedulerName, | |
informerFactory.Core().V1().Nodes(), | |
informerFactory.Core().V1().Pods(), | |
informerFactory.Core().V1().PersistentVolumes(), | |
informerFactory.Core().V1().PersistentVolumeClaims(), | |
informerFactory.Core().V1().Services(), | |
informerFactory.Storage().V1().StorageClasses(), | |
informerFactory.Storage().V1beta1().CSINodes(), | |
) | |
informerFactory.Start(stopCh) | |
sched.Run() |
It's here, please correct me if I'm wrong.
421215c
to
0a3a95a
Compare
/retest
Regards,
Draven
…On Sep 5, 2019, 5:54 PM +0800, Kubernetes Prow Robot ***@***.***>, wrote:
@draveness: The following test failed, say /retest to rerun them all:
Test name
Commit
Details
Rerun command
pull-kubernetes-node-e2e
0a3a95a
link
/test pull-kubernetes-node-e2e
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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. I understand the commands that are listed here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
/retest |
1 similar comment
/retest |
/lgtm /hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: draveness, Huang-Wei 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 |
0a3a95a
to
22cf232
Compare
22cf232
to
591a49b
Compare
/retest |
/retest
Regards,
Draven
…On Sep 11, 2019, 11:26 AM +0800, Kubernetes Prow Robot ***@***.***>, wrote:
@draveness: The following test failed, say /retest to rerun them all:
Test name
Commit
Details
Rerun command
pull-kubernetes-e2e-gce-100-performance
591a49b
link
/test pull-kubernetes-e2e-gce-100-performance
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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. I understand the commands that are listed here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
591a49b
to
b9f7828
Compare
b9f7828
to
f09e8a4
Compare
@Huang-Wei @k82cn All the comments have been addressed, PTAL |
/retest
Regards,
Draven
…On Sep 12, 2019, 11:00 AM +0800, Kubernetes Prow Robot ***@***.***>, wrote:
@draveness: The following test failed, say /retest to rerun them all:
Test name
Commit
Details
Rerun command
pull-kubernetes-kubemark-e2e-gce-big
f09e8a4
link
/test pull-kubernetes-kubemark-e2e-gce-big
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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. I understand the commands that are listed here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@draveness is anything new introduced since the preceding review? or it's just rebasing? |
/retest
Regards,
Draven
…On Sep 12, 2019, 12:07 PM +0800, Kubernetes Prow Robot ***@***.***>, wrote:
@draveness: The following tests failed, say /retest to rerun them all:
Test name
Commit
Details
Rerun command
pull-kubernetes-kubemark-e2e-gce-big
f09e8a4
link
/test pull-kubernetes-kubemark-e2e-gce-big
pull-kubernetes-e2e-gce-100-performance
f09e8a4
link
/test pull-kubernetes-e2e-gce-100-performance
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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. I understand the commands that are listed here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
it’s just rebasing. :)
Regards,
Draven
…On Sep 12, 2019, 12:07 PM +0800, Kubernetes Prow Robot ***@***.***>, wrote:
@draveness: The following tests failed, say /retest to rerun them all:
Test name
Commit
Details
Rerun command
pull-kubernetes-kubemark-e2e-gce-big
f09e8a4
link
/test pull-kubernetes-kubemark-e2e-gce-big
pull-kubernetes-e2e-gce-100-performance
f09e8a4
link
/test pull-kubernetes-e2e-gce-100-performance
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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. I understand the commands that are listed here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@@ -151,39 +154,59 @@ func schedulePods(config *testConfig) int32 { | |||
break | |||
} | |||
} | |||
|
|||
scheduled := int32(0) | |||
ctx, cancelFunc := context.WithCancel(context.Background()) |
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.
A nit: cancel
is a more convenal name.
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.
done
f09e8a4
to
ad1cf1b
Compare
/retest |
LGTM overall :) |
Can I get a lgtm on this PR? Thanks :)
Regards,
Draven
…On Sep 16, 2019, 4:59 PM +0800, Klaus Ma ***@***.***>, wrote:
LGTM overall :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@draveness Sure. Before /lgtm, can you resolve #82338 (comment)? |
ad1cf1b
to
54e0f47
Compare
Thanks, Please take another look
Regards,
Draven
…On Sep 17, 2019, 4:32 AM +0800, Wei Huang ***@***.***>, wrote:
@draveness Sure. Before /lgtm, can you resolve #82338 (comment)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
/lgtm Thanks, @draveness . |
/hold cancel |
/kind feature
/sig scheduling
/priority important-longterm
/assign @Huang-Wei
What this PR does / why we need it:
Use api server to watch scheduled pods instead of listing them in a for loop.
Which issue(s) this PR fixes:
ref: #81719
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: