mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-02-14 18:09:57 +00:00
Merge pull request #864 from linxiulei/node_cache
Get Node object from APIServer cache
This commit is contained in:
@@ -130,7 +130,9 @@ func (c *nodeProblemClient) Eventf(eventType, source, reason, messageFmt string,
|
||||
}
|
||||
|
||||
func (c *nodeProblemClient) GetNode(ctx context.Context) (*v1.Node, error) {
|
||||
return c.client.Nodes().Get(ctx, c.nodeName, metav1.GetOptions{})
|
||||
// To reduce the load on APIServer & etcd, we are serving GET operations from
|
||||
// apiserver cache (the data might be slightly delayed).
|
||||
return c.client.Nodes().Get(ctx, c.nodeName, metav1.GetOptions{ResourceVersion: "0"})
|
||||
}
|
||||
|
||||
// generatePatch generates condition patch
|
||||
|
||||
Reference in New Issue
Block a user