From 1e8c16877d1d32cd39403332513a20e8d3d94ae7 Mon Sep 17 00:00:00 2001 From: Sargun Dhillon Date: Wed, 1 Jul 2020 12:31:17 -0700 Subject: [PATCH] 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. --- node/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/node.go b/node/node.go index 702be8f21..e7a20b091 100644 --- a/node/node.go +++ b/node/node.go @@ -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 })