Don't need to pass repo as arg anymore
This commit is contained in:
parent
538497229b
commit
a2b5d704ab
@ -85,7 +85,7 @@ func BackupPaths(tag string, paths []string) ([]byte, error) {
|
|||||||
return output, err
|
return output, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func RestorePaths(repository string, snapshotId string) ([]byte, error) {
|
func RestorePaths(snapshotId string) ([]byte, error) {
|
||||||
log := logger.WithName("restore-deployment")
|
log := logger.WithName("restore-deployment")
|
||||||
if err := checkRepo(repository); err != nil {
|
if err := checkRepo(repository); err != nil {
|
||||||
log.Error(err, "unable to setup repo", "repo", repository)
|
log.Error(err, "unable to setup repo", "repo", repository)
|
||||||
|
|||||||
@ -26,9 +26,9 @@ func init() {
|
|||||||
|
|
||||||
func RestoreVolume(snapshotId string) error {
|
func RestoreVolume(snapshotId string) error {
|
||||||
log := logger.WithName("restore-volume")
|
log := logger.WithName("restore-volume")
|
||||||
|
session.RestoreSessionUpdateTargetStatus(formolv1alpha1.Running)
|
||||||
state := formolv1alpha1.Success
|
state := formolv1alpha1.Success
|
||||||
repository := os.Getenv("RESTIC_REPOSITORY")
|
output, err := restic.RestorePaths(snapshotId)
|
||||||
output, err := restic.RestorePaths(repository, snapshotId)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err, "unable to restore volume", "output", string(output))
|
log.Error(err, "unable to restore volume", "output", string(output))
|
||||||
state = formolv1alpha1.Failure
|
state = formolv1alpha1.Failure
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user