mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Support timeout in watch requests
This commit is contained in:
@@ -167,7 +167,8 @@ func NewNodeController(
|
||||
return nc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
return nc.kubeClient.Pods(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), rv)
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
return nc.kubeClient.Pods(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
&api.Pod{},
|
||||
@@ -183,7 +184,8 @@ func NewNodeController(
|
||||
return nc.kubeClient.Nodes().List(labels.Everything(), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
return nc.kubeClient.Nodes().Watch(labels.Everything(), fields.Everything(), rv)
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
return nc.kubeClient.Nodes().Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
&api.Node{},
|
||||
|
||||
Reference in New Issue
Block a user