Skip to content

Commit

Permalink
[horus] Restore node working configuration (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfordjody committed Sep 13, 2024
1 parent 5e5f3eb commit ac4bf26
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app/horus/basic/config/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"`
}
2 changes: 2 additions & 0 deletions app/horus/basic/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
11 changes: 10 additions & 1 deletion deploy/horus/horus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,13 @@ slack:
payload: ~

kubeMultiple:
cluster: config.1
cluster: config.1

nodeRecovery:
dayNumber: 1
checkIntervalSecond: 60
promQueryTimeSecond: 5
dingTalk:
webhookUrl: ~
title: ~
atMobiles: ~

0 comments on commit ac4bf26

Please sign in to comment.