Skip to content

Commit 3a37497

Browse files
authored
fix: Revert "fix: Imagejob failed fix (#515)" (#539)
Revert "fix: Imagejob failed fix (#515)" This reverts commit ed5d504. It will be necessary to revert this until Issue 537 is resolved.
1 parent a9558ab commit 3a37497

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

controllers/imagejob/imagejob_controller.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
337322
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error {
338323
log.Info("imagejob set up with manager")

test/e2e/tests/imagelist_rm_images/eraser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func TestImageListTriggersEraserImageJob(t *testing.T) {
132132
podNames = append(podNames, pod.ObjectMeta.Name)
133133
}
134134
return true, nil
135-
}, wait.WithTimeout(util.Timeout), wait.WithInterval(time.Millisecond*500))
135+
}, wait.WithTimeout(time.Minute*2), wait.WithInterval(time.Millisecond*500))
136136
if err != nil {
137137
t.Fatal(err)
138138
}

0 commit comments

Comments
 (0)