fix(observability): persist Kubernetes events through OTLP

This commit is contained in:
ogt
2026-07-14 20:16:42 +08:00
parent ec85a3514a
commit fefe810df4
3 changed files with 165 additions and 37 deletions

View File

@@ -5,14 +5,17 @@
- 以 `P0-OBS-001-20260714T191800+0800` 進行受控修復:`.110` 只重建 stateless `signoz-otel-collector`,改用已驗證的 static configSigNoz UI、ClickHouse、Zookeeper 的 container ID 與啟動時間未變。
- 新增 `.188:24318 -> .110:4318` 暫時相容橋接,僅允許 `.120/.121` 來源,具備 check / apply / status / rollback 與 `2026-08-15` 到期日。
- K3s OTEL DaemonSet 新增 `file_storage`、filelog offset 持久化、exporter WAL、`queue_size=10000`、無限時 retry、60 秒 termination grace 與逐節點 rolling update。
- Event Exporter 新增最小化 metadata-only RBAC僅允許 `get` 事件引用的 Pod、Deployment、ReplicaSet、DaemonSet、Job、CronJob 與 Argo Application明確不授權 Secret / ConfigMap 或任何寫入動作。
- 修正 Event Exporter 的 durable write 缺口:舊平面 webhook JSON 雖收到 OTLP HTTP `200`,實際未產生 log現改為標準 OTLP JSON envelope 與單一 receiver避免未列出的 Normal 事件重複送出。
- 將現行 `0.96.0` image 由 K3s cache 直接匯入 Harbor未對外下載production 已 pin 至 `192.168.0.110:5000/awoooi/otel-collector-contrib@sha256:8edf386c...`
- 新增獨立 ingestion verifier以同一 run 綁定 K3s queue、`.188` bridge、`.110` listener 與 ClickHouse exact-marker 讀回。
**已跑驗證**
- 精準 pytest`7 passed`;三支 shell 的 `bash -n``git diff --check` 通過。
- 精準 pytest`11 passed`;三支 shell 的 `bash -n``git diff --check` 通過。
- `kubectl apply --dry-run=server`、exact live digest `file_storage` canary、Harbor digest pull canary 全數通過canary 顯示 `Extension started: file_storage``Initializing new persistent queue``Everything is ready`
- DaemonSet generation `4 -> 5` 完成逐節點 rollout兩個 collector 均 `Ready``restarts=0`、queue capacity `10000`、queue size `0`
- Synthetic OTLP 從 `.120 -> .188:24318 -> .110:4318 -> signoz_logs.logs_v2` 回讀 exact count `1`verifier terminal 為 `queue_zero_failure_deltas_zero_window_15s`,兩個 production collector 後續連續超過 11 分鐘 exporter error `0`、queue `0`、send-failed `0`
- `P0-OBS-001-20260714T201500+0800-event-otlp-layout` synthetic Kubernetes Warning Event 在 ClickHouse 回讀 exact body `1`、結構化 reason / service attributes `1`;新 Pod `Ready=true``restarts=0`、metadata forbidden `0`、webhook delivery error `0`
**仍維持**
- `setupCompleted=false` 與 SigNoz organization 未初始化仍是治理缺口static override 與 `.188` 橋接是可回滾、有到期日的暫時控制,不是 Foundry 遷移完成。