mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Simplify Watch() signature in clients.
This commit is contained in:
@@ -67,7 +67,7 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) *
|
||||
return e.client.ServiceAccounts(api.NamespaceAll).List(labels.Everything(), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
return e.client.ServiceAccounts(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
|
||||
return e.client.ServiceAccounts(api.NamespaceAll).Watch(options)
|
||||
},
|
||||
},
|
||||
&api.ServiceAccount{},
|
||||
@@ -87,7 +87,8 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) *
|
||||
return e.client.Secrets(api.NamespaceAll).List(labels.Everything(), tokenSelector)
|
||||
},
|
||||
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
return e.client.Secrets(api.NamespaceAll).Watch(labels.Everything(), tokenSelector, options)
|
||||
options.FieldSelector.Selector = tokenSelector
|
||||
return e.client.Secrets(api.NamespaceAll).Watch(options)
|
||||
},
|
||||
},
|
||||
&api.Secret{},
|
||||
|
||||
Reference in New Issue
Block a user