Files
cozystack/packages/system/prometheus-operator-crds/values.yaml
T
Aleksei Sviridkin d90a6a5f46 fix(prometheus-operator-crds): keep the CRDs on uninstall
The tenant addon HelmRelease remediates a failed install by uninstalling
the release, and an uninstall deletes whatever the chart rendered.
Deleting a CRD makes the API server garbage-collect every custom
resource of that kind, so a failed reinstall takes every ServiceMonitor,
PodMonitor, PrometheusRule and ScrapeConfig in the tenant cluster with
it.

The CRDs ship inside a vendored subchart that `make update` re-pulls, so
the annotation is set through the chart values the subchart already
renders rather than by editing templates that would be overwritten.

Removing the release on purpose now leaves the definitions behind to be
deleted by hand.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-08-07 14:37:46 +03:00

10 lines
459 B
YAML

prometheus-operator-crds:
crds:
# Keep the CRDs on a chart uninstall. Without this a failed install that
# remediates by uninstalling takes the definitions with it, and the API
# server then garbage-collects every ServiceMonitor, PodMonitor,
# PrometheusRule and ScrapeConfig in the cluster. Removing this release on
# purpose now leaves the definitions behind to be deleted by hand.
annotations:
helm.sh/resource-policy: keep