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 ac4bf265 [horus] Restore node working configuration (#343)
ac4bf265 is described below

commit ac4bf265a347b8e1e856cc58c5cf8ba35c37f3e3
Author: mfordjody <[email protected]>
AuthorDate: Fri Sep 13 17:02:02 2024 +0800

    [horus] Restore node working configuration (#343)
---
 app/horus/basic/config/file.go | 10 +++++++++-
 app/horus/basic/db/db.go       |  2 ++
 deploy/horus/horus.yaml        | 11 ++++++++++-
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/app/horus/basic/config/file.go b/app/horus/basic/config/file.go
index d0ae3e6d..a2cb904f 100644
--- a/app/horus/basic/config/file.go
+++ b/app/horus/basic/config/file.go
@@ -17,12 +17,13 @@ package config
 
 type Config struct {
        Address        string                 `yaml:"address"`
+       KubeTimeSecond int64                  `yaml:"kubeTimeSecond"`
        Mysql          *MysqlConfiguration    `yaml:"mysql"`
        DingTalk       *DingTalkConfiguration `yaml:"dingTalk"`
        Slack          *SlackConfiguration    `yaml:"slack"`
        KubeMultiple   map[string]string      `yaml:"kubeMultiple"`
        PromMultiple   map[string]string      `yaml:"promMultiple"`
-       KubeTimeSecond int64
+       NodeRecovery   *RecoveryConfiguration `yaml:"nodeRecovery"`
 }
 
 type MysqlConfiguration struct {
@@ -40,3 +41,10 @@ type DingTalkConfiguration struct {
 type SlackConfiguration struct {
        WebhookUrl string `yaml:"webhookUrl"`
 }
+
+type RecoveryConfiguration struct {
+       DayNumber           int                    `yaml:"dayNumber"`
+       CheckIntervalSecond int                    `yaml:"checkIntervalSecond"`
+       PromQueryTimeSecond int                    `yaml:"promQueryTimeSecond"`
+       DingTalk            *DingTalkConfiguration `yaml:"dingTalk"`
+}
diff --git a/app/horus/basic/db/db.go b/app/horus/basic/db/db.go
index 6b58f72d..9c3a96a5 100644
--- a/app/horus/basic/db/db.go
+++ b/app/horus/basic/db/db.go
@@ -39,6 +39,8 @@ type NodeDataInfo struct {
        LastDate        string `json:"lastDate"`
        CreateTime      string `json:"createTime" xorm:"createTime created"`
        UpdateTime      string `json:"updateTime" xorm:"updateTime updated"`
+       RecoveryMark    int64  `json:"recoveryMark"`
+       RecoveryQL      string `json:"recoveryQL"`
 }
 
 type PodDataInfo struct {
diff --git a/deploy/horus/horus.yaml b/deploy/horus/horus.yaml
index adcc5613..56d41ece 100644
--- a/deploy/horus/horus.yaml
+++ b/deploy/horus/horus.yaml
@@ -33,4 +33,13 @@ slack:
   payload: ~
 
 kubeMultiple:
-  cluster: config.1
\ No newline at end of file
+  cluster: config.1
+
+nodeRecovery:
+  dayNumber: 1
+  checkIntervalSecond: 60
+  promQueryTimeSecond: 5
+  dingTalk:
+    webhookUrl: ~
+    title: ~
+    atMobiles: ~
\ No newline at end of file

Reply via email to