forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
migrate.go
28 lines (22 loc) · 810 Bytes
/
migrate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package migrate
import (
"github.com/spf13/cobra"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/genericclioptions"
)
const MigrateRecommendedName = "migrate"
var migrateLong = templates.LongDesc(`
Migrate resources on the cluster
These commands assist administrators in performing preventative maintenance on a cluster.`)
func NewCommandMigrate(name, fullName string, f cmdutil.Factory, streams genericclioptions.IOStreams, cmds ...*cobra.Command) *cobra.Command {
// Parent command to which all subcommands are added.
cmd := &cobra.Command{
Use: name,
Short: "Migrate data in the cluster",
Long: migrateLong,
Run: cmdutil.DefaultSubCommandRun(streams.ErrOut),
}
cmd.AddCommand(cmds...)
return cmd
}