Browse Source

Add heartbeat interval and election timeout

pull/1770/head
galal-hussein 5 years ago committed by Darren Shepherd
parent
commit
c580a8b528
  1. 2
      pkg/daemons/executor/executor.go
  2. 2
      pkg/etcd/etcd.go

2
pkg/daemons/executor/executor.go

@ -38,6 +38,8 @@ type ETCDConfig struct {
ServerTrust ServerTrust `json:"client-transport-security"`
PeerTrust PeerTrust `json:"peer-transport-security"`
ForceNewCluster bool `json:"force-new-cluster,omitempty"`
HeartbeatInterval int `json:"heartbeat-interval"`
ElectionTimeout int `json:"election-timeout"`
}
type ServerTrust struct {

2
pkg/etcd/etcd.go

@ -389,6 +389,8 @@ func (e *ETCD) cluster(ctx context.Context, forceNew bool, options executor.Init
ClientCertAuth: true,
TrustedCAFile: e.config.Runtime.ETCDPeerCA,
},
ElectionTimeout: 5000,
HeartbeatInterval: 500,
})
}

Loading…
Cancel
Save