feat: add delete sub-command for backup-location (#3073)

* feat: add delete sub-command for backup-location

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* Change to use kubebuilder/runtimecontroller API

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* fix get BSL by label doesn't work

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* Update changelog

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* Ordering by alphabet

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* Better example format for help message

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* Capital the comments

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
This commit is contained in:
JenTing Hsiao
2020-11-30 13:59:42 -05:00
committed by GitHub
parent a877354750
commit 7f2de65b5b
12 changed files with 198 additions and 72 deletions
+6 -1
View File
@@ -1,5 +1,5 @@
/*
Copyright 2017 the Velero contributors.
Copyright 2020 the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ import (
"github.com/vmware-tanzu/velero/pkg/client"
"github.com/vmware-tanzu/velero/pkg/cmd/cli/backup"
"github.com/vmware-tanzu/velero/pkg/cmd/cli/backuplocation"
"github.com/vmware-tanzu/velero/pkg/cmd/cli/restore"
"github.com/vmware-tanzu/velero/pkg/cmd/cli/schedule"
)
@@ -35,6 +36,9 @@ func NewCommand(f client.Factory) *cobra.Command {
backupCommand := backup.NewDeleteCommand(f, "backup")
backupCommand.Aliases = []string{"backups"}
backuplocationCommand := backuplocation.NewDeleteCommand(f, "backup-location")
backuplocationCommand.Aliases = []string{"backup-locations"}
restoreCommand := restore.NewDeleteCommand(f, "restore")
restoreCommand.Aliases = []string{"restores"}
@@ -43,6 +47,7 @@ func NewCommand(f client.Factory) *cobra.Command {
c.AddCommand(
backupCommand,
backuplocationCommand,
restoreCommand,
scheduleCommand,
)