Skip to content

Commit 52ceb2f

Browse files
authored
Backport: Copy vcluster/third-party-integrations/git-operations/flux.mdx to vcluster_versioned_docs/version-0.34.0/third-party-integrations/git-operations/flux.mdx (#2154)
1 parent fa3dd41 commit 52ceb2f

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

  • vcluster_versioned_docs/version-0.34.0/third-party-integrations/git-operations

vcluster_versioned_docs/version-0.34.0/third-party-integrations/git-operations/flux.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,3 +680,31 @@ kubectl get secret -n <vcluster-namespace> <kubeconfig-secret-name> -o jsonpath=
680680
```yaml title="Recommended server URL format"
681681
server: https://vcluster-name.vcluster-namespace.svc.cluster.local:443
682682
```
683+
684+
#### Snapshots fail when HelmRelease is in a different namespace {#snapshot-namespace-mismatch}
685+
686+
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.
687+
688+
To fix this, set `spec.storageNamespace` in the `HelmRelease` to the tenant cluster's namespace:
689+
690+
```yaml title="Set storageNamespace to match the tenant cluster namespace" {7}
691+
apiVersion: helm.toolkit.fluxcd.io/v2
692+
kind: HelmRelease
693+
metadata:
694+
name: my-vcluster
695+
namespace: flux-system
696+
spec:
697+
storageNamespace: mytestcluster # Must match the tenant cluster namespace
698+
targetNamespace: mytestcluster
699+
interval: 10m
700+
chart:
701+
spec:
702+
chart: vcluster
703+
version: "0.26.x"
704+
sourceRef:
705+
kind: HelmRepository
706+
name: vcluster
707+
namespace: flux-system
708+
```
709+
710+
With `storageNamespace` set, Flux stores the `helm.sh/release.v1` secret in `mytestcluster`, where the snapshot controller can find it.

0 commit comments

Comments
 (0)