Files
cozystack/hack
Mattia Eleuteri 4f35af6694 fix(monitoring-agents): let the release uninstall when the VictoriaMetrics operator is gone first
Disabling the Monitoring Agents addon of a tenant cluster removes this
release, the VictoriaMetrics operator and the VPA CRDs together, and
Flux deletes them in parallel without honouring dependsOn. When the
operator goes first, nothing clears apps.victoriametrics.com/finalizer
on the VMAgent and the other VictoriaMetrics objects this chart created,
so they stay Terminating and the release sits in UninstallFailed for
good.

Clearing those finalizers has to happen inside the uninstall and must
never be what blocks it, and a live operator still has to get the first
chance to finalize its objects. Only objects of this release may be
touched, and release names are unique only within a namespace, so the
release name alone does not identify them. kubectl loads in-cluster
credentials only while the client config is otherwise default, which a
--request-timeout breaks. A VPA recorded in the release manifest while
its CRD is not served cannot be mapped at uninstall either.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
2026-11-09 11:18:49 +01:00
..