mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Switch to versioned ListOptions in client.
This commit is contained in:
@@ -22,7 +22,6 @@ import (
|
||||
"time"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/client/cache"
|
||||
"k8s.io/kubernetes/pkg/client/record"
|
||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
@@ -66,12 +65,12 @@ func New(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc,
|
||||
|
||||
gcc.podStore.Store, gcc.podStoreSyncer = framework.NewInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) {
|
||||
options.FieldSelector.Selector = terminatedSelector
|
||||
ListFunc: func(options api.ListOptions) (runtime.Object, error) {
|
||||
options.FieldSelector = terminatedSelector
|
||||
return gcc.kubeClient.Pods(api.NamespaceAll).List(options)
|
||||
},
|
||||
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
options.FieldSelector.Selector = terminatedSelector
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
options.FieldSelector = terminatedSelector
|
||||
return gcc.kubeClient.Pods(api.NamespaceAll).Watch(options)
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user