Make node status updates non-blocking

There's a (somewhat) common case we can get into where the node
status update loop is busy while a provider is trying to send
a node status update. Right now, we block the provider from
creating a notification in this case.
This commit is contained in:
Sargun Dhillon
2020-07-01 12:31:17 -07:00
parent bd977cb224
commit 1e8c16877d

View File

@@ -185,7 +185,7 @@ func (n *NodeController) Run(ctx context.Context) error {
n.statusInterval = DefaultStatusUpdateInterval
}
n.chStatusUpdate = make(chan *corev1.Node)
n.chStatusUpdate = make(chan *corev1.Node, 1)
n.p.NotifyNodeStatus(ctx, func(node *corev1.Node) {
n.chStatusUpdate <- node
})