@@ -19,7 +19,6 @@ import (
1919 "fmt"
2020 "os"
2121 "strings"
22- "time"
2322
2423 corev1 "k8s.io/api/core/v1"
2524 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -28,7 +27,6 @@ import (
2827
2928 "k8s.io/apimachinery/pkg/labels"
3029 "k8s.io/apimachinery/pkg/runtime"
31- "k8s.io/apimachinery/pkg/util/wait"
3230 ctrl "sigs.k8s.io/controller-runtime"
3331 "sigs.k8s.io/controller-runtime/pkg/client"
3432 "sigs.k8s.io/controller-runtime/pkg/controller"
@@ -315,24 +313,11 @@ func (r *Reconciler) handleNewJob(ctx context.Context, imageJob *eraserv1alpha1.
315313 return err
316314 }
317315 log .Info ("Started " + containerName + " pod on node" , "nodeName" , nodeName )
318-
319- if err := wait .PollImmediate (time .Second , time .Minute , isPodReady (pod )); err != nil {
320- log .Error (err , "error waiting for PodReady phase" , pod .Name , pod .Status .Phase )
321- }
322316 }
323317
324318 return nil
325319}
326320
327- func isPodReady (pod * corev1.Pod ) wait.ConditionFunc {
328- return func () (bool , error ) {
329- if pod .Status .Phase == corev1 .PodPhase (corev1 .PodReady ) {
330- return true , nil
331- }
332- return false , nil
333- }
334- }
335-
336321// SetupWithManager sets up the controller with the Manager.
337322func (r * Reconciler ) SetupWithManager (mgr ctrl.Manager ) error {
338323 log .Info ("imagejob set up with manager" )
0 commit comments