@ -41,7 +41,7 @@ The status consists of:
- state of the release ( can be : unknown , deployed , uninstalled , superseded , failed , uninstalling , pending - install , pending - upgrade or pending - rollback )
- revision of the release
- description of the release ( can be completion message or error message , need to enable -- show - desc )
- list of resources that this release consists of , sorted by kind
- list of resources that this release consists of ( need to enable -- show - resources )
- details on last test suite run , if applicable
- additional notes provided by the chart
`
@ -70,7 +70,7 @@ func newStatusCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
// strip chart metadata from the output
rel . Chart = nil
return outfmt . Write ( out , & statusPrinter { rel , false , client . ShowDescription })
return outfmt . Write ( out , & statusPrinter { rel , false , client . ShowDescription , client . ShowResources })
} ,
}
@ -92,6 +92,8 @@ func newStatusCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
bindOutputFlag ( cmd , & outfmt )
f . BoolVar ( & client . ShowDescription , "show-desc" , false , "if set, display the description message of the named release" )
f . BoolVar ( & client . ShowResources , "show-resources" , false , "if set, display the resources of the named release" )
return cmd
}
@ -99,6 +101,7 @@ type statusPrinter struct {
release * release . Release
debug bool
showDescription bool
showResources bool
}
func ( s statusPrinter ) WriteJSON ( out io . Writer ) error {
@ -124,7 +127,7 @@ func (s statusPrinter) WriteTable(out io.Writer) error {
fmt . Fprintf ( out , "DESCRIPTION: %s\n" , s . release . Info . Description )
}
if len ( s . release . Info . Resources ) > 0 {
if s . showResources && len ( s . release . Info . Resources ) > 0 {
fmt . Fprintf ( out , "RESOURCES:\n%s\n" , s . release . Info . Resources )
}