diff --git a/docs/cli-reference/ark_delete.md b/docs/cli-reference/ark_delete.md index 36c18b9e1..d48aaf0a0 100644 --- a/docs/cli-reference/ark_delete.md +++ b/docs/cli-reference/ark_delete.md @@ -29,4 +29,6 @@ Delete ark resources ### SEE ALSO * [ark](ark.md) - Back up and restore Kubernetes cluster resources. * [ark delete backup](ark_delete_backup.md) - Delete a backup +* [ark delete restore](ark_delete_restore.md) - Delete a restore +* [ark delete schedule](ark_delete_schedule.md) - Delete a schedule diff --git a/docs/cli-reference/ark_delete_restore.md b/docs/cli-reference/ark_delete_restore.md new file mode 100644 index 000000000..45fb69d5a --- /dev/null +++ b/docs/cli-reference/ark_delete_restore.md @@ -0,0 +1,35 @@ +## ark delete restore + +Delete a restore + +### Synopsis + + +Delete a restore + +``` +ark delete restore NAME [flags] +``` + +### Options + +``` + -h, --help help for restore +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + --kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO +* [ark delete](ark_delete.md) - Delete ark resources + diff --git a/docs/cli-reference/ark_delete_schedule.md b/docs/cli-reference/ark_delete_schedule.md new file mode 100644 index 000000000..8afcf3397 --- /dev/null +++ b/docs/cli-reference/ark_delete_schedule.md @@ -0,0 +1,35 @@ +## ark delete schedule + +Delete a schedule + +### Synopsis + + +Delete a schedule + +``` +ark delete schedule NAME [flags] +``` + +### Options + +``` + -h, --help help for schedule +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + --kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO +* [ark delete](ark_delete.md) - Delete ark resources + diff --git a/pkg/cmd/cli/delete/delete.go b/pkg/cmd/cli/delete/delete.go index eb795f3d7..c9616c887 100644 --- a/pkg/cmd/cli/delete/delete.go +++ b/pkg/cmd/cli/delete/delete.go @@ -21,6 +21,8 @@ import ( "github.com/heptio/ark/pkg/client" "github.com/heptio/ark/pkg/cmd/cli/backup" + "github.com/heptio/ark/pkg/cmd/cli/restore" + "github.com/heptio/ark/pkg/cmd/cli/schedule" ) func NewCommand(f client.Factory) *cobra.Command { @@ -33,8 +35,16 @@ func NewCommand(f client.Factory) *cobra.Command { backupCommand := backup.NewDeleteCommand(f, "backup") backupCommand.Aliases = []string{"backups"} + restoreCommand := restore.NewDeleteCommand(f, "restore") + restoreCommand.Aliases = []string{"restores"} + + scheduleCommand := schedule.NewDeleteCommand(f, "schedule") + scheduleCommand.Aliases = []string{"schedules"} + c.AddCommand( backupCommand, + restoreCommand, + scheduleCommand, ) return c diff --git a/pkg/cmd/cli/restore/delete.go b/pkg/cmd/cli/restore/delete.go index bcc3cb45d..b6955de38 100644 --- a/pkg/cmd/cli/restore/delete.go +++ b/pkg/cmd/cli/restore/delete.go @@ -27,9 +27,9 @@ import ( "github.com/heptio/ark/pkg/cmd" ) -func NewDeleteCommand(f client.Factory) *cobra.Command { +func NewDeleteCommand(f client.Factory, use string) *cobra.Command { c := &cobra.Command{ - Use: "delete NAME", + Use: fmt.Sprintf("%s NAME", use), Short: "Delete a restore", Run: func(c *cobra.Command, args []string) { if len(args) != 1 { diff --git a/pkg/cmd/cli/restore/restore.go b/pkg/cmd/cli/restore/restore.go index 32d6b7aee..b372955bf 100644 --- a/pkg/cmd/cli/restore/restore.go +++ b/pkg/cmd/cli/restore/restore.go @@ -34,7 +34,7 @@ func NewCommand(f client.Factory) *cobra.Command { NewGetCommand(f, "get"), NewLogsCommand(f), NewDescribeCommand(f, "describe"), - NewDeleteCommand(f), + NewDeleteCommand(f, "delete"), ) return c diff --git a/pkg/cmd/cli/schedule/delete.go b/pkg/cmd/cli/schedule/delete.go index 827067edd..11f0ada55 100644 --- a/pkg/cmd/cli/schedule/delete.go +++ b/pkg/cmd/cli/schedule/delete.go @@ -27,9 +27,9 @@ import ( "github.com/heptio/ark/pkg/cmd" ) -func NewDeleteCommand(f client.Factory) *cobra.Command { +func NewDeleteCommand(f client.Factory, use string) *cobra.Command { c := &cobra.Command{ - Use: "delete NAME", + Use: fmt.Sprintf("%s NAME", use), Short: "Delete a schedule", Run: func(c *cobra.Command, args []string) { if len(args) != 1 { diff --git a/pkg/cmd/cli/schedule/schedule.go b/pkg/cmd/cli/schedule/schedule.go index 2390a403b..8e2dd439c 100644 --- a/pkg/cmd/cli/schedule/schedule.go +++ b/pkg/cmd/cli/schedule/schedule.go @@ -33,7 +33,7 @@ func NewCommand(f client.Factory) *cobra.Command { NewCreateCommand(f, "create"), NewGetCommand(f, "get"), NewDescribeCommand(f, "describe"), - NewDeleteCommand(f), + NewDeleteCommand(f, "delete"), ) return c