diff --git a/config/crd/bases/infrastructuremanager.kyma-project.io_runtimes.yaml b/config/crd/bases/infrastructuremanager.kyma-project.io_runtimes.yaml index 8bd0bb71..29e2da1f 100644 --- a/config/crd/bases/infrastructuremanager.kyma-project.io_runtimes.yaml +++ b/config/crd/bases/infrastructuremanager.kyma-project.io_runtimes.yaml @@ -758,14 +758,19 @@ spec: >= v1.26.' type: string systemReserved: - description: SystemReserved is the configuration + description: 'SystemReserved is the configuration for resources reserved for system processes not managed by kubernetes (e.g. journald). When updating these values, be aware that cgroup resizes may not succeed on active worker nodes. Look for the NodeAllocatableEnforced event to determine if the configuration was - applied. + applied. Deprecated: Separately configuring + resource reservations for system processes + is deprecated in Gardener and will be removed + soon. Please merge existing resource reservations + into the kubeReserved field. TODO(MichaelEischer): + Drop this field after v1.113 has been released.' properties: cpu: anyOf: diff --git a/internal/controller/runtime/fsm/runtime_fsm_common.go b/internal/controller/runtime/fsm/runtime_fsm_common.go index b28a109e..5ba47706 100644 --- a/internal/controller/runtime/fsm/runtime_fsm_common.go +++ b/internal/controller/runtime/fsm/runtime_fsm_common.go @@ -28,6 +28,10 @@ func requeue() (stateFn, *ctrl.Result, error) { return nil, &ctrl.Result{Requeue: true}, nil } +func requeueAfter(d time.Duration) (stateFn, *ctrl.Result, error) { + return nil, &ctrl.Result{RequeueAfter: d}, nil +} + func stop() (stateFn, *ctrl.Result, error) { return nil, nil, nil } diff --git a/internal/controller/runtime/fsm/runtime_fsm_initialise.go b/internal/controller/runtime/fsm/runtime_fsm_initialise.go index 9a37a186..ea1330de 100644 --- a/internal/controller/runtime/fsm/runtime_fsm_initialise.go +++ b/internal/controller/runtime/fsm/runtime_fsm_initialise.go @@ -42,15 +42,24 @@ func sFnInitialize(ctx context.Context, m *fsm, s *systemState) (stateFn, *ctrl. return switchState(sFnPrepareCluster) // wait for pending shoot operation to complete } - shootInOrAfterDeleting := s.shoot == nil || !s.shoot.GetDeletionTimestamp().IsZero() + // resource cleanup is done; + // instance is being deleted and shoot was already deleted + if !instanceIsNotBeingDeleted && instanceHasFinalizer && s.shoot == nil { + return removeFinalizerAndStop(ctx, m, s) + } - if !instanceIsNotBeingDeleted && instanceHasFinalizer && !shootInOrAfterDeleting { + // resource cleanup did not start; + // instance is being deleted and shoot is not being deleted + if !instanceIsNotBeingDeleted && instanceHasFinalizer && s.shoot.DeletionTimestamp.IsZero() { m.log.Info("Delete instance resources") return switchState(sFnDeleteShoot) } - if !instanceIsNotBeingDeleted && instanceHasFinalizer && shootInOrAfterDeleting { - return removeFinalizerAndStop(ctx, m, s) + // resource cleanup in progress; + // instance is being deleted and shoot is being deleted + if !instanceIsNotBeingDeleted && instanceHasFinalizer { + m.log.Info("Waiting on instance resources being deleted") + return requeueAfter(gardenerRequeueDuration) } m.log.Info("noting to reconcile, stopping sfm")