From a25de9f49c6674be70346f64a0cd9bfca5f4e5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Golicz?= Date: Thu, 21 Nov 2024 13:07:45 +0100 Subject: [PATCH] increase gardener time requeue time --- .../controller/runtime/fsm/runtime_fsm_delete_shoot.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/controller/runtime/fsm/runtime_fsm_delete_shoot.go b/internal/controller/runtime/fsm/runtime_fsm_delete_shoot.go index 37f4a33d..c94ab734 100644 --- a/internal/controller/runtime/fsm/runtime_fsm_delete_shoot.go +++ b/internal/controller/runtime/fsm/runtime_fsm_delete_shoot.go @@ -2,6 +2,7 @@ package fsm import ( "context" + "time" gardener "github.com/gardener/gardener/pkg/apis/core/v1beta1" imv1 "github.com/kyma-project/infrastructure-manager/api/v1" @@ -10,13 +11,17 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) +const ( + deletionRequeueTime = 2 * time.Minute +) + func sFnDeleteShoot(ctx context.Context, m *fsm, s *systemState) (stateFn, *ctrl.Result, error) { m.log.Info("delete shoot state") // wait section if !s.shoot.GetDeletionTimestamp().IsZero() { m.log.Info("Waiting for shoot to be deleted", "Name", s.shoot.Name, "Namespace", s.shoot.Namespace) - return requeueAfter(m.RCCfg.GardenerRequeueDuration) + return requeueAfter(deletionRequeueTime) } // action section @@ -58,7 +63,7 @@ func sFnDeleteShoot(ctx context.Context, m *fsm, s *systemState) (stateFn, *ctrl } // out section - return updateStatusAndRequeueAfter(m.RCCfg.GardenerRequeueDuration) + return updateStatusAndRequeueAfter(deletionRequeueTime) } // workaround