Convert core code to metav1.ListOptions

This commit is contained in:
Clayton Coleman
2017-01-21 19:05:19 -05:00
parent a35be4e02e
commit 245b592fac
12 changed files with 40 additions and 37 deletions

View File

@@ -122,11 +122,11 @@ func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, erro
}
lw := &cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(v1.SecretTypeServiceAccountToken)}).String()
return b.CoreClient.Secrets(b.Namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(v1.SecretTypeServiceAccountToken)}).String()
return b.CoreClient.Secrets(b.Namespace).Watch(options)
},