Skip to content

Commit

Permalink
vrg: refactor kubeObjectsRecover to use s3StoreProfile directly
Browse files Browse the repository at this point in the history
- Removed unnecessary local variable `localS3StoreAccessor`

Co-Authored-by: Annaraya Narasagond <[email protected]>
Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur and asn1809 committed Dec 10, 2024
1 parent ffce5e1 commit 3f3551a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/controller/vrg_kubeobjects.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,6 @@ func (v *VRGInstance) kubeObjectsRecover(result *ctrl.Result,
return nil
}

localS3StoreAccessor, err := v.findS3StoreAccessor(s3StoreProfile)
if err != nil {
return err
}

vrg := v.instance
sourceVrgNamespaceName, sourceVrgName := vrg.Namespace, vrg.Name
sourcePathNamePrefix := s3PathNamePrefix(sourceVrgNamespaceName, sourceVrgName)
Expand All @@ -526,7 +521,7 @@ func (v *VRGInstance) kubeObjectsRecover(result *ctrl.Result,
}

vrg.Status.KubeObjectProtection.CaptureToRecoverFrom = captureToRecoverFromIdentifier
log := v.log.WithValues("number", captureToRecoverFromIdentifier.Number, "profile", localS3StoreAccessor.S3ProfileName)
log := v.log.WithValues("number", captureToRecoverFromIdentifier.Number, "profile", s3StoreProfile.S3ProfileName)

return v.kubeObjectsRecoveryStartOrResume(result, s3StoreProfile.S3ProfileName, captureToRecoverFromIdentifier, log)
}
Expand Down

0 comments on commit 3f3551a

Please sign in to comment.