Skip to content

Commit

Permalink
fix ImagePullBackOff capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Dec 28, 2022
1 parent c618d91 commit eea4701
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/pod_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"))
}

0 comments on commit eea4701

Please sign in to comment.