-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Optimizing the processing flow of HandlePodAdditions and canAdmitPod … #28570
Conversation
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
2 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
1 similar comment
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@@ -2400,8 +2400,8 @@ func (kl *Kubelet) rejectPod(pod *api.Pod, reason, message string) { | |||
} | |||
|
|||
// canAdmitPod determines if a pod can be admitted, and gives a reason if it | |||
// cannot. "pod" is new pod, while "pods" include all admitted pods plus the | |||
// new pod. The function returns a boolean value indicating whether the pod | |||
// cannot. "pod" is new pod, while "pods" is all admitted pods |
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.
"are"?
14a36a6
to
2bf4e72
Compare
LGTM, thanks for the cleanup! |
GCE e2e build/test passed for commit 2bf4e723fcea6aede83d75cb7d3b6fd156aec114. |
@kevinjkj Please run |
…methods. Signed-off-by: Kevin Wang <wang.kanghua@zte.com.cn> change the note for the canAdmitPod method. Signed-off-by: Kevin Wang <wang.kanghua@zte.com.cn> gofmt kubelet.go Signed-off-by: Kevin Wang <wang.kanghua@zte.com.cn>
2bf4e72
to
09344c1
Compare
GCE e2e build/test failed for commit 09344c1. Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake. |
GCE e2e build/test passed for commit 09344c1. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 09344c1. |
Automatic merge from submit-queue |
Optimizing the processing flow of HandlePodAdditions and canAdmitPod methods. If the following loop body in canAdmitPod method is removed, the detection speed can be improved, and the change is very small.
otherPods := []*api.Pod{}
for _, p := range pods {
if p != pod {
otherPods = append(otherPods, p)
}
}