helm-dashboard icon indicating copy to clipboard operation
helm-dashboard copied to clipboard

[Feature request] Repository tab support to display helm that only have pre-release versions

Open denganliang opened this issue 3 years ago • 2 comments

we have helm that version is pre-release and only have pre-release version, while dashboard default search stable version, so I can not find my helm chart in the Repository tab.

Can helm-dashboard`s Repository tab support to display helm that only have pre-release versions ?

just add --devel flag in helm search repo command can get the pre-release version.

ref: https://helm.sh/docs/helm/helm_search_repo/

# Search for release versions matching the keyword "nginx", including pre-release versions
$ helm search repo nginx --devel

edit

https://github.com/komodorio/helm-dashboard/blob/cf407c63a23e25cd15878661c2067458a14979b3/pkg/dashboard/subproc/data.go#L191
, like this

func (d *DataLayer) ChartRepoVersions(chartName string) (res []*RepoChartElement, err error) {
	search := "/" + chartName + "\v"
	if strings.Contains(chartName, "/") {
		search = "\v" + chartName + "\v"
	}

	cmd := []string{"search", "repo", "--devel", "--regexp", search, "--versions", "--output", "json"}
	out, err := d.runCommandHelm(cmd...)
	if err != nil {
		return nil, err
	}

	err = json.Unmarshal([]byte(out), &res)
	if err != nil {
		return nil, err
	}
	return res, nil
}

func (d *DataLayer) ChartRepoCharts(repoName string) (res []*RepoChartElement, err error) {
	cmd := []string{"search", "repo", "--devel", "--regexp", "\v" + repoName + "/", "--output", "json"}
	out, err := d.runCommandHelm(cmd...)
	if err != nil {
		return nil, err
	}

	err = json.Unmarshal([]byte(out), &res)
	if err != nil {
		return nil, err
	}

	ins, err := d.ListInstalled()
	if err != nil {
		return nil, err
	}

	enrichRepoChartsWithInstalled(res, ins)

	return res, nil
}

or give a args to control this feature.

denganliang avatar Nov 11 '22 09:11 denganliang

Thanks for your request, it makes a lot of sense. I think we should add a command-line switch to enable dev versions.

undera avatar Nov 11 '22 09:11 undera

this good.

ghost avatar Nov 11 '22 10:11 ghost