Skip to content

Clean up orphaned sveltos-agent version ConfigMaps - #503

Merged
gianlucam76 merged 1 commit into
projectsveltos:release-1.14from
gianlucam76:release-1.14
Aug 30, 2026
Merged

Clean up orphaned sveltos-agent version ConfigMaps#503
gianlucam76 merged 1 commit into
projectsveltos:release-1.14from
gianlucam76:release-1.14

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

removeSveltosAgentFromManagementCluster tears down every resource in the sveltos-agent manifest for a cluster that's gone, but never touched the sa-* version ConfigMap since that gets written by the running agent itself, not deployed as part of the manifest. Left unowned and never cleaned up, these accumulate without bound - one NKS cell had ~2000 of them from nothing but a canary probe's create/delete cycle.

Delete it last, after every manifest resource (including the deployment) already has a delete issued, and propagate the error instead of swallowing it like the rest of that function does: cleanClusterStaleResources turns a failure here into a requeue, so this gets retried through both the reconciler and the periodic sweep instead of just giving up.

removeSveltosAgentFromManagementCluster tears down every resource in
the sveltos-agent manifest for a cluster that's gone, but never touched
the sa-* version ConfigMap since that gets written by the running agent
itself, not deployed as part of the manifest. Left unowned and never
cleaned up, these accumulate without bound - one NKS cell had ~2000 of
them from nothing but a canary probe's create/delete cycle.

Delete it last, after every manifest resource (including the deployment)
already has a delete issued, and propagate the error instead of
swallowing it like the rest of that function does: cleanClusterStaleResources
turns a failure here into a requeue, so this gets retried through both
the reconciler and the periodic sweep instead of just giving up.
@gianlucam76
gianlucam76 merged commit df0923f into projectsveltos:release-1.14 Aug 30, 2026
7 checks passed
@gianlucam76
gianlucam76 deleted the release-1.14 branch August 30, 2026 17:56
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.

2 participants