mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
1.2 KiB
69 lines
1.2 KiB
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/codegangsta/cli"
|
|
"github.com/deis/helm-dm/format"
|
|
)
|
|
|
|
var version = "0.0.1"
|
|
|
|
func main() {
|
|
app := cli.NewApp()
|
|
app.Name = "helm"
|
|
app.Version = version
|
|
app.Usage = `Deploy and manage packages.`
|
|
app.Commands = commands()
|
|
|
|
app.Run(os.Args)
|
|
}
|
|
|
|
func commands() []cli.Command {
|
|
return []cli.Command{
|
|
{
|
|
Name: "install",
|
|
Usage: "Initialize the client and install DM on Kubernetes.",
|
|
Description: ``,
|
|
Flags: []cli.Flag{
|
|
cli.BoolFlag{
|
|
Name: "dry-run",
|
|
Usage: "Show what would be installed, but don't install anything.",
|
|
},
|
|
},
|
|
Action: func(c *cli.Context) {
|
|
if err := install(c.Bool("dry-run")); err != nil {
|
|
format.Error(err.Error())
|
|
os.Exit(1)
|
|
}
|
|
},
|
|
},
|
|
{
|
|
Name: "target",
|
|
Usage: "Displays information about cluster.",
|
|
ArgsUsage: "",
|
|
Action: func(c *cli.Context) {
|
|
if err := target(c.Bool("dry-run")); err != nil {
|
|
format.Error(err.Error())
|
|
os.Exit(1)
|
|
}
|
|
},
|
|
Flags: []cli.Flag{
|
|
cli.BoolFlag{
|
|
Name: "dry-run",
|
|
Usage: "Only display the underlying kubectl commands.",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
Name: "doctor",
|
|
},
|
|
{
|
|
Name: "deploy",
|
|
},
|
|
{
|
|
Name: "search",
|
|
},
|
|
}
|
|
}
|