Skip to content

Commit

Permalink
fix: cachedimages with non-nil expiresAt where not updated
Browse files Browse the repository at this point in the history
  • Loading branch information
paullaffitte committed Aug 13, 2024
1 parent 94e4907 commit 5631715
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/controller/kuik/cachedimage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ func (r *CachedImageReconciler) Reconcile(ctx context.Context, req ctrl.Request)
}
r.Recorder.Eventf(&cachedImage, "Normal", "Expired", "Image %s successfully expired", cachedImage.Spec.SourceImage)
return ctrl.Result{}, nil
} else {
return ctrl.Result{RequeueAfter: time.Until(expiresAt.Time)}, nil
}
}

Expand Down Expand Up @@ -264,6 +262,11 @@ func (r *CachedImageReconciler) Reconcile(ctx context.Context, req ctrl.Request)
}

log.Info("cachedimage reconciled")

if !expiresAt.IsZero() {
return ctrl.Result{RequeueAfter: time.Until(expiresAt.Time)}, nil
}

return ctrl.Result{}, nil
}

Expand Down

0 comments on commit 5631715

Please sign in to comment.