避免 OCI HelmRepository 无 Ready 条件误报 (#161)
yaml / yaml (push) Successful in 43s

Co-authored-by: panxiao81 <[email protected]>
This commit was merged in pull request #161.
This commit is contained in:
2026-09-25 19:39:47 +00:00
committed by panxiao81
parent b75043cb45
commit 655ca567ba
3 changed files with 13 additions and 1 deletions
@@ -198,6 +198,9 @@ spec:
- conditions
- '[type=Ready]'
- status
repository_type:
- spec
- type
- groupVersionKind:
group: source.toolkit.fluxcd.io
version: v1
@@ -140,7 +140,7 @@ spec:
description: 检查 OpenBao 可达性与 ESO 身份鉴权;可能影响多个命名空间。
runbook_url: https://git.ddupan.top/panxiao81/homelab-wiki/src/branch/main/guides/monitoring-controllers.md
- alert: FluxResourceNotReady
expr: gotk_resource_info{job="kube-state-metrics",ready!="True",suspended!="true"}
expr: gotk_resource_info{job="kube-state-metrics",ready!="True",suspended!="true",repository_type!="oci"}
== 1
for: 15m
labels:
@@ -174,3 +174,12 @@ tests:
summary: Flux 对象状态指标缺失
description: 检查 kube-state-metrics 自定义资源配置、RBAC 与采集;不能把空结果当作健康。
runbook_url: https://git.ddupan.top/panxiao81/homelab-wiki/src/branch/main/guides/monitoring-controllers.md
- name: OCI HelmRepository 没有 Ready 条件仍不误报
interval: 1m
input_series:
- series: gotk_resource_info{job="kube-state-metrics",customresource_kind="HelmRepository",repository_type="oci",name="envoy-gateway"}
values: 1x30
alert_rule_test:
- eval_time: 20m
alertname: FluxResourceNotReady
exp_alerts: []