From eeb97208facd1e583d969cca32761797a1916f55 Mon Sep 17 00:00:00 2001 From: Keith Jackson Date: Fri, 21 Aug 2026 22:30:01 -0500 Subject: [PATCH] fix(monitoring): move PrometheusRule alerts to platform-config (CRD ordering) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enabling monitoring deadlocked the platform Kustomization: alerts.yaml ships PrometheusRule CRs whose monitoring.coreos.com CRDs are installed by the kube-prometheus-stack HelmRelease in the SAME pass → 'no matches for kind PrometheusRule' → atomic apply failure → NO monitoring HelmReleases created. Same controllers/configs fix as cert-manager/kyverno: drop alerts.yaml from platform/monitoring and apply it via platform-config (dependsOn platform), so the monitoring CRDs exist first. Verified: platform has 0 PrometheusRule (keeps the 3 monitoring HRs); platform-config has the 8 alert rules; gate PASS. Co-Authored-By: Claude Opus 4.8 (1M context) --- platform-config/kustomization.yaml | 2 ++ platform/monitoring/kustomization.yaml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/platform-config/kustomization.yaml b/platform-config/kustomization.yaml index 75b474e..d2a02a4 100644 --- a/platform-config/kustomization.yaml +++ b/platform-config/kustomization.yaml @@ -29,3 +29,5 @@ resources: # cilium: L2 LB IP pool + announcement policy (cilium.io CRDs already registered by Cilium) - cilium/l2-ip-pool.yaml - cilium/l2-announcement-policy.yaml + # monitoring: PrometheusRule alert rules (need monitoring.coreos.com CRDs from kube-prometheus-stack) + - ../platform/monitoring/alerts.yaml diff --git a/platform/monitoring/kustomization.yaml b/platform/monitoring/kustomization.yaml index 11ec3ce..5a573be 100644 --- a/platform/monitoring/kustomization.yaml +++ b/platform/monitoring/kustomization.yaml @@ -7,6 +7,8 @@ resources: - kube-prometheus-stack.yaml - loki.yaml - alloy.yaml - - alerts.yaml + # NOTE: alerts.yaml (PrometheusRule CRs) needs the monitoring.coreos.com CRDs that the + # kube-prometheus-stack HelmRelease above installs → applied by the platform-config Kustomization + # (dependsOn platform) so the CRDs exist first. File stays here for locality. - grafana-admin-credentials.sops.yaml - alertmanager-smtp.sops.yaml