-
Notifications
You must be signed in to change notification settings - Fork 532
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
Cleanup PostBind in coscheduling #554
Conversation
Hi @czybjtu. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
@@ -109,6 +111,11 @@ func (r *PodGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c | |||
if len(pods) >= int(pg.Spec.MinMember) { | |||
pgCopy.Status.Phase = schedv1alpha1.PodGroupPreScheduling | |||
fillOccupiedObj(pgCopy, &pods[0]) | |||
} else { |
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.
why add this else? Is this necessary to remove PostBind?
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, this else is unnecessary.
PostBind
logic has been implmented in PodGroup controller. We can delete it as stated in comments.
scheduler-plugins/pkg/coscheduling/core/core.go
Lines 207 to 209 in 2ea5a97
// PostBind updates a PodGroup's status. | |
// TODO: move this logic to PodGroup's controller. | |
func (pgMgr *PodGroupManager) PostBind(ctx context.Context, pod *corev1.Pod, nodeName string) { |
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.
👍
/ok-to-test |
280ae89
to
d640256
Compare
/lgtm |
/cc |
@@ -109,14 +109,13 @@ func Test_Run(t *testing.T) { | |||
podNextPhase: v1.PodSucceeded, | |||
}, | |||
{ | |||
name: "Group status convert from scheduling to succeed", | |||
name: "Group status convert from pending to scheduling", |
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.
@czybjtu
Can you explain why we need to change this test case here?
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.
This is a duplicate of line 102.
name: "Group status convert from scheduling to succeed", |
/approve Thanks for your contribution. @czybjtu |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: czybjtu, denkensk 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 |
@czybjtu could you please update the
|
Done |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
this logic has been moved to PodGroup's controller.
Which issue(s) this PR fixes:
Fixes ##531
Special notes for your reviewer:
Does this PR introduce a user-facing change?