Skip to content

Namespace not applied to Helm command in auth mode #68

Description

@pbzona

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions