diff --git a/internal/controller/runtime/fsm/runtime_fsm_finalizer_matcher_test.go b/internal/controller/runtime/fsm/runtime_fsm_finalizer_matcher_test.go index cdeeb389..6dbd54a8 100644 --- a/internal/controller/runtime/fsm/runtime_fsm_finalizer_matcher_test.go +++ b/internal/controller/runtime/fsm/runtime_fsm_finalizer_matcher_test.go @@ -3,7 +3,7 @@ package fsm import ( "fmt" - . "github.com/onsi/gomega" + . "github.com/onsi/gomega" //nolint:revive "sigs.k8s.io/controller-runtime/pkg/client" "github.com/onsi/gomega/types" diff --git a/internal/controller/runtime/fsm/runtime_fsm_initialise.go b/internal/controller/runtime/fsm/runtime_fsm_initialise.go index 4d6ce73c..d125f610 100644 --- a/internal/controller/runtime/fsm/runtime_fsm_initialise.go +++ b/internal/controller/runtime/fsm/runtime_fsm_initialise.go @@ -4,9 +4,8 @@ import ( "context" "time" - "k8s.io/apimachinery/pkg/api/meta" - imv1 "github.com/kyma-project/infrastructure-manager/api/v1" + "k8s.io/apimachinery/pkg/api/meta" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) @@ -15,7 +14,6 @@ import ( // All the states we set in the operator are about to be read only by the external clients func sFnInitialize(ctx context.Context, m *fsm, s *systemState) (stateFn, *ctrl.Result, error) { - instanceIsNotBeingDeleted := s.instance.GetDeletionTimestamp().IsZero() instanceHasFinalizer := controllerutil.ContainsFinalizer(&s.instance, m.Finalizer) @@ -56,10 +54,10 @@ func sFnInitialize(ctx context.Context, m *fsm, s *systemState) (stateFn, *ctrl. } else { if instanceHasFinalizer { - //if s.shoot.GetDeletionTimestamp().IsZero() { + // if s.shoot.GetDeletionTimestamp().IsZero() { m.log.Info("Instance is being deleted") return switchState(sFnDeleteShoot) - //} + // } //return switchState(sFnWaitForShootDeletion) }