Commit Graph

4 Commits

Author SHA1 Message Date
Your Name
dc18b0ebd6 fix(prometheus_url): drift 殘存追修 — kured 守門員 + monitoring API
debugger 全 codebase 追根溯源後揪出 5 處 PROMETHEUS_URL drift 殘存
(根因:docs/reference/SERVICE-ENDPOINTS.md 早期把 Prometheus 標在 188
是整個 codebase drift 的源頭)。

本次修最急的 2 處:

## 🔴🔴 kured.yaml:132(守門員失效風險)
- 188 → 110
- kured 跑 reboot 前會查 Prometheus alerts,連錯主機 = 跳過保護直接 reboot 主機
- 對齊 ConfigMap + config.py PROMETHEUS_URL

## 🟡 monitoring.py:67(單一事實源)
- 寫死 110:9090 改用 settings.PROMETHEUS_URL
- 主機巧合正確但繞過 ConfigMap 注入機制
- 未來 Prometheus 再遷移避免再次 drift

## 暫不修
- k3s_monitor_service.py:38 用 121:30090 是 K3s NodePort 內網端點
  與外部 PROMETHEUS_URL 概念不同,需新增 PROMETHEUS_INTERNAL_URL setting
- 其他 docstring + 文件 drift(SERVICE-ENDPOINTS.md 等)留待後續

## 驗證
1552 unit tests 全綠(無回歸)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 10:44:39 +08:00
OG T
bcbb386ee4 fix(kured): 修復 CrashLoopBackOff - 新增 ds-namespace/ds-name 參數
問題: Kured 預設在 kube-system 尋找 DaemonSet
修復: 新增 --ds-namespace=kured --ds-name=kured

驗證: 2/2 pods Running

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-28 22:53:21 +08:00
OG T
0b68352fc2 feat(k3s): P2/P3 改進 - kube-state-metrics + Kured 時區修復 + Descheduler 調整
P2 改進:
- 新增 kube-state-metrics v2.10.1 (NodePort:30888)
- 新增 7 條 kube-state-metrics 告警規則 (NPD 整合)

P3 改進:
- 修復 Kured 維護窗口時區 (18:00→02:00 台北時間)
- Descheduler threshold 20%→30% (避免過度遷移)

首席架構師審查建議執行項目

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-28 22:23:42 +08:00
OG T
c6bef20a97 feat(k4.1): Kured automatic node reboot daemon
- Deploy Kured v1.15.1 as DaemonSet
- Maintenance window: 02:00-04:00 Taipei time
- Reboot period: 1 hour between node reboots
- PDB-aware: checks AWOOOI pods before draining
- Prometheus integration for metrics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-28 22:03:05 +08:00