vcluster icon indicating copy to clipboard operation
vcluster copied to clipboard

vcluster snapshot is not working when helmrelease is created in different namespace

Open floriankoch opened this issue 4 months ago • 3 comments

What happened?

When i create a vcluster with a flux HelmRelease resource within the flux-system namespace , and the vcluster is installed in the mytestcluster namespace , the helm.sh/release.v1 secret is created in the flux-system namespace

Whit this setup, vcluster snapshot does not work, because the release is not found

What did you expect to happen?

vcluster snapshot works when installed via flux HelmRealease in a different namespace At least the docs should warn about this scenario

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

Create a flux HelmRelease within flux-system, and create the vcluster in a different namespace

Anything else we need to know?

Using storageNamespace in the HelmRelease fixes the problem, but its not obvious that it needs to be used

Host cluster Kubernetes version

$ kubectl version
Client Version: v1.33.3
Kustomize Version: v5.6.0
Server Version: v1.32.6

vcluster version

$ vcluster --version
vcluster version 0.26.0

VCluster Config

# My vcluster.yaml / values.yaml here

floriankoch avatar Aug 05 '25 14:08 floriankoch

Hi @floriankoch, I'm not so familiar with Flux, can you clarify why the HelmRelease needs to go into the flux-system namespace instead of the vcluster namespace ? That is what our docs show. If you can provide your HelmRelease yaml that would help as well.

cbron avatar Aug 18 '25 21:08 cbron

@cbron on our side, we want control over the HelmReleaae installation process, so the HelmReleaae must reside in a platform controlled namespace. Also per default, flux does not watch other namespaces for helmreleases

I no longer think its a bug, the documentation should have a hint for this scenario.

You need to set storageNamespace to install the release secret in the namespace you want

floriankoch avatar Aug 20 '25 08:08 floriankoch

@floriankoch @cbron . Thanks for looking into this . I am facing similar issue but when installing vcluster through argocd. Do you have config example for that ?

bapatvin avatar Aug 22 '25 21:08 bapatvin