status command retrieves release status

This commit is contained in:
Cedric Meury
2018-04-27 10:31:29 +02:00
parent efe5a2e56b
commit 579fa4c765
7 changed files with 152 additions and 2 deletions
+32
View File
@@ -218,6 +218,38 @@ func main() {
return clean(state, errs)
},
},
{
Name: "status",
Usage: "retrieve status of releases in state file",
Flags: []cli.Flag{
cli.IntFlag{
Name: "concurrency",
Value: 0,
Usage: "maximum number of concurrent helm processes to run, 0 is unlimited",
},
cli.StringFlag{
Name: "args",
Value: "",
Usage: "pass args to helm exec",
},
},
Action: func(c *cli.Context) error {
state, helm, err := before(c)
if err != nil {
return err
}
workers := c.Int("concurrency")
args := c.String("args")
if len(args) > 0 {
helm.SetExtraArgs(strings.Split(args, " ")...)
}
errs := state.ReleaseStatuses(helm, workers)
return clean(state, errs)
},
},
{
Name: "delete",
Usage: "delete charts from state file (helm delete)",