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{
116
116
}
117
117
}
118
118
119
- func createLeaseListWatch (kubeClient clientset.Interface , _ string , _ string ) cache.ListerWatcher {
119
+ func createLeaseListWatch (kubeClient clientset.Interface , ns string , fieldSelector string ) cache.ListerWatcher {
120
120
return & cache.ListWatch {
121
121
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 )
123
124
},
124
125
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 )
126
128
},
127
129
}
128
130
}
You can’t perform that action at this time.
0 commit comments