-
Notifications
You must be signed in to change notification settings - Fork 972
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
add admitPod #370
add admitPod #370
Conversation
@k82cn @hzxuzhonghu is this ready to go? |
We need description about what it does. So it is easy for us to trace new features on release note. |
1d757ea
to
5837d70
Compare
069593a
to
43606fb
Compare
@hzxuzhonghu @TommyLike , please help to review :) |
admissioncontroller.KubeBatchClientSet = app.GetKubeBatchClient(restConfig) | ||
admissioncontroller.VolcanoClientSet = app.GetVolcanoClient(restConfig) | ||
|
||
servePods(config) |
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 donot you keep consistent with L54-55?
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.
because pods need client and parameter。
pkg/admission/admit_pod.go
Outdated
|
||
// allow pods to create when | ||
// 1. pod.spec.schedulerName != volcano | ||
// 2. Podgroup phase isn't Pending |
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.
add more comments why do this?
Actually, i am not sure why need to delay pod creation? Can you elaborate a little bit more? |
pkg/admission/admit_pod.go
Outdated
|
||
// normal pod, SN == volcano | ||
pgName = helpers.GeneratePodgroupName(&pod) | ||
if pgName != "" { |
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.
when this will happen?
if pgName != "" {
}
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.
em,i will delete this if
pkg/admission/admit_pod.go
Outdated
if pg.Status.Phase != v1alpha2.PodGroupPending { | ||
return nil | ||
} | ||
return fmt.Errorf("Failed to create pod for pod <%s/%s>, because the podgroup phase is Pending", |
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.
Failed to create pod <%s/%s>
43606fb
to
743b4d7
Compare
Hey @wangyuqing4, TravisCI finished with status TravisBuddy Request Identifier: 05199e50-b845-11e9-af6e-3b363318fc0d |
743b4d7
to
446d998
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, wangyuqing4 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 |
Fixes: #135
Add admission controller(admitPod)
add ValidatingWebhookConfiguration volcano-validate-pod, only limit CREATE pods, allow pods to create when: