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

Test Helm remote repo #1358

Closed
jguionnet opened this issue Oct 18, 2023 · 4 comments · Fixed by #1365
Closed

Test Helm remote repo #1358

jguionnet opened this issue Oct 18, 2023 · 4 comments · Fixed by #1365
Labels
enhancement New feature or request

Comments

@jguionnet
Copy link
Contributor

Describe the solution you'd like
I would like the helm test feature to support the --repo options, I would like that underneath the following commands could be executed

helm template keda --namespace medieval-38bl76 --set metricsServer.replicaCount=45 --set resources.metricServer.limits.memory=4545Mi --repo https://kedacore.github.io/charts

helm template --namespace keda-system keda -f custom-values.yaml --repo https://kedacore.github.io/charts

I want to verify that my customization on top of chart work from release to release of remote chart I am using

Describe alternatives you've considered

Coding

Additional context
Add any other context or screenshots about the feature request here.

@jguionnet jguionnet added the enhancement New feature or request label Oct 18, 2023
@merusso
Copy link

merusso commented Oct 27, 2023

Why not add the Helm repo and reference like so?

$ helm repo add kedacore https://kedacore.github.io/charts
$ helm template keda kedacore/keda --namespace keda --version 2.12.0

@jguionnet
Copy link
Contributor Author

Why not add the Helm repo and reference like so?

$ helm repo add kedacore https://kedacore.github.io/charts
$ helm template keda kedacore/keda --namespace keda --version 2.12.0

I could and how do I do that programmatically with terratest?

@denis256
Copy link
Member

	options := &helm.Options{}
	helm.AddRepo(t, options, "keda", "https://kedacore.github.io/charts")
	helm.RunHelmCommandAndGetOutputE(t, options, "repo", "update")
	helm.RunHelmCommandAndGetStdOutE(t, options, "template", "keda", "kedacore/keda", "--namespace", "keda", "--version", "2.12.0")

https://github.com/denis256/go-tests/tree/master/terratest-helm-test

@merusso
Copy link

merusso commented Oct 30, 2023

I was thinking you could also use helm.RenderTemplateE(), but I see that it expects a local chart directory unlike the respective helm template command.

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

Successfully merging a pull request may close this issue.

3 participants