Skip to content

feat(helm): add --format flag to 'helm list' - #2950

Closed
rbwsam wants to merge 2 commits into
helm:masterfrom
rbwsam:feat/format
Closed

rbwsam wants to merge 2 commits into
helm:masterfrom
rbwsam:feat/format

Conversation

@rbwsam

@rbwsam rbwsam commented Sep 18, 2017 •

Copy link
Copy Markdown
Contributor

When 'helm list --format (text|json|yaml) is run, this will print the list
of releases in the specified format.

WIP #1534

Once this is approved I will create more PRs adding this functionality to other commands.

When 'helm list --format (text|json|yaml) is run, this will print the list
of releases in the specified format.

WIP #1534
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 18, 2017
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 18, 2017
@jascott1

Copy link
Copy Markdown
Contributor

Hi @rbwsam,
Thanks for the PR. We have discussed this elsewhere as -o | --output to be consistent with kubectl and also we have a prior PR that we need to reconcile with your work here. #2836

@rbwsam

rbwsam commented Sep 19, 2017

Copy link
Copy Markdown
Contributor Author

@jascott1 -o is already being used for -o, --offset in helm list. What flag do you suggest we use for this situation?

@jascott1

Copy link
Copy Markdown
Contributor

@rbwsam Sorry I didn't realize that. I guess we can roll with your original suggestion unless someone else has another idea. The -o inconsistency will bug me forever :/

@alexey-medvedchikov

alexey-medvedchikov commented Sep 28, 2017 •

Copy link
Copy Markdown

👍 Waiting for this PR to be merged: I've implemented kubectl go-template-like behavior for it.

@mrgleeco

Copy link
Copy Markdown

is this PR DOA? This is a killer feature..

@rbwsam

rbwsam commented Nov 21, 2017

Copy link
Copy Markdown
Contributor Author

If there are any changes required so this can get merged I am happy to oblige.

@bacongobbler

bacongobbler commented Dec 29, 2017 •

Copy link
Copy Markdown
Member

Thanks @rbwsam. We were all at KubeCon and then ran straight into the holidays. I'm finally coming out of holiday mode. I'll take a look at this now. Thanks for your patience!

Comment thread cmd/helm/list.go
switch format {
case "text":
res = formatText(rels)
case "short":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add this to the list of supported output formats in the docstring?

Comment thread cmd/helm/list.go
return err
}
fmt.Fprintln(l.out, formatList(rels))
fmt.Fprint(l.out, formatted)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tested this change with the text and short output formats? Looks fine, but just want to make sure that this has been tested.

Comment thread cmd/helm/list_test.go
releaseMock(&releaseOptions{name: "atlas"}),
},
expected: "- Chart: foo-0.1.0-beta.1\n Name: atlas\n Namespace: default\n Revision: 1\n Status: DEPLOYED\n",
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a "short" list format test as well?

@bacongobbler

Copy link
Copy Markdown
Member

ping, looks like this PR needs a rebase as well as the above comments. We're cutting v2.8.0 next week so if you'd like to get this PR in, now's a good time to fix it up :)

@mattfarina

Copy link
Copy Markdown
Collaborator

@rbwsam I'd like to get this into Helm 2.9. I'm happy to support you in cleaning it up or in taking over the work myself.

@michelleN

Copy link
Copy Markdown
Member

ping @rbwsam - We'd love to see this go through. Any luck on addressing those comments above?

@alexey-medvedchikov

alexey-medvedchikov commented Feb 28, 2018 •

Copy link
Copy Markdown

Have some work made on top of this PR so will make another PR with lunapark and stuff if original poster won't appear in nearest time :)

@seaneagan

Copy link
Copy Markdown

Since there wasn't much activity here of late and we have been looking forward to this functionality I went ahead and took a shot at this in #3923.

@rbwsam

@fejta-bot

Copy link
Copy Markdown

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@mindw

mindw commented Jul 18, 2018

Copy link
Copy Markdown

/remove-lifecycle stale

@au-phiware

Copy link
Copy Markdown

Can this be closed now, since #3923?

@bacongobbler

Copy link
Copy Markdown
Member

yes, thank you @au-phiware for pointing that out. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.