diff --git a/cmd/helm/get.go b/cmd/helm/get.go index 9402762c5..83ec28b28 100644 --- a/cmd/helm/get.go +++ b/cmd/helm/get.go @@ -73,7 +73,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { }, } - cmd.PersistentFlags().Int32Var(&get.version, "revision", 0, "get the named release with revision") + cmd.Flags().Int32Var(&get.version, "revision", 0, "get the named release with revision") cmd.AddCommand(newGetValuesCmd(nil, out)) cmd.AddCommand(newGetManifestCmd(nil, out)) diff --git a/cmd/helm/get_hooks.go b/cmd/helm/get_hooks.go index f880bf789..dc93fb1df 100644 --- a/cmd/helm/get_hooks.go +++ b/cmd/helm/get_hooks.go @@ -35,6 +35,7 @@ type getHooksCmd struct { release string out io.Writer client helm.Interface + version int32 } func newGetHooksCmd(client helm.Interface, out io.Writer) *cobra.Command { @@ -55,11 +56,12 @@ func newGetHooksCmd(client helm.Interface, out io.Writer) *cobra.Command { return ghc.run() }, } + cmd.Flags().Int32Var(&ghc.version, "revision", 0, "get the named release with revision") return cmd } func (g *getHooksCmd) run() error { - res, err := g.client.ReleaseContent(g.release) + res, err := g.client.ReleaseContent(g.release, helm.ContentReleaseVersion(g.version)) if err != nil { fmt.Fprintln(g.out, g.release) return prettyError(err) diff --git a/cmd/helm/get_manifest.go b/cmd/helm/get_manifest.go index f37bafbe4..85b31df06 100644 --- a/cmd/helm/get_manifest.go +++ b/cmd/helm/get_manifest.go @@ -37,6 +37,7 @@ type getManifestCmd struct { release string out io.Writer client helm.Interface + version int32 } func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command { @@ -59,12 +60,14 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command { return get.run() }, } + + cmd.Flags().Int32Var(&get.version, "revision", 0, "get the named release with revision") return cmd } // getManifest implements 'helm get manifest' func (g *getManifestCmd) run() error { - res, err := g.client.ReleaseContent(g.release) + res, err := g.client.ReleaseContent(g.release, helm.ContentReleaseVersion(g.version)) if err != nil { return prettyError(err) } diff --git a/cmd/helm/get_values.go b/cmd/helm/get_values.go index c95b6e056..bce35958b 100644 --- a/cmd/helm/get_values.go +++ b/cmd/helm/get_values.go @@ -35,6 +35,7 @@ type getValuesCmd struct { allValues bool out io.Writer client helm.Interface + version int32 } func newGetValuesCmd(client helm.Interface, out io.Writer) *cobra.Command { @@ -55,13 +56,15 @@ func newGetValuesCmd(client helm.Interface, out io.Writer) *cobra.Command { return get.run() }, } + + cmd.Flags().Int32Var(&get.version, "revision", 0, "get the named release with revision") cmd.Flags().BoolVarP(&get.allValues, "all", "a", false, "dump all (computed) values") return cmd } // getValues implements 'helm get values' func (g *getValuesCmd) run() error { - res, err := g.client.ReleaseContent(g.release) + res, err := g.client.ReleaseContent(g.release, helm.ContentReleaseVersion(g.version)) if err != nil { return prettyError(err) }