Expected behavior:
Setting HELM_IGNORE_RELEASE=<release-name> should exclude the specified Helm release from the post-converge cleanup, preventing it from being purged as an unmanaged release.
Actual behavior:
HELM_IGNORE_RELEASE has no effect. The operator still discovers the release during DiscoverHelmReleases and schedules a ModulePurge task for it.
Steps to reproduce:
- Deploy
addon-operator with HELM_IGNORE_RELEASE=my-release set in the environment.
- Have a Helm release named
my-release in the addon-operator namespace that is not managed as a module.
- Wait for the first converge to complete and observe the
Operator-PostConvergeCleanup phase.
- The release is listed under "Modules to purge found" and a
ModulePurge task is created for it despite the env var being set.
Environment:
- Addon-operator version: v1.19.8
Anything else we should know?:
This is a regression introduced during a refactor that moved HelmIgnoreRelease from a direct global reference (app.HelmIgnoreRelease) to a struct-based options chain (helm.Options → helm3lib.Options → LibClient.HelmIgnoreRelease).
The plumbing was added correctly in pkg/helm/helm.go and pkg/helm/helm3lib/helm3lib.go, but pkg/addon-operator/operator.go was never updated to pass the value through. The HelmIgnoreRelease field is omitted from the helm.Options struct initialization in operator.go, so it defaults to "" and the filter in ListReleasesNames() never matches anything.
This worked correctly in v1.5.3, where helm3lib and helm3 clients referenced app.HelmIgnoreRelease directly.
Fix: Add the missing field in operator.go:
helmClient, err := helm.InitHelmClientFactory(&helm.Options{
Namespace: op.DefaultNamespace,
HistoryMax: app.Helm3HistoryMax,
Timeout: app.Helm3Timeout,
HelmIgnoreRelease: app.HelmIgnoreRelease, // <-- missing
Logger: op.Logger.Named("helm"),
}, op.CRDExtraLabels)
Expected behavior:
Setting
HELM_IGNORE_RELEASE=<release-name>should exclude the specified Helm release from the post-converge cleanup, preventing it from being purged as an unmanaged release.Actual behavior:
HELM_IGNORE_RELEASEhas no effect. The operator still discovers the release duringDiscoverHelmReleasesand schedules aModulePurgetask for it.Steps to reproduce:
addon-operatorwithHELM_IGNORE_RELEASE=my-releaseset in the environment.my-releasein theaddon-operatornamespace that is not managed as a module.Operator-PostConvergeCleanupphase.ModulePurgetask is created for it despite the env var being set.Environment:
Anything else we should know?:
This is a regression introduced during a refactor that moved HelmIgnoreRelease from a direct global reference (
app.HelmIgnoreRelease) to a struct-based options chain (helm.Options → helm3lib.Options → LibClient.HelmIgnoreRelease).The plumbing was added correctly in
pkg/helm/helm.goandpkg/helm/helm3lib/helm3lib.go, butpkg/addon-operator/operator.gowas never updated to pass the value through. TheHelmIgnoreReleasefield is omitted from the helm.Options struct initialization in operator.go, so it defaults to""and the filter inListReleasesNames()never matches anything.This worked correctly in
v1.5.3, wherehelm3libandhelm3clients referencedapp.HelmIgnoreReleasedirectly.Fix: Add the missing field in operator.go: