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

Namespace not applied to Helm command in auth mode #68

Open
pbzona opened this issue Oct 25, 2020 · 0 comments
Open

Namespace not applied to Helm command in auth mode #68

pbzona opened this issue Oct 25, 2020 · 0 comments

Comments

@pbzona
Copy link

pbzona commented Oct 25, 2020

Hi there, not sure if this is the right repo for this issue - if it's not, please feel free to point me somewhere else.

When running a Helm step in Authentication only mode for custom commands, the namespace argument doesn't seem to be applied to the command.

An example - here's a step that uninstalls a release after setting up a dynamic env for integration testing:

uninstall_after_testing:
  title: "Uninstalling from dynamic env"
  type: helm
  arguments:
    action: "auth"
    kube_context: "gke"
    namespace: "${{NS}}"
    helm_version: 3.2.0
    commands:
      - "helm uninstall ${{NS}}"
  stage: "integration-test"

From the Helm step docs I figured this would work fine, but I got this error:

Executing command: helm uninstall integration-test-master-a368c03                                                                       
Error: uninstall: Release not loaded: integration-test-master-a368c03: release: not found

Running the identical Helm command locally gave the same error (with no default namespace configured), but when I ran it again locally with the -n flag it picked up the release no problem. So I changed the command in my step to "helm uninstall ${{NS}} -n ${{NS}}" and it worked perfectly.

Is this expected? I know it doesn't make much sense to include a namespace with a true auth-only Helm step, but when using it for custom commands I think the namespace argument would be pretty useful. If this is a known issue I'd be happy to open up a docs PR, but it seems like a bug so I'm starting here.

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

No branches or pull requests

1 participant