Skip to content

Commit cf00170

Browse files
committed
store: fix missing cluster-scoped resources
Signed-off-by: Damien Grisonnet <[email protected]>
1 parent 023f83d commit cf00170

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

internal/store/clusterrolebinding.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,12 @@ func clusterRoleBindingMetricFamilies(allowAnnotationsList, allowLabelsList []st
140140
}
141141
}
142142

143-
func createClusterRoleBindingListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher {
143+
func createClusterRoleBindingListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher {
144144
return &cache.ListWatch{
145145
ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) {
146-
opts.FieldSelector = fieldSelector
147146
return kubeClient.RbacV1().ClusterRoleBindings().List(context.TODO(), opts)
148147
},
149148
WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) {
150-
opts.FieldSelector = fieldSelector
151149
return kubeClient.RbacV1().ClusterRoleBindings().Watch(context.TODO(), opts)
152150
},
153151
}

internal/store/ingressclass.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,12 @@ func wrapIngressClassFunc(f func(*networkingv1.IngressClass) *metric.Family) fun
134134
}
135135
}
136136

137-
func createIngressClassListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher {
137+
func createIngressClassListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher {
138138
return &cache.ListWatch{
139139
ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) {
140-
opts.FieldSelector = fieldSelector
141140
return kubeClient.NetworkingV1().IngressClasses().List(context.TODO(), opts)
142141
},
143142
WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) {
144-
opts.FieldSelector = fieldSelector
145143
return kubeClient.NetworkingV1().IngressClasses().Watch(context.TODO(), opts)
146144
},
147145
}

internal/store/storageclass.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,12 @@ func wrapStorageClassFunc(f func(*storagev1.StorageClass) *metric.Family) func(i
146146
}
147147
}
148148

149-
func createStorageClassListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher {
149+
func createStorageClassListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher {
150150
return &cache.ListWatch{
151151
ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) {
152-
opts.FieldSelector = fieldSelector
153152
return kubeClient.StorageV1().StorageClasses().List(context.TODO(), opts)
154153
},
155154
WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) {
156-
opts.FieldSelector = fieldSelector
157155
return kubeClient.StorageV1().StorageClasses().Watch(context.TODO(), opts)
158156
},
159157
}

0 commit comments

Comments
 (0)