|
|
|
@ -79,6 +79,7 @@ type listCmd struct {
|
|
|
|
|
colWidth uint
|
|
|
|
|
output string
|
|
|
|
|
byChartName bool
|
|
|
|
|
byNamespace bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type listResult struct {
|
|
|
|
@ -136,6 +137,7 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command {
|
|
|
|
|
f.UintVar(&list.colWidth, "col-width", 60, "specifies the max column width of output")
|
|
|
|
|
f.StringVar(&list.output, "output", "", "output the specified format (json or yaml)")
|
|
|
|
|
f.BoolVarP(&list.byChartName, "chart-name", "c", false, "sort by chart name")
|
|
|
|
|
f.BoolVarP(&list.byNamespace, "namespace-name", "n", false, "sort by namespace name")
|
|
|
|
|
|
|
|
|
|
// TODO: Do we want this as a feature of 'helm list'?
|
|
|
|
|
//f.BoolVar(&list.superseded, "history", true, "show historical releases")
|
|
|
|
@ -154,6 +156,9 @@ func (l *listCmd) run() error {
|
|
|
|
|
if l.byChartName {
|
|
|
|
|
sortBy = services.ListSort_CHART_NAME
|
|
|
|
|
}
|
|
|
|
|
if l.byNamespace {
|
|
|
|
|
sortBy = services.ListSort_NAMESPACE
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sortOrder := services.ListSort_ASC
|
|
|
|
|
if l.sortDesc {
|
|
|
|
|