Skip to content

Commit e7f3531

Browse files
committed
1
Signed-off-by: Manuel de Brito Fontes <[email protected]>
1 parent 441a749 commit e7f3531

File tree

1 file changed

+3
-3
lines changed
  • components/node-labeler/cmd

1 file changed

+3
-3
lines changed

components/node-labeler/cmd/run.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req reconcile.Request) (r
158158

159159
nodeName := pod.Spec.NodeName
160160
if nodeName == "" {
161-
return reconcile.Result{RequeueAfter: time.Second * 10}, err
161+
return reconcile.Result{RequeueAfter: time.Second * 10}, nil
162162
}
163163

164164
var (
@@ -204,8 +204,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req reconcile.Request) (r
204204
}
205205

206206
if !IsPodReady(&pod) {
207-
// not ready. Wait until the next update.
208-
return reconcile.Result{}, nil
207+
return reconcile.Result{RequeueAfter: time.Second * 10}, nil
209208
}
210209

211210
var node corev1.Node
@@ -235,6 +234,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req reconcile.Request) (r
235234

236235
err = updateLabel(labelToUpdate, true, nodeName, r)
237236
if err != nil {
237+
log.WithError(err).Error("updating node label")
238238
return reconcile.Result{}, fmt.Errorf("trying to add the label: %v", err)
239239
}
240240

0 commit comments

Comments
 (0)