In NodeKiller.Run, wait before first attempt to kill.

This commit is contained in:
Maciej Borsz 2018-11-30 11:01:55 +01:00
parent 25c9ac6544
commit 1d9b1a69b1

View File

@ -349,6 +349,8 @@ func NewNodeKiller(config NodeKillerConfig, client clientset.Interface, provider
// Run starts NodeKiller until stopCh is closed.
func (k *NodeKiller) Run(stopCh <-chan struct{}) {
// wait.JitterUntil starts work immediately, so wait first.
time.Sleep(wait.Jitter(k.config.Interval, k.config.JitterFactor))
wait.JitterUntil(func() {
nodes := k.pickNodes()
k.kill(nodes)