diff --git a/cmd/helm/chart.go b/cmd/helm/chart.go new file mode 100644 index 000000000..7d4a67dfa --- /dev/null +++ b/cmd/helm/chart.go @@ -0,0 +1,43 @@ +package main + +import ( + "github.com/codegangsta/cli" +) + +func init() { + addCommands(chartCommands()) +} + +func chartCommands() cli.Command { + return cli.Command{ + // Names following form prescribed here: http://is.gd/QUSEOF + Name: "chart", + Usage: "Perform chart-centered operations.", + Subcommands: []cli.Command{ + { + Name: "config", + Usage: "Create a configuration parameters file for this chart.", + ArgsUsage: "CHART", + }, + { + Name: "show", + Aliases: []string{"info"}, + Usage: "Provide details about this package.", + ArgsUsage: "CHART", + }, + { + Name: "scaffold", + }, + { + Name: "list", + Usage: "list all deployed charts, optionally constraining by pattern.", + ArgsUsage: "[PATTERN]", + }, + { + Name: "deployments", + Usage: "given a chart, show all the deployments that reference it.", + ArgsUsage: "CHART", + }, + }, + } +} diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 61bbd1d43..8bbeee5f0 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -14,9 +14,10 @@ func init() { func createCmd() cli.Command { return cli.Command{ - Name: "create", - Usage: "Create a new local chart for editing.", - Action: func(c *cli.Context) { run(c, create) }, + Name: "create", + Usage: "Create a new local chart for editing.", + Action: func(c *cli.Context) { run(c, create) }, + ArgsUsage: "NAME", } } diff --git a/cmd/helm/credential.go b/cmd/helm/credential.go new file mode 100644 index 000000000..f2afa369b --- /dev/null +++ b/cmd/helm/credential.go @@ -0,0 +1,41 @@ +package main + +import ( + "github.com/codegangsta/cli" +) + +func init() { + addCommands(credCommands()) +} + +func credCommands() cli.Command { + return cli.Command{ + Name: "credential", + Aliases: []string{"cred"}, + Usage: "Perform repository credential operations.", + Subcommands: []cli.Command{ + { + Name: "add", + Usage: "Add a credential to the remote manager.", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "file,f", + Usage: "A JSON file with credential information.", + }, + }, + ArgsUsage: "CREDENTIAL", + }, + { + Name: "list", + Usage: "List the credentials on the remote manager.", + ArgsUsage: "", + }, + { + Name: "remove", + Aliases: []string{"rm"}, + Usage: "Remove a credential from the remote manager.", + ArgsUsage: "CREDENTIAL", + }, + }, + } +} diff --git a/cmd/helm/delete.go b/cmd/helm/delete.go index b954dfe03..985d0ba5f 100644 --- a/cmd/helm/delete.go +++ b/cmd/helm/delete.go @@ -13,9 +13,10 @@ func init() { func deleteCmd() cli.Command { return cli.Command{ - Name: "delete", - Usage: "Deletes the supplied deployment", - Action: func(c *cli.Context) { run(c, deleteDeployment) }, + Name: "delete", + Usage: "Deletes the supplied deployment", + ArgsUsage: "DEPLOYMENT", + Action: func(c *cli.Context) { run(c, deleteDeployment) }, } } diff --git a/cmd/helm/deploy.go b/cmd/helm/deploy.go index 196a226f0..106ea6594 100644 --- a/cmd/helm/deploy.go +++ b/cmd/helm/deploy.go @@ -15,15 +15,11 @@ func init() { func deployCmd() cli.Command { return cli.Command{ - Name: "deploy", - Aliases: []string{"install"}, - Usage: "Deploy a chart into the cluster.", - Action: func(c *cli.Context) { run(c, deploy) }, + Name: "deploy", + Usage: "Deploy a chart into the cluster.", + ArgsUsage: "[CHART]", + Action: func(c *cli.Context) { run(c, deploy) }, Flags: []cli.Flag{ - cli.BoolFlag{ - Name: "dry-run", - Usage: "Only display the underlying kubectl commands.", - }, cli.StringFlag{ Name: "config,c", Usage: "The configuration YAML file for this deployment.", diff --git a/cmd/helm/deployment.go b/cmd/helm/deployment.go new file mode 100644 index 000000000..bf06d2d24 --- /dev/null +++ b/cmd/helm/deployment.go @@ -0,0 +1,40 @@ +package main + +import ( + "github.com/codegangsta/cli" +) + +func init() { + addCommands(deploymentCommands()) +} + +func deploymentCommands() cli.Command { + return cli.Command{ + // Names following form prescribed here: http://is.gd/QUSEOF + Name: "deployment", + Usage: "Perform deployment-centered operations.", + Subcommands: []cli.Command{ + { + Name: "config", + Usage: "Dump the configuration file for this deployment.", + ArgsUsage: "DEPLOYMENT", + }, + { + Name: "manifest", + Usage: "Dump the Kubernetes manifest file for this deployment.", + ArgsUsage: "DEPLOYMENT", + }, + { + Name: "show", + Aliases: []string{"info"}, + Usage: "Provide details about this deployment.", + ArgsUsage: "", + }, + { + Name: "list", + Usage: "list all deployments, or filter by an optional pattern", + ArgsUsage: "PATTERN", + }, + }, + } +} diff --git a/cmd/helm/dm.go b/cmd/helm/dm.go index 97592b48d..9419b3fe1 100644 --- a/cmd/helm/dm.go +++ b/cmd/helm/dm.go @@ -25,6 +25,7 @@ func dmCmd() cli.Command { { Name: "install", Usage: "Install DM on Kubernetes.", + ArgsUsage: "", Description: ``, Flags: []cli.Flag{ cli.BoolFlag{ @@ -42,6 +43,7 @@ func dmCmd() cli.Command { { Name: "uninstall", Usage: "Uninstall the DM from Kubernetes.", + ArgsUsage: "", Description: ``, Flags: []cli.Flag{ cli.BoolFlag{ @@ -57,8 +59,9 @@ func dmCmd() cli.Command { }, }, { - Name: "status", - Usage: "Show status of DM.", + Name: "status", + Usage: "Show status of DM.", + ArgsUsage: "", Action: func(c *cli.Context) { format.Err("Not yet implemented") os.Exit(1) diff --git a/cmd/helm/get.go b/cmd/helm/get.go index ddff95eac..7a9ffa9d5 100644 --- a/cmd/helm/get.go +++ b/cmd/helm/get.go @@ -13,9 +13,10 @@ func init() { func getCmd() cli.Command { return cli.Command{ - Name: "get", - Usage: "Retrieves the supplied deployment", - Action: func(c *cli.Context) { run(c, get) }, + Name: "get", + ArgsUsage: "DEPLOYMENT", + Usage: "Retrieves the supplied deployment", + Action: func(c *cli.Context) { run(c, get) }, } } diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go new file mode 100644 index 000000000..54c899151 --- /dev/null +++ b/cmd/helm/lint.go @@ -0,0 +1,17 @@ +package main + +import ( + "github.com/codegangsta/cli" +) + +func init() { + addCommands(lintCmd()) +} + +func lintCmd() cli.Command { + return cli.Command{ + Name: "lint", + Usage: "Evaluate a chart's conformance to the specification.", + ArgsUsage: "PATH [PATH...]", + } +} diff --git a/cmd/helm/pack.go b/cmd/helm/pack.go index dda22a291..eeb612b84 100644 --- a/cmd/helm/pack.go +++ b/cmd/helm/pack.go @@ -16,10 +16,11 @@ func init() { func packageCmd() cli.Command { return cli.Command{ - Name: "package", - Aliases: []string{"pack"}, - Usage: "Given a chart directory, package it into a release.", - Action: func(c *cli.Context) { run(c, pack) }, + Name: "package", + Aliases: []string{"pack"}, + Usage: "Given a chart directory, package it into a release.", + ArgsUsage: "PATH", + Action: func(c *cli.Context) { run(c, pack) }, } } diff --git a/cmd/helm/redeploy.go b/cmd/helm/redeploy.go new file mode 100644 index 000000000..18bbb5168 --- /dev/null +++ b/cmd/helm/redeploy.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/codegangsta/cli" +) + +func init() { + addCommands(redeployCommand()) +} + +func redeployCommand() cli.Command { + return cli.Command{ + Name: "redeploy", + Usage: "update an existing deployment with a new configuration.", + ArgsUsage: "DEPLOYMENT", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "config,f", + Usage: "Configuration values file.", + }, + }, + } +} diff --git a/cmd/helm/release.go b/cmd/helm/release.go new file mode 100644 index 000000000..a9e1a7c71 --- /dev/null +++ b/cmd/helm/release.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/codegangsta/cli" +) + +func init() { + addCommands(releaseCmd()) +} + +func releaseCmd() cli.Command { + return cli.Command{ + Name: "release", + Usage: "Release a chart to a remote chart repository.", + ArgsUsage: "PATH", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "destination,u", + Usage: "Destination URL to which this will be POSTed.", + }, + }, + } +} diff --git a/cmd/helm/repository.go b/cmd/helm/repository.go new file mode 100644 index 000000000..463035d31 --- /dev/null +++ b/cmd/helm/repository.go @@ -0,0 +1,46 @@ +package main + +import ( + "github.com/codegangsta/cli" +) + +func init() { + addCommands(repoCommands()) +} + +func repoCommands() cli.Command { + return cli.Command{ + Name: "repository", + Aliases: []string{"repo"}, + Usage: "Perform repository operations.", + Subcommands: []cli.Command{ + { + Name: "add", + Usage: "Add a repository to the remote manager.", + ArgsUsage: "REPOSITORY", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "cred", + Usage: "The name of the credential.", + }, + }, + }, + { + Name: "show", + Usage: "Show the repository details for a given repository.", + ArgsUsage: "REPOSITORY", + }, + { + Name: "list", + Usage: "List the repositories on the remote manager.", + ArgsUsage: "", + }, + { + Name: "remove", + Aliases: []string{"rm"}, + Usage: "Remove a repository from the remote manager.", + ArgsUsage: "REPOSITORY", + }, + }, + } +} diff --git a/cmd/helm/status.go b/cmd/helm/status.go new file mode 100644 index 000000000..d43466ee2 --- /dev/null +++ b/cmd/helm/status.go @@ -0,0 +1,17 @@ +package main + +import ( + "github.com/codegangsta/cli" +) + +func init() { + addCommands(statusCommand()) +} + +func statusCommand() cli.Command { + return cli.Command{ + Name: "status", + Usage: "Provide status on a named deployment.", + ArgsUsage: "DEPLOYMENT", + } +}