mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Support timeout in watch requests
This commit is contained in:
@@ -67,7 +67,8 @@ func NewPersistentVolumeRecycler(kubeClient client.Interface, syncPeriod time.Du
|
||||
return kubeClient.PersistentVolumes().List(labels.Everything(), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(resourceVersion string) (watch.Interface, error) {
|
||||
return kubeClient.PersistentVolumes().Watch(labels.Everything(), fields.Everything(), resourceVersion)
|
||||
options := api.ListOptions{ResourceVersion: resourceVersion}
|
||||
return kubeClient.PersistentVolumes().Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
&api.PersistentVolume{},
|
||||
|
||||
Reference in New Issue
Block a user