Skip to content

Commit

Permalink
increase gardener time requeue time
Browse files Browse the repository at this point in the history
  • Loading branch information
koala7659 committed Nov 21, 2024
1 parent 78dd238 commit a25de9f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/controller/runtime/fsm/runtime_fsm_delete_shoot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a25de9f

Please sign in to comment.