Merge pull request #26 from technosophos/feat/workflow-stubs

feat(*): stub out commands for helm
pull/291/head
Matt Butcher 9 years ago
commit 3aaf775209

@ -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",
},
},
}
}

@ -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",
}
}

@ -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",
},
},
}
}

@ -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) },
}
}

@ -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.",

@ -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",
},
},
}
}

@ -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)

@ -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) },
}
}

@ -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...]",
}
}

@ -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) },
}
}

@ -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.",
},
},
}
}

@ -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.",
},
},
}
}

@ -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",
},
},
}
}

@ -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",
}
}
Loading…
Cancel
Save