mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-21 14:46:07 +00:00
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:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user