From b3546507cba3bc79866996f480b2c7a24854af13 Mon Sep 17 00:00:00 2001 From: Arkadiusz Galwas Date: Tue, 24 Sep 2024 14:19:52 +0200 Subject: [PATCH] Skip getting shoot if runtime is controlled by the provisioner --- internal/controller/runtime/fsm/runtime_fsm_take_snapshot.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/controller/runtime/fsm/runtime_fsm_take_snapshot.go b/internal/controller/runtime/fsm/runtime_fsm_take_snapshot.go index 823ad3f1..49830c8d 100644 --- a/internal/controller/runtime/fsm/runtime_fsm_take_snapshot.go +++ b/internal/controller/runtime/fsm/runtime_fsm_take_snapshot.go @@ -14,6 +14,10 @@ func sFnTakeSnapshot(ctx context.Context, m *fsm, s *systemState) (stateFn, *ctr m.log.Info("Take snapshot state") s.saveRuntimeStatus() + if s.instance.IsControlledByProvisioner() { + return switchState(sFnInitialize) + } + var shoot gardener_api.Shoot err := m.ShootClient.Get(ctx, types.NamespacedName{ Name: s.instance.Spec.Shoot.Name,