File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,15 @@ func wrapLeaseFunc(f func(*coordinationv1.Lease) *metric.Family) func(interface{
116116 }
117117}
118118
119- func createLeaseListWatch (kubeClient clientset.Interface , _ string , _ string ) cache.ListerWatcher {
119+ func createLeaseListWatch (kubeClient clientset.Interface , ns string , fieldSelector string ) cache.ListerWatcher {
120120 return & cache.ListWatch {
121121 ListFunc : func (opts metav1.ListOptions ) (runtime.Object , error ) {
122- return kubeClient .CoordinationV1 ().Leases ("" ).List (context .TODO (), opts )
122+ opts .FieldSelector = fieldSelector
123+ return kubeClient .CoordinationV1 ().Leases (ns ).List (context .TODO (), opts )
123124 },
124125 WatchFunc : func (opts metav1.ListOptions ) (watch.Interface , error ) {
125- return kubeClient .CoordinationV1 ().Leases ("" ).Watch (context .TODO (), opts )
126+ opts .FieldSelector = fieldSelector
127+ return kubeClient .CoordinationV1 ().Leases (ns ).Watch (context .TODO (), opts )
126128 },
127129 }
128130}
You can’t perform that action at this time.
0 commit comments