Draft: fix inconsistency in calico Helm releases storage namespace

If we don't set targetNamespace: kube-system, Flux will store the Helm release (i.e. the Secret holding the information on the release) in the namespace of the HelmRelease resource, ie. sylva-system (the targetNamespace does not influence that). This namespace which does not match the namespace in which RKE2 installs the Helm release, which is kube-system.

On a fresh installed cluster, we can observe the following:

(https://gitlab.com/sylva-projects/sylva-core/-/jobs/7716485101/artifacts/external_file/management-cluster-dump/Secrets.summary.txt)

NAMESPACE                                NAME
...
kube-system                              sh.helm.release.v1.rke2-calico-crd.v1                                     helm.sh/release.v1                            1      27m
kube-system                              sh.helm.release.v1.rke2-calico.v1                                         helm.sh/release.v1                            1      27m
...
sylva-system                             sh.helm.release.v1.rke2-calico-crd.v1                                     helm.sh/release.v1                            1      21m
sylva-system                             sh.helm.release.v1.rke2-calico-crd.v2                                     helm.sh/release.v1                            1      13m
sylva-system                             sh.helm.release.v1.rke2-calico.v1                                         helm.sh/release.v1                            1      21m
sylva-system                             sh.helm.release.v1.rke2-calico.v2                                         helm.sh/release.v1                            1      12m

This of course is not consistent, but on a fresh install I'm not able to expose any negative consequence.

However, on an upgrade from 1.1.1 to main of my dev environment, this totally broke havoc (uninstalling calico-crd Helm release, ...).

Edited by Thomas Morin

Merge request reports

Loading