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

[helm] The namespace is added twice to the helm command #1446

Open
aqeelat opened this issue Sep 19, 2024 · 0 comments
Open

[helm] The namespace is added twice to the helm command #1446

aqeelat opened this issue Sep 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@aqeelat
Copy link

aqeelat commented Sep 19, 2024

Describe the bug
When calling helm.RenderTemplate, it appends the namespace to the args:

args := []string{}
if options.KubectlOptions != nil && options.KubectlOptions.Namespace != "" {
args = append(args, "--namespace", options.KubectlOptions.Namespace)
}

However, when we then get to prepareHelmCommand, it also appends the namespace without checking if it is already in args
args = append(args, getNamespaceArgs(options)...)

To Reproduce
I came across it while debugging this test. It is a minimally reproducible test.

Expected behavior
For the namespace to only be added once

Nice to have
The values of args and additionalArgs before exiting prepareHelmCommand
Screenshot 2024-09-19 at 12 19 03 PM

Versions

  • Terratest version: 0.47.1
@aqeelat aqeelat added the bug Something isn't working label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant