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 b8edeeb5 [horus] Modify the naming (#377)
b8edeeb5 is described below

commit b8edeeb56a8e069521442ab7d7fdb95e849e07ae
Author: mfordjody <[email protected]>
AuthorDate: Wed Sep 25 08:49:49 2024 +0800

    [horus] Modify the naming (#377)
---
 app/horus/basic/config/file.go     | 18 +++++++++---------
 app/horus/core/horuser/downtime.go |  6 +++---
 app/horus/core/horuser/recovery.go |  2 +-
 app/horus/core/horuser/restart.go  |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/app/horus/basic/config/file.go b/app/horus/basic/config/file.go
index 8706ffc4..48e47361 100644
--- a/app/horus/basic/config/file.go
+++ b/app/horus/basic/config/file.go
@@ -48,7 +48,7 @@ type SlackConfiguration struct {
 type RecoveryConfiguration struct {
        Enabled             bool                   `yaml:"enabled"`
        DayNumber           int                    `yaml:"dayNumber"`
-       CheckIntervalSecond int                    `yaml:"checkIntervalSecond"`
+       IntervalSecond      int                    `yaml:"intervalSecond"`
        PromQueryTimeSecond int64                  `yaml:"promQueryTimeSecond"`
        DingTalk            *DingTalkConfiguration `yaml:"dingTalk"`
        Slack               *SlackConfiguration    `yaml:"slack"`
@@ -68,7 +68,7 @@ type ModularConfiguration struct {
 
 type DowntimeConfiguration struct {
        Enabled             bool                   `yaml:"enabled"`
-       CheckIntervalSecond int                    `yaml:"checkIntervalSecond"`
+       IntervalSecond      int                    `yaml:"intervalSecond"`
        PromQueryTimeSecond int64                  `yaml:"promQueryTimeSecond"`
        KubeMultiple        map[string]string      `yaml:"kubeMultiple"`
        AbnormalityQL       []string               `yaml:"abnormalityQL"`
@@ -77,11 +77,11 @@ type DowntimeConfiguration struct {
 }
 
 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"`
+       Enabled        bool                   `yaml:"enabled"`
+       IntervalSecond int                    `yaml:"intervalSecond"`
+       DoubleSecond   int                    `yaml:"doubleSecond"`
+       LabelSelector  string                 `yaml:"labelSelector"`
+       FieldSelector  string                 `yaml:"fieldSelector"`
+       KubeMultiple   map[string]string      `yaml:"kubeMultiple"`
+       DingTalk       *DingTalkConfiguration `yaml:"dingTalk"`
 }
diff --git a/app/horus/core/horuser/downtime.go 
b/app/horus/core/horuser/downtime.go
index 16b1e7b4..199d7a92 100644
--- a/app/horus/core/horuser/downtime.go
+++ b/app/horus/core/horuser/downtime.go
@@ -32,7 +32,7 @@ const (
 )
 
 func (h *Horuser) DownTimeManager(ctx context.Context) error {
-       go wait.UntilWithContext(ctx, h.DownTimeCheck, 
time.Duration(h.cc.NodeDownTime.CheckIntervalSecond)*time.Second)
+       go wait.UntilWithContext(ctx, h.DownTimeCheck, 
time.Duration(h.cc.NodeDownTime.IntervalSecond)*time.Second)
        <-ctx.Done()
        return nil
 }
@@ -137,9 +137,9 @@ func (h *Horuser) DownTimeNodes(clusterName, addr string) {
                write.FirstDate = today
                _, err = write.Add()
                if err != nil {
-                       klog.Errorf("NodeDownTimeCheckOnCluster abnormal 
cordonNode AddOrGetOne err:%v", err)
+                       klog.Errorf("DownTimeNodes abnormal cordonNode 
AddOrGetOne err:%v", err)
                        klog.Infof("cluster:%v node:%v", clusterName, nodeName)
                }
-               klog.Infof("NodeDownTimeCheckOnCluster abnormal cordonNode 
AddOrGetOne cluster:%v node:%v", clusterName, nodeName)
+               klog.Infof("DownTimeNodes abnormal cordonNode AddOrGetOne 
cluster:%v node:%v", clusterName, nodeName)
        }
 }
diff --git a/app/horus/core/horuser/recovery.go 
b/app/horus/core/horuser/recovery.go
index 4c4acd65..3db6c245 100644
--- a/app/horus/core/horuser/recovery.go
+++ b/app/horus/core/horuser/recovery.go
@@ -27,7 +27,7 @@ import (
 )
 
 func (h *Horuser) RecoveryManager(ctx context.Context) error {
-       go wait.UntilWithContext(ctx, h.recoveryCheck, 
time.Duration(h.cc.NodeRecovery.CheckIntervalSecond)*time.Second)
+       go wait.UntilWithContext(ctx, h.recoveryCheck, 
time.Duration(h.cc.NodeRecovery.IntervalSecond)*time.Second)
        <-ctx.Done()
        return nil
 }
diff --git a/app/horus/core/horuser/restart.go 
b/app/horus/core/horuser/restart.go
index 99f9e1c9..3feef7b1 100644
--- a/app/horus/core/horuser/restart.go
+++ b/app/horus/core/horuser/restart.go
@@ -28,7 +28,7 @@ import (
 )
 
 func (h *Horuser) DowntimeRestartManager(ctx context.Context) error {
-       go wait.UntilWithContext(ctx, h.RestartOrRepair, 
time.Duration(h.cc.NodeDownTime.CheckIntervalSecond)*time.Second)
+       go wait.UntilWithContext(ctx, h.RestartOrRepair, 
time.Duration(h.cc.NodeDownTime.IntervalSecond)*time.Second)
        <-ctx.Done()
        return nil
 }

Reply via email to