feat: dfdaemon add default healthy config (#1472)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2022-07-20 18:51:52 +08:00
parent abec6d3a84
commit 96e62223b4
No known key found for this signature in database
GPG Key ID: 8B4E5D1290FA2FFB
3 changed files with 33 additions and 0 deletions

View File

@ -92,4 +92,5 @@ const (
DefaultPeerStartPort = 65000
DefaultUploadStartPort = 65002
DefaultObjectStorageStartPort = 65004
DefaultHealthyStartPort = 40901
)

View File

@ -157,6 +157,22 @@ var peerHostConfig = func() *DaemonOption {
Multiplex: false,
DiskGCThresholdPercent: 95,
},
Health: &HealthOption{
ListenOption: ListenOption{
Security: SecurityOption{
Insecure: true,
TLSVerify: false,
},
TCPListen: &TCPListenOption{
Listen: net.IPv4zero.String(),
PortRange: TCPListenPortRange{
Start: DefaultHealthyStartPort,
End: DefaultEndPort,
},
},
},
Path: "/server/ping",
},
Reload: ReloadOption{
Interval: util.Duration{
Duration: time.Minute,

View File

@ -156,6 +156,22 @@ var peerHostConfig = func() *DaemonOption {
Multiplex: false,
DiskGCThresholdPercent: 95,
},
Health: &HealthOption{
ListenOption: ListenOption{
Security: SecurityOption{
Insecure: true,
TLSVerify: false,
},
TCPListen: &TCPListenOption{
Listen: net.IPv4zero.String(),
PortRange: TCPListenPortRange{
Start: DefaultHealthyStartPort,
End: DefaultEndPort,
},
},
},
Path: "/server/ping",
},
Reload: ReloadOption{
Interval: util.Duration{
Duration: time.Minute,