refactor(postgres): keep the backup alerts with the backup
The observability core renderer rejects any alert or record whose name contains "backup" (no_unscoped_monitors_rules): backup monitoring is outside the observability core by design.f19ce54put PlatformPostgresBackupMissing and PlatformPostgresWALArchiveBacklog in core-rules.yaml, so the pinned renderer failed with "out-of-scope monitor or rule is present". Move both alerts unchanged into services/platform-postgres-backup/prometheus-rule.yaml in platform-data, which Prometheus reads because the namespace has observability.hyeonworks.com/enabled=true and the rule has observability.hyeonworks.com/instance=home. They now point their runbook_url at the backup README and are applied with the ScheduledBackup. Renaming them to dodge the filter was rejected: it would keep backup rules inside a scope that excludes them on purpose. Verification: test-platform-disk-alerts.sh loads both rule files and passes; promtool checks 13 rules. render-observability-core.sh and test-render-observability-core.sh pass, and kubectl apply --dry-run=server accepts the backup kustomization with the rule. scan-platform-sensitive-source.sh stops at its observability-core renderer with RC=23 here and on an origin/main snapshot alike, so it says nothing about this change. Fixes:f19ce54740("feat(postgres): back up platform-postgres to AIStor every day")
This commit is contained in:
@@ -8,6 +8,7 @@ kind: Kustomization
|
||||
resources:
|
||||
- object-storage-counterpart.yaml
|
||||
- scheduled-backup.yaml
|
||||
- prometheus-rule.yaml
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
|
||||
Reference in New Issue
Block a user