mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-18 13:57:32 +00:00
30 lines
519 B
Go
30 lines
519 B
Go
|
package crtlgitops
|
||
|
|
||
|
import (
|
||
|
"github.com/caos/orbos/mntr"
|
||
|
"github.com/caos/orbos/pkg/git"
|
||
|
"github.com/caos/orbos/pkg/kubernetes"
|
||
|
"github.com/caos/zitadel/pkg/databases"
|
||
|
)
|
||
|
|
||
|
func Restore(
|
||
|
monitor mntr.Monitor,
|
||
|
gitClient *git.Client,
|
||
|
k8sClient *kubernetes.Client,
|
||
|
backup string,
|
||
|
) error {
|
||
|
if err := databases.GitOpsClear(monitor, k8sClient, gitClient); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
if err := databases.GitOpsRestore(
|
||
|
monitor,
|
||
|
k8sClient,
|
||
|
gitClient,
|
||
|
backup,
|
||
|
); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
return nil
|
||
|
}
|