This is an automated email from the ASF dual-hosted git repository.

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new e0dc1bd6 [horus] pod Anomaly cleanup preliminaries (#373)
e0dc1bd6 is described below

commit e0dc1bd613c410dbee165a8762c81036d0348d7b
Author: mfordjody <[email protected]>
AuthorDate: Tue Sep 24 12:12:58 2024 +0800

    [horus] pod Anomaly cleanup preliminaries (#373)
---
 app/horus/basic/config/file.go | 11 +++++++++++
 deploy/horus/horus.yaml        | 14 ++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/app/horus/basic/config/file.go b/app/horus/basic/config/file.go
index d5c52fc6..2cef8000 100644
--- a/app/horus/basic/config/file.go
+++ b/app/horus/basic/config/file.go
@@ -26,6 +26,7 @@ type Config struct {
        NodeRecovery   *RecoveryConfiguration `yaml:"nodeRecovery"`
        CustomModular  *ModularConfiguration  `yaml:"customModular"`
        NodeDownTime   *DowntimeConfiguration `yaml:"nodeDownTime"`
+       PodAbnormal    *AbnormalConfiguration `yaml:"podAbnormal"`
 }
 
 type MysqlConfiguration struct {
@@ -74,3 +75,13 @@ type DowntimeConfiguration struct {
        NodeNameToIPs       string                 `yaml:"nodeNameToIPs"`
        DingTalk            *DingTalkConfiguration `yaml:"dingTalk"`
 }
+
+type AbnormalConfiguration struct {
+       Enabled             bool                   `yaml:"enabled"`
+       CheckIntervalSecond int                    `yaml:"checkIntervalSecond"`
+       CheckDoubleSecond   int                    `yaml:"checkDoubleSecond"`
+       LabelSelector       string                 `yaml:"labelSelector"`
+       FieldSelector       string                 `yaml:"fieldSelector"`
+       KubeMultiple        map[string]string      `yaml:"kubeMultiple"`
+       DingTalk            *DingTalkConfiguration `yaml:"dingTalk"`
+}
diff --git a/deploy/horus/horus.yaml b/deploy/horus/horus.yaml
index 95c6c385..cf0af232 100644
--- a/deploy/horus/horus.yaml
+++ b/deploy/horus/horus.yaml
@@ -82,6 +82,20 @@ nodeDownTime:
     - node_cpu_guest_seconds_total
   nodeNameToIPs:
     node_os_info{node="%s"}
+  kubeMultiple:
+    cluster: config.1
+  dingTalk:
+    webhookUrl: 
"https://oapi.dingtalk.com/robot/send?access_token=37f8891e60e524013275cc01efafdb5976b81ef7269ce271b769bcd025826c12";
+    title: "horus 通知"
+    atMobiles:
+      - 15000000
+
+podAbnormal:
+  enabled: false
+  checkIntervalSecond:5
+  checkDoubleSecond: 10
+  labelSelector: "app.kubernetes.io/name=horus"
+  fieldSelector: "status.phase != Running"
   kubeMultiple:
     cluster: config.1
   dingTalk:

Reply via email to