From eea47018b8e9126f8f3a2ec93f27d0716284bbaa Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Wed, 28 Dec 2022 17:39:28 -0500 Subject: [PATCH] fix ImagePullBackOff capitalization --- controllers/pod_reconciler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/pod_reconciler.go b/controllers/pod_reconciler.go index a36c152..26c1459 100644 --- a/controllers/pod_reconciler.go +++ b/controllers/pod_reconciler.go @@ -55,6 +55,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R log := r.Log.WithValues("pod", req.NamespacedName) var pod corev1.Pod + log.Info("checking if pod can be expired") if err := r.Get(ctx, req.NamespacedName, &pod); err != nil { if apierrors.IsNotFound(err) { return ctrl.Result{}, nil @@ -133,6 +134,6 @@ func noPluralCreds(pod *corev1.Pod) bool { func waitingForPluralCreds(cs corev1.ContainerStatus) bool { return (!cs.Ready && cs.State.Waiting != nil && - cs.State.Waiting.Reason == "ImagePullBackoff" && + cs.State.Waiting.Reason == "ImagePullBackOff" && strings.Contains(cs.State.Waiting.Message, "dkr.plural.sh")) }