Skip to content

Commit

Permalink
koord-descheduler: PodMigrationJob supports skipping all filters (#1505)
Browse files Browse the repository at this point in the history
Signed-off-by: wangjianyu.wjy <wangjianyu.wjy@alibaba-inc.com>
Co-authored-by: wangjianyu.wjy <wangjianyu.wjy@alibaba-inc.com>
  • Loading branch information
ZiMengSheng and wangjianyu.wjy committed Jul 31, 2023
1 parent 05b892f commit 8f46364
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/descheduler/controllers/migration/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,9 @@ func (r *Reconciler) preparePendingJob(ctx context.Context, job *sev1alpha1.PodM
}
return reconcile.Result{}, err
}
}
if requeue, err := r.requeueJobIfRetryablePodFilterFailed(ctx, pod, job); requeue || err != nil {
return reconcile.Result{RequeueAfter: defaultRequeueAfter}, err
if requeue, err := r.requeueJobIfRetryablePodFilterFailed(ctx, pod, job); requeue || err != nil {
return reconcile.Result{RequeueAfter: defaultRequeueAfter}, err
}
}

job.Status.Phase = sev1alpha1.PodMigrationJobRunning
Expand Down
2 changes: 1 addition & 1 deletion pkg/descheduler/controllers/migration/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,7 @@ func TestAllowAnnotatedPodMigrationJobPassFilter(t *testing.T) {
assert.Nil(t, reconciler.Client.Create(context.TODO(), pod))

result, err := reconciler.preparePendingJob(context.TODO(), job)
assert.True(t, enterRetryable)
assert.False(t, enterRetryable)
assert.False(t, enterNonRetryable)
assert.Nil(t, err)
assert.Equal(t, reconcile.Result{}, result)
Expand Down

0 comments on commit 8f46364

Please sign in to comment.