From ddac4e6d8b5065c6092447280f5efd4247a84c83 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Mon, 20 Jul 2026 17:33:54 +0200 Subject: [PATCH] feat: reconcile later when hibernated Once a pod has been hibernated, queue for the MaxHibernationDuration. If it's awaken before, there will be an event and otherwise, it avoids checking it every 10 seconds. --- internal/controller/amaltheasession_controller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/controller/amaltheasession_controller.go b/internal/controller/amaltheasession_controller.go index 88551642..a933e3f5 100644 --- a/internal/controller/amaltheasession_controller.go +++ b/internal/controller/amaltheasession_controller.go @@ -259,6 +259,8 @@ func (r *AmaltheaSessionReconciler) reconcileInner(ctx context.Context, req ctrl if statusChanged { // If the status is evolving we should requeue faster requeueAfter = 0 + } else if !amaltheasession.Status.HibernatedSince.IsZero() { + requeueAfter = time.Duration(amaltheasession.Spec.Culling.MaxHibernatedDuration.Nanoseconds()) } return ctrl.Result{Requeue: true, RequeueAfter: requeueAfter}, nil }