From a2b5d704abc3c396c8bdaaefc7797a1b63d83c12 Mon Sep 17 00:00:00 2001 From: Jean-Marc Andre Date: Wed, 17 Feb 2021 22:14:04 +0100 Subject: [PATCH] Don't need to pass repo as arg anymore --- pkg/restic/root.go | 2 +- pkg/restore/root.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/restic/root.go b/pkg/restic/root.go index dabd1c1..d4effe4 100644 --- a/pkg/restic/root.go +++ b/pkg/restic/root.go @@ -85,7 +85,7 @@ func BackupPaths(tag string, paths []string) ([]byte, error) { return output, err } -func RestorePaths(repository string, snapshotId string) ([]byte, error) { +func RestorePaths(snapshotId string) ([]byte, error) { log := logger.WithName("restore-deployment") if err := checkRepo(repository); err != nil { log.Error(err, "unable to setup repo", "repo", repository) diff --git a/pkg/restore/root.go b/pkg/restore/root.go index 105657c..95f8127 100644 --- a/pkg/restore/root.go +++ b/pkg/restore/root.go @@ -26,9 +26,9 @@ func init() { func RestoreVolume(snapshotId string) error { log := logger.WithName("restore-volume") + session.RestoreSessionUpdateTargetStatus(formolv1alpha1.Running) state := formolv1alpha1.Success - repository := os.Getenv("RESTIC_REPOSITORY") - output, err := restic.RestorePaths(repository, snapshotId) + output, err := restic.RestorePaths(snapshotId) if err != nil { log.Error(err, "unable to restore volume", "output", string(output)) state = formolv1alpha1.Failure