Closed erikkrieg closed 1 year ago
Thanks @erikkrieg for the report, we will take a look at it :+1:
Hey @erikkrieg
taking a look on how you're using now v6, I think the best solution would be to use pipelines
to achieve exactly the same behaviour you were expecting.
If you check this example:
version: v2beta1
name: myappname
pipelines:
deploy:
create_deployments my-app-${VERSION} --from example-app
purge:
purge_deployments my-app-${VERSION}
deployments:
example-app:
helm:
chart:
name: component-chart
repo: https://charts.devspace.sh
values:
containers:
- image: nginx:latest
service:
ports:
- port: 3000
This will indeed work as you were expecting, you can use:
VERSION="foo" devspace deploy
VERSION="bar" devspace deploy
and then:
VERSION="foo" devspace purge
VERSION="bar" devspace purge
Tested and it works as you'd expect, let me know if this resolves your problems :smile:
Oh, interesting. I didn't realize you could do that with create_deployments
. I believe that this is a workable solution for me, thanks!
What happened? We have a devpsace configuration for a project that deploys different versions into the same namespace. With v6 we can use
releaseName
to deploy these different versions, but when we attempt to clean them up withdevspace purge
the wrong one can be uninstalled and the older ones enter a state wheredevspace purge
will not remove them. It seems like when there are multiple versions deployed, the most recently deployed one is what gets purged and then the rest have to be dealt with manually.What did you expect to happen instead? Given I have two deployed versions:
I would expect to purge version
foo
by running the following:And in the case that I have removed version
bar
first, then I would expect to be able to purgefoo
with a subsequent run of the purge command.How can we reproduce the bug? (as minimally and precisely as possible) Deploy the same project in the same namespace twice, and make sure the project deploys a helm release. The deployments should use a different
releaseName
so that there are two helm releases active in the namespace.Then, use
devpsace purge
. You can attempt to "target" the older helm release by using the samereleaseName
that you created it with, or you can run it without any vars. Either way, you should see the the release that was created second was purged.Try to run
devpsace purge
again and notice that no helm releases are uninstalled even though the first one is still installed.My devspace.yaml:
Previously, in v5, we used a variable in the deployment name to prevent conflicts between these versions. Something like this:
On v6, we are doing:
Local Environment:
Anything else we need to know?