Add --args to delete

This commit is contained in:
Maciej Bryński 2018-07-31 10:18:31 +02:00
parent 92d09a3e92
commit d67573299c
1 changed files with 10 additions and 0 deletions

10
main.go
View File

@ -310,6 +310,11 @@ func main() {
Name: "delete",
Usage: "delete releases from state file (helm delete)",
Flags: []cli.Flag{
cli.StringFlag{
Name: "args",
Value: "",
Usage: "pass args to helm exec",
},
cli.BoolFlag{
Name: "purge",
Usage: "purge releases i.e. free release names and histories",
@ -319,6 +324,11 @@ func main() {
return eachDesiredStateDo(c, func(state *state.HelmState, helm helmexec.Interface) []error {
purge := c.Bool("purge")
args := getArgs(c, state)
if len(args) > 0 {
helm.SetExtraArgs(args...)
}
if c.GlobalString("helm-binary") != "" {
helm.SetHelmBinary(c.GlobalString("helm-binary"))
}