-
Notifications
You must be signed in to change notification settings - Fork 73
feat(common): support delay pods creation #130
feat(common): support delay pods creation #130
Conversation
pkg/controller.v1/common/job.go
Outdated
|
||
if pg == nil || pg.Status.Phase == "" || pg.Status.Phase == v1beta1.PodGroupPending { | ||
log.Warnf("PodGroup %v unschedulable", jobKey) | ||
return nil |
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.
Did we watch PodGroup?
I am not sure if there is a new reconciliation loop for the status change.
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.
seems not, l think we should support it(watching podgroup) in tfoperator?
return nil | ||
} | ||
|
||
if pg == nil || pg.Status.Phase == "" || pg.Status.Phase == v1beta1.PodGroupPending { |
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.
Could you add some code comments on this, similar to issue description in #129?
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, PTAL
d595ab0
to
c6fc9ab
Compare
now := metav1.Now() | ||
jobStatus.LastReconcileTime = &now | ||
|
||
return jc.Controller.UpdateJobStatusInApiServer(job, &jobStatus) |
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 we could add some comments here to let us know that we do this update to trigger another reconcile. And maybe in the future the operator should watch PodGroup directly.
c6fc9ab
to
047a2f7
Compare
047a2f7
to
9c932b4
Compare
/assign @terrytangyuan /LGTM |
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!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: terrytangyuan 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 |
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
resolves #129