devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.28k stars 359 forks source link

Purge all helm release without knowing releaseName #2720

Open afreyermuth98 opened 11 months ago

afreyermuth98 commented 11 months ago

What happened?

I'm releasing some stuff using the helm releaseName like this

deployments:
  app:
    helm:
      chart:
        name: my-chart-name-${SOME_RELEASE_NAME}
      releaseName: ${SOME_RELEASE_NAME}

Then I want to purge this release but I cannot access the previous SOME_RELEASE_NAME value.

What did you expect to happen instead?

Have something to be able to purge the release even without knowing its name.

How can we reproduce the bug? (as minimally and precisely as possible)

Release an helm chart with a releaseName depending on a variable and then try to purge this release without this variable.

Local Environment:

Anything else we need to know?

lizardruss commented 11 months ago

@afreyermuth98 Could you share your devspace.yaml? Here's a very simple example that works with devspace deploy & devspace purge. You might also check to see whether the namespace being used by DevSpace is the same that was used for the original deployment, since DevSpace uses a secret to cache the deployment information.

version: v2beta1

deployments:
  app:
    helm:
      releaseName: release-${DEVSPACE_TIMESTAMP}
      values:
        containers:
          - image: alpine
            command:
              - sh
              - -c
              - sleep infinity