Skip to content

Commit

Permalink
Merge pull request #800 from hzxuzhonghu/fix-podgroup
Browse files Browse the repository at this point in the history
MinResource should be updated when minAvailable changes
  • Loading branch information
volcano-sh-bot authored May 9, 2020
2 parents 927e1d9 + 5fd6441 commit ac46e07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controllers/job/job_controller_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ func (cc *Controller) createOrUpdatePodGroup(job *batch.Job) error {

if pg.Spec.MinMember != job.Spec.MinAvailable {
pg.Spec.MinMember = job.Spec.MinAvailable
pg.Spec.MinResources = cc.calcPGMinResources(job)
if _, err = cc.vcClient.SchedulingV1beta1().PodGroups(job.Namespace).Update(pg); err != nil {
if !apierrors.IsAlreadyExists(err) {
klog.V(3).Infof("Failed to create PodGroup for Job <%s/%s>: %v",
Expand Down

0 comments on commit ac46e07

Please sign in to comment.