remove shadowPodgroup in scheduler#406
Conversation
| sc.Recorder.Eventf(pg, v1.EventTypeNormal, "Evict", reason) | ||
| } else { | ||
| return fmt.Errorf("Invalid PodGroup Version: %s", job.PodGroup.Version) | ||
| if job.PodGroup.Version == api.PodGroupVersionV1Alpha1 { |
There was a problem hiding this comment.
let's move this into a helper function.
There was a problem hiding this comment.
new a func convertPodGroupInfo() :)
| if len(jobID) == 0 { | ||
| jobID = api.JobID(pod.UID) | ||
| } | ||
| pgName := helpers.GeneratePodgroupName(pod) |
There was a problem hiding this comment.
why do we still need this function?
There was a problem hiding this comment.
we should also update pod's podgroup-name in podgroup controller for that.
There was a problem hiding this comment.
? ? in podgroup controller pg name is the same as here, don't need update pg-name.
There was a problem hiding this comment.
At lease we should rename this function, since the ShadowPodGroup concept has been deprecated.
|
Hey @wangyuqing4, TravisCI finished with status TravisBuddy Request Identifier: fbfdde80-b5ce-11e9-a786-5b97e93928e7 |
Travis tests have failedHey @wangyuqing4, TravisBuddy Request Identifier: 148af2b0-b5d6-11e9-a786-5b97e93928e7 |
| glog.Errorf("Error While converting api.PodGroup to v1alpha.PodGroup with error: %v", err) | ||
| return err | ||
| } | ||
| sc.Recorder.Eventf(pg, eventtype, reason, message) |
| } else { | ||
| return fmt.Errorf("Invalid PodGroup Version: %s", job.PodGroup.Version) | ||
| } | ||
| if err := sc.convertPodGroupInfo(job, v1.EventTypeNormal, "Evict", reason); err != nil { |
There was a problem hiding this comment.
Move the record event code outside of the convertPodGroupInfo.
| // If pending or unschedulable, record unschedulable event. | ||
| if pgUnschedulable || pdbUnschedulabe { | ||
| if err := sc.convertPodGroupInfo(job); err != nil { | ||
| glog.Errorf("Error While converting api.PodGroup %v", err) |
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |

in pr #401, podgroup controller can create pg for normal pod, so remove shadowPodgroup part code in scheduler.