Merge pull request #6541 from BhaveshSethi/feature/add-version-to-helm-list

Feature/add version to helm list
pull/6563/head
Matthew Fisher 6 years ago committed by GitHub
commit 5c592dcca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -118,6 +118,7 @@ type releaseElement struct {
Updated string
Status string
Chart string
AppVersion string
}
type releaseListWriter struct {
@ -134,6 +135,7 @@ func newReleaseListWriter(releases []*release.Release) *releaseListWriter {
Revision: strconv.Itoa(r.Version),
Status: r.Info.Status.String(),
Chart: fmt.Sprintf("%s-%s", r.Chart.Metadata.Name, r.Chart.Metadata.Version),
AppVersion: r.Chart.Metadata.AppVersion,
}
t := "-"
if tspb := r.Info.LastDeployed; !tspb.IsZero() {
@ -147,9 +149,9 @@ func newReleaseListWriter(releases []*release.Release) *releaseListWriter {
func (r *releaseListWriter) WriteTable(out io.Writer) error {
table := uitable.New()
table.AddRow("NAME", "NAMESPACE", "REVISION", "UPDATED", "STATUS", "CHART")
table.AddRow("NAME", "NAMESPACE", "REVISION", "UPDATED", "STATUS", "CHART", "APP VERSION")
for _, r := range r.releases {
table.AddRow(r.Name, r.Namespace, r.Revision, r.Updated, r.Status, r.Chart)
table.AddRow(r.Name, r.Namespace, r.Revision, r.Updated, r.Status, r.Chart, r.AppVersion)
}
return action.EncodeTable(out, table)
}

@ -36,6 +36,7 @@ func TestListCmd(t *testing.T) {
Metadata: &chart.Metadata{
Name: "chickadee",
Version: "1.0.0",
AppVersion: "0.0.1",
},
}

@ -1,9 +1,9 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
drax default 1 2016-01-16 00:00:01 +0000 UTC uninstalling chickadee-1.0.0
gamora default 1 2016-01-16 00:00:01 +0000 UTC superseded chickadee-1.0.0
groot default 1 2016-01-16 00:00:01 +0000 UTC uninstalled chickadee-1.0.0
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0
thanos default 1 2016-01-16 00:00:01 +0000 UTC pending-install chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
drax default 1 2016-01-16 00:00:01 +0000 UTC uninstalling chickadee-1.0.0 0.0.1
gamora default 1 2016-01-16 00:00:01 +0000 UTC superseded chickadee-1.0.0 0.0.1
groot default 1 2016-01-16 00:00:01 +0000 UTC uninstalled chickadee-1.0.0 0.0.1
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0 0.0.1
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0 0.0.1
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0 0.0.1
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0 0.0.1
thanos default 1 2016-01-16 00:00:01 +0000 UTC pending-install chickadee-1.0.0 0.0.1

@ -1,5 +1,5 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0 0.0.1
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0 0.0.1
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0 0.0.1
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0 0.0.1

@ -1,5 +1,5 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0 0.0.1
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0 0.0.1
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0 0.0.1
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0 0.0.1

@ -1,2 +1,2 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0 0.0.1

@ -1,5 +1,5 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0 0.0.1
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0 0.0.1
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0 0.0.1
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0 0.0.1

@ -1,2 +1,2 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0 0.0.1

@ -1,4 +1,4 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0 0.0.1
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0 0.0.1
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0 0.0.1

@ -1,2 +1,2 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
thanos default 1 2016-01-16 00:00:01 +0000 UTC pending-install chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
thanos default 1 2016-01-16 00:00:01 +0000 UTC pending-install chickadee-1.0.0 0.0.1

@ -1,5 +1,5 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0 0.0.1
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0 0.0.1
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0 0.0.1
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0 0.0.1

@ -1,3 +1,3 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
gamora default 1 2016-01-16 00:00:01 +0000 UTC superseded chickadee-1.0.0
starlord default 1 2016-01-16 00:00:01 +0000 UTC superseded chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
gamora default 1 2016-01-16 00:00:01 +0000 UTC superseded chickadee-1.0.0 0.0.1
starlord default 1 2016-01-16 00:00:01 +0000 UTC superseded chickadee-1.0.0 0.0.1

@ -1,2 +1,2 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
groot default 1 2016-01-16 00:00:01 +0000 UTC uninstalled chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
groot default 1 2016-01-16 00:00:01 +0000 UTC uninstalled chickadee-1.0.0 0.0.1

@ -1,2 +1,2 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
drax default 1 2016-01-16 00:00:01 +0000 UTC uninstalling chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
drax default 1 2016-01-16 00:00:01 +0000 UTC uninstalling chickadee-1.0.0 0.0.1

@ -1,5 +1,5 @@
NAME NAMESPACE REVISION UPDATED STATUS CHART
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
hummingbird default 1 2016-01-16 00:00:03 +0000 UTC deployed chickadee-1.0.0 0.0.1
iguana default 2 2016-01-16 00:00:04 +0000 UTC deployed chickadee-1.0.0 0.0.1
rocket default 1 2016-01-16 00:00:02 +0000 UTC failed chickadee-1.0.0 0.0.1
starlord default 2 2016-01-16 00:00:01 +0000 UTC deployed chickadee-1.0.0 0.0.1

Loading…
Cancel
Save