The control loop for the PodController has a lot of cases with multiple tickers that can fire. Some of the ticker case statements could take seconds to run under very heavy loads and there are two tickers that run frequently (controlTicker and statusTicker) If one of the cases blocks is slow to run, that case could run repeatedly, starving other cases from running. That would be bad.
Lets switch to using Timers instead of tickers and reset the timer at the end of each case. For a sample of using Timers instead of Tickers, check virtual-kubelet's NodeController.controlLoop
The control loop for the PodController has a lot of cases with multiple tickers that can fire. Some of the ticker case statements could take seconds to run under very heavy loads and there are two tickers that run frequently (
controlTicker
andstatusTicker
) If one of the cases blocks is slow to run, that case could run repeatedly, starving other cases from running. That would be bad.Lets switch to using Timers instead of tickers and reset the timer at the end of each case. For a sample of using Timers instead of Tickers, check virtual-kubelet's
NodeController.controlLoop