Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ghost opened this issue Nov 11, 2022 · 2 comments · Fixed by #139
Closed
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ghost
Copy link

ghost commented Nov 11, 2022

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

func (d *DataLayer) ChartRepoVersions(chartName string) (res []*RepoChartElement, err error) {

, 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.

@undera
Copy link
Collaborator

undera commented Nov 11, 2022

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

@ghost
Copy link
Author

ghost commented Nov 11, 2022

this good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant