diff --git a/cmd/helm/list.go b/cmd/helm/list.go index 7e04e64a9..32501530d 100644 --- a/cmd/helm/list.go +++ b/cmd/helm/list.go @@ -110,13 +110,13 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { } type releaseElement struct { - Name string - Namespace string - Revision string - Updated string - Status string - Chart string - AppVersion string + Name string `json:"name"` + Namespace string `json:"namespace"` + Revision string `json:"revision"` + Updated string `json:"updated"` + Status string `json:"status"` + Chart string `json:"chart"` + AppVersion string `json:"app_version"` } type releaseListWriter struct { diff --git a/cmd/helm/repo_list.go b/cmd/helm/repo_list.go index 10d8976fe..2ff6162d1 100644 --- a/cmd/helm/repo_list.go +++ b/cmd/helm/repo_list.go @@ -51,8 +51,8 @@ func newRepoListCmd(out io.Writer) *cobra.Command { } type repositoryElement struct { - Name string - URL string + Name string `json:"name"` + URL string `json:"url"` } type repoListWriter struct { diff --git a/cmd/helm/search_hub.go b/cmd/helm/search_hub.go index e4c149f4a..89139ec16 100644 --- a/cmd/helm/search_hub.go +++ b/cmd/helm/search_hub.go @@ -84,10 +84,10 @@ func (o *searchHubOptions) run(out io.Writer, args []string) error { } type hubChartElement struct { - URL string - Version string - AppVersion string - Description string + URL string `json:"url"` + Version string `json:"version"` + AppVersion string `json:"app_version"` + Description string `json:"description"` } type hubSearchWriter struct { diff --git a/cmd/helm/search_repo.go b/cmd/helm/search_repo.go index 68d0135c7..063a72a27 100644 --- a/cmd/helm/search_repo.go +++ b/cmd/helm/search_repo.go @@ -191,10 +191,10 @@ func (o *searchRepoOptions) buildIndex(out io.Writer) (*search.Index, error) { } type repoChartElement struct { - Name string - Version string - AppVersion string - Description string + Name string `json:"name"` + Version string `json:"version"` + AppVersion string `json:"app_version"` + Description string `json:"description"` } type repoSearchWriter struct { diff --git a/cmd/helm/testdata/output/search-output-json.txt b/cmd/helm/testdata/output/search-output-json.txt index d462a12c1..9b211e1b5 100644 --- a/cmd/helm/testdata/output/search-output-json.txt +++ b/cmd/helm/testdata/output/search-output-json.txt @@ -1 +1 @@ -[{"Name":"testing/mariadb","Version":"0.3.0","AppVersion":"","Description":"Chart for MariaDB"}] +[{"name":"testing/mariadb","version":"0.3.0","app_version":"","description":"Chart for MariaDB"}] diff --git a/cmd/helm/testdata/output/search-output-yaml.txt b/cmd/helm/testdata/output/search-output-yaml.txt index 5034d8ce0..122b7f345 100644 --- a/cmd/helm/testdata/output/search-output-yaml.txt +++ b/cmd/helm/testdata/output/search-output-yaml.txt @@ -1,4 +1,4 @@ -- AppVersion: 2.3.4 - Description: Deploy a basic Alpine Linux pod - Name: testing/alpine - Version: 0.2.0 +- app_version: 2.3.4 + description: Deploy a basic Alpine Linux pod + name: testing/alpine + version: 0.2.0