Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -680,3 +680,31 @@ kubectl get secret -n <vcluster-namespace> <kubeconfig-secret-name> -o jsonpath=
```yaml title="Recommended server URL format"
server: https://vcluster-name.vcluster-namespace.svc.cluster.local:443
```

#### Snapshots fail when HelmRelease is in a different namespace {#snapshot-namespace-mismatch}

When you deploy a tenant cluster through a `HelmRelease` resource that lives in a different namespace than the tenant cluster itself (for example, `HelmRelease` in `flux-system` and the tenant cluster in `mytestcluster`), Flux stores the Helm release secret in the `HelmRelease` namespace. The snapshot controller searches for the Helm release secret in the tenant cluster's namespace and fails to find it, which causes snapshots to fail.

To fix this, set `spec.storageNamespace` in the `HelmRelease` to the tenant cluster's namespace:

```yaml title="Set storageNamespace to match the tenant cluster namespace" {7}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: my-vcluster
namespace: flux-system
spec:
storageNamespace: mytestcluster # Must match the tenant cluster namespace
targetNamespace: mytestcluster
interval: 10m
chart:
spec:
chart: vcluster
version: "0.26.x"
sourceRef:
kind: HelmRepository
name: vcluster
namespace: flux-system
```

With `storageNamespace` set, Flux stores the `helm.sh/release.v1` secret in `mytestcluster`, where the snapshot controller can find it.
Loading