Don't need to pass repo as arg anymore

This commit is contained in:
jandre 2021-02-17 22:14:04 +01:00
parent 7f3ee66b1f
commit b7468cbe2b
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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