|
|
|
@ -45,6 +45,7 @@ type getCmd struct {
|
|
|
|
|
out io.Writer
|
|
|
|
|
client helm.Interface
|
|
|
|
|
version int32
|
|
|
|
|
template string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
|
|
|
|
@ -73,6 +74,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
|
|
|
|
|
f := cmd.Flags()
|
|
|
|
|
settings.AddFlagsTLS(f)
|
|
|
|
|
f.Int32Var(&get.version, "revision", 0, "get the named release with revision")
|
|
|
|
|
f.StringVar(&get.template, "template", "", "go template for formatting the output, eg: {{.Release.Name}}")
|
|
|
|
|
|
|
|
|
|
cmd.AddCommand(newGetValuesCmd(nil, out))
|
|
|
|
|
cmd.AddCommand(newGetManifestCmd(nil, out))
|
|
|
|
@ -91,5 +93,9 @@ func (g *getCmd) run() error {
|
|
|
|
|
if err != nil {
|
|
|
|
|
return prettyError(err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if g.template != "" {
|
|
|
|
|
return tpl(g.template, res, g.out)
|
|
|
|
|
}
|
|
|
|
|
return printRelease(g.out, res.Release)
|
|
|
|
|
}
|
|
|
|
|