Skip to content

Commit

Permalink
br: implement federation volume backup controller (#5013) (#5135)
Browse files Browse the repository at this point in the history
Signed-off-by: WangLe1321 <[email protected]>
Co-authored-by: WangLe1321 <[email protected]>
  • Loading branch information
ti-chi-bot and WangLe1321 authored Jul 4, 2023
1 parent e7cd31a commit 02a6397
Show file tree
Hide file tree
Showing 23 changed files with 6,229 additions and 49 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ check: $(addprefix check-,$(ALL_CHECKS)) tidy
check-%:
./hack/verify-$*.sh

generate:
./hack/update-all.sh

crd:
./hack/update-crd.sh

Expand Down
1 change: 1 addition & 0 deletions cmd/backup-manager/app/backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func (bo *Options) backupData(
// Currently, we only support aws ebs volume snapshot.
specificArgs = append(specificArgs, "--type=aws-ebs")
specificArgs = append(specificArgs, fmt.Sprintf("--volume-file=%s", localCSBFile))
specificArgs = append(specificArgs, "--operator-paused-gc-and-scheduler=true")
logCallback = func(line string) {
if strings.Contains(line, successTag) {
extract := strings.Split(line, successTag)[1]
Expand Down
4 changes: 2 additions & 2 deletions cmd/br-federation-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ func main() {
klog.Infof("br-federation-manager exited")
}

func initFederationKubeClients(cliCfg *controller.BrFedCLIConfig) (map[string]*fedversioned.Clientset, error) {
func initFederationKubeClients(cliCfg *controller.BrFedCLIConfig) (map[string]fedversioned.Interface, error) {
files, err := os.ReadDir(cliCfg.FederationKubeConfigPath)
if err != nil {
return nil, err
}

clients := make(map[string]*fedversioned.Clientset)
clients := make(map[string]fedversioned.Interface)
for _, f := range files {
if f.IsDir() || f.Name() == "..data" {
continue
Expand Down
Loading

0 comments on commit 02a6397

Please sign in to comment.