Skip to content

fix: cleanup of ClusterProfile with reloader knob set - #1898

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:reloader-cleanup
Jul 29, 2026
Merged

fix: cleanup of ClusterProfile with reloader knob set#1898
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:reloader-cleanup

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

When a ClusterProfile with spec.reloader: true deploying Helm charts is deleted (or stops matching its target cluster), the corresponding Reloader instance and in agentless mode its entry in the per-cluster ConfigMap were never cleaned up. Both would sit around indefinitely, referencing Deployments from a chart that's no longer deployed.

undeployHelmChartResources calls updateReloaderWithDeployedResources to remove the Reloader on undeploy, but passed libsveltosv1beta1.FeatureKustomize instead of FeatureHelm

Because the Reloader is looked up by label (feature: Helm) and the per-cluster ConfigMap key is derived from the feature name, passing the wrong constant makes both lookups silently miss the real Reloader/ConfigMap entry. No error is raised, it's a silent no-op on both sides. This only affects Helm-based ClusterProfiles; Resources and Kustomize were never mis-tagged and clean up correctly, which is why this went unnoticed.

When a ClusterProfile with `spec.reloader: true` deploying Helm charts is
deleted (or stops matching its target cluster), the corresponding `Reloader`
instance and in agentless mode its entry in the per-cluster ConfigMap
were never cleaned up. Both would sit around indefinitely, referencing
Deployments from a chart that's no longer deployed.

`undeployHelmChartResources` calls `updateReloaderWithDeployedResources` to remove
the Reloader on undeploy, but passed `libsveltosv1beta1.FeatureKustomize` instead of
`FeatureHelm`

Because the Reloader is looked up by label (`feature: Helm`) and the
per-cluster ConfigMap key is derived from the feature name, passing the wrong
constant makes both lookups silently miss the real Reloader/ConfigMap entry.
No error is raised, it's a silent no-op on both sides. This only affects
Helm-based ClusterProfiles; Resources and Kustomize were never
mis-tagged and clean up correctly, which is why this went unnoticed.
@gianlucam76
gianlucam76 merged commit 1c8a150 into projectsveltos:main Jul 29, 2026
11 checks passed
@gianlucam76
gianlucam76 deleted the reloader-cleanup branch July 29, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant