Commit 5da52558 authored by Wojciech Tyczynski's avatar Wojciech Tyczynski

Fix watch with RV=0 in Kubelet.

parent 50d80511
...@@ -208,11 +208,7 @@ func NewMainKubelet( ...@@ -208,11 +208,7 @@ func NewMainKubelet(
fieldSelector := fields.Set{client.ObjectNameField: nodeName}.AsSelector() fieldSelector := fields.Set{client.ObjectNameField: nodeName}.AsSelector()
listWatch := &cache.ListWatch{ listWatch := &cache.ListWatch{
ListFunc: func() (runtime.Object, error) { ListFunc: func() (runtime.Object, error) {
obj, err := kubeClient.Nodes().Get(nodeName) return kubeClient.Nodes().List(labels.Everything(), fieldSelector)
if err != nil {
return nil, err
}
return &api.NodeList{Items: []api.Node{*obj}}, nil
}, },
WatchFunc: func(resourceVersion string) (watch.Interface, error) { WatchFunc: func(resourceVersion string) (watch.Interface, error) {
return kubeClient.Nodes().Watch(labels.Everything(), fieldSelector, resourceVersion) return kubeClient.Nodes().Watch(labels.Everything(), fieldSelector, resourceVersion)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment