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

@ -17,6 +17,7 @@ func createCmd() cli.Command {
Name: "create", Name: "create",
Usage: "Create a new local chart for editing.", Usage: "Create a new local chart for editing.",
Action: func(c *cli.Context) { run(c, create) }, 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",
},
},
}
}

@ -15,6 +15,7 @@ func deleteCmd() cli.Command {
return cli.Command{ return cli.Command{
Name: "delete", Name: "delete",
Usage: "Deletes the supplied deployment", Usage: "Deletes the supplied deployment",
ArgsUsage: "DEPLOYMENT",
Action: func(c *cli.Context) { run(c, deleteDeployment) }, Action: func(c *cli.Context) { run(c, deleteDeployment) },
} }
} }

@ -16,14 +16,10 @@ func init() {
func deployCmd() cli.Command { func deployCmd() cli.Command {
return cli.Command{ return cli.Command{
Name: "deploy", Name: "deploy",
Aliases: []string{"install"},
Usage: "Deploy a chart into the cluster.", Usage: "Deploy a chart into the cluster.",
ArgsUsage: "[CHART]",
Action: func(c *cli.Context) { run(c, deploy) }, Action: func(c *cli.Context) { run(c, deploy) },
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.BoolFlag{
Name: "dry-run",
Usage: "Only display the underlying kubectl commands.",
},
cli.StringFlag{ cli.StringFlag{
Name: "config,c", Name: "config,c",
Usage: "The configuration YAML file for this deployment.", 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", Name: "install",
Usage: "Install DM on Kubernetes.", Usage: "Install DM on Kubernetes.",
ArgsUsage: "",
Description: ``, Description: ``,
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.BoolFlag{ cli.BoolFlag{
@ -42,6 +43,7 @@ func dmCmd() cli.Command {
{ {
Name: "uninstall", Name: "uninstall",
Usage: "Uninstall the DM from Kubernetes.", Usage: "Uninstall the DM from Kubernetes.",
ArgsUsage: "",
Description: ``, Description: ``,
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.BoolFlag{ cli.BoolFlag{
@ -59,6 +61,7 @@ func dmCmd() cli.Command {
{ {
Name: "status", Name: "status",
Usage: "Show status of DM.", Usage: "Show status of DM.",
ArgsUsage: "",
Action: func(c *cli.Context) { Action: func(c *cli.Context) {
format.Err("Not yet implemented") format.Err("Not yet implemented")
os.Exit(1) os.Exit(1)

@ -14,6 +14,7 @@ func init() {
func getCmd() cli.Command { func getCmd() cli.Command {
return cli.Command{ return cli.Command{
Name: "get", Name: "get",
ArgsUsage: "DEPLOYMENT",
Usage: "Retrieves the supplied deployment", Usage: "Retrieves the supplied deployment",
Action: func(c *cli.Context) { run(c, get) }, 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...]",
}
}

@ -19,6 +19,7 @@ func packageCmd() cli.Command {
Name: "package", Name: "package",
Aliases: []string{"pack"}, Aliases: []string{"pack"},
Usage: "Given a chart directory, package it into a release.", Usage: "Given a chart directory, package it into a release.",
ArgsUsage: "PATH",
Action: func(c *cli.Context) { run(c, pack) }, 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