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:
@@ -185,7 +185,7 @@ func (n *NodeController) Run(ctx context.Context) error {
|
|||||||
n.statusInterval = DefaultStatusUpdateInterval
|
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.p.NotifyNodeStatus(ctx, func(node *corev1.Node) {
|
||||||
n.chStatusUpdate <- node
|
n.chStatusUpdate <- node
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user