From 4df09e7da42ad21373b8b566872df0ca782c72bf Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Tue, 17 Dec 2024 01:56:46 -0500 Subject: [PATCH] vrg: skip kubeObjectsRecover in case of fresh deployment Co-Authored-by: Annaraya Narasagond Signed-off-by: Raghavendra Talur --- internal/controller/vrg_kubeobjects.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/controller/vrg_kubeobjects.go b/internal/controller/vrg_kubeobjects.go index d19dd37dc..43722bd57 100644 --- a/internal/controller/vrg_kubeobjects.go +++ b/internal/controller/vrg_kubeobjects.go @@ -518,6 +518,12 @@ func (v *VRGInstance) kubeObjectsRecover(result *ctrl.Result, s3ProfileName stri return nil } + if v.instance.Spec.Action == "" { + v.log.Info("Skipping kube objects restore in fresh deployment case") + + return nil + } + sourceVrg, err := v.getVRGFromS3Profile(s3ProfileName) if err != nil { return fmt.Errorf("kube objects source VRG get error: %v", err)