devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Spurious redeploys for charts not in current namespace

Open SohumB opened this issue 3 years ago • 1 comments

If you have a helm deployment that sets a namespace different from the namespace used on the command line,

deployments:
- name: keda
  namespace: keda
  helm:
    chart:
      name: keda
      version: "2.6.2"
      repo: "https://kedacore.github.io/charts"

devspace will always redeploy this release, regardless of whether it needs to be.

I've tracked the issue down to here: https://github.com/loft-sh/devspace/blob/d6091ae88e16cc251541bb962335d90f93610d8c/pkg/devspace/deploy/deployer/helm/deploy.go#L89-L100

The call to Helm.ListReleases uses the current context, and therefore only looks within the currently set namespace in that context.

Local Environment:

  • DevSpace Version: 5.18.4
  • Operating System: linux
  • ARCH of the OS: AMD64

Kubernetes Cluster:

  • Distro: minikube
  • Kubernetes Version: 1.23.1

/kind bug

SohumB avatar Mar 11 '22 00:03 SohumB

@SohumB thanks for creating this issue! Yes this seems like a bug, we'll fix this for the next release!

FabianKramm avatar Mar 14 '22 12:03 FabianKramm

Hi, @SohumB Do you still face this problem in devspace v6? I tried to reproduce it but it fails in dev mode, which is intended, and it successfully deploys in deploy mode.

pratikjagrut avatar Nov 21 '22 17:11 pratikjagrut

Hey, @SohumB

Your described issue should now be fixed with DevSpace v6. @pratikjagrut has tried reproducing it and we haven't managed to. Are you still facing this issue?

Please let us know so we can support your use case.

Thanks!

alexandradragodan avatar Dec 09 '22 09:12 alexandradragodan