diff --git a/cmd/kube-aggregator/pkg/apiserver/BUILD b/cmd/kube-aggregator/pkg/apiserver/BUILD index 3ab0f6055a4d..844f12c9628b 100644 --- a/cmd/kube-aggregator/pkg/apiserver/BUILD +++ b/cmd/kube-aggregator/pkg/apiserver/BUILD @@ -20,8 +20,6 @@ go_test( "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/listers/core/v1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/equality", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", @@ -29,6 +27,8 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/client-go/listers/core/v1", + "//vendor:k8s.io/client-go/pkg/api/v1", "//vendor:k8s.io/client-go/tools/cache", ], ) @@ -51,9 +51,6 @@ go_library( "//cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion:go_default_library", "//cmd/kube-aggregator/pkg/registry/apiservice/etcd:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/informers/informers_generated/externalversions:go_default_library", - "//pkg/client/listers/core/v1:go_default_library", "//pkg/controller:go_default_library", "//pkg/version:go_default_library", "//vendor:github.com/golang/glog", @@ -71,6 +68,9 @@ go_library( "//vendor:k8s.io/apiserver/pkg/registry/rest", "//vendor:k8s.io/apiserver/pkg/server", "//vendor:k8s.io/apiserver/pkg/server/filters", + "//vendor:k8s.io/client-go/informers", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/core/v1", "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/cache", "//vendor:k8s.io/client-go/transport", diff --git a/cmd/kube-aggregator/pkg/apiserver/apiserver.go b/cmd/kube-aggregator/pkg/apiserver/apiserver.go index c28a962afc30..a260d22e0c3c 100644 --- a/cmd/kube-aggregator/pkg/apiserver/apiserver.go +++ b/cmd/kube-aggregator/pkg/apiserver/apiserver.go @@ -27,10 +27,10 @@ import ( "k8s.io/apiserver/pkg/registry/rest" genericapiserver "k8s.io/apiserver/pkg/server" genericfilters "k8s.io/apiserver/pkg/server/filters" + kubeinformers "k8s.io/client-go/informers" + kubeclientset "k8s.io/client-go/kubernetes" + v1listers "k8s.io/client-go/listers/core/v1" "k8s.io/kubernetes/pkg/api" - kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - kubeinformers "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions" - v1listers "k8s.io/kubernetes/pkg/client/listers/core/v1" "k8s.io/kubernetes/pkg/version" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" diff --git a/cmd/kube-aggregator/pkg/apiserver/handler_apis.go b/cmd/kube-aggregator/pkg/apiserver/handler_apis.go index 0f1e46b82b5c..1e83cbf211ff 100644 --- a/cmd/kube-aggregator/pkg/apiserver/handler_apis.go +++ b/cmd/kube-aggregator/pkg/apiserver/handler_apis.go @@ -25,8 +25,8 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" + v1listers "k8s.io/client-go/listers/core/v1" "k8s.io/kubernetes/pkg/api" - v1listers "k8s.io/kubernetes/pkg/client/listers/core/v1" apiregistrationapi "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" apiregistrationv1alpha1api "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" diff --git a/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go b/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go index 00c1322cacbb..e801354a6e69 100644 --- a/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go +++ b/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go @@ -27,10 +27,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" + v1listers "k8s.io/client-go/listers/core/v1" + corev1 "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/tools/cache" "k8s.io/kubernetes/pkg/api" - corev1 "k8s.io/kubernetes/pkg/api/v1" - v1listers "k8s.io/kubernetes/pkg/client/listers/core/v1" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" listers "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion" diff --git a/cmd/kube-aggregator/pkg/cmd/server/BUILD b/cmd/kube-aggregator/pkg/cmd/server/BUILD index c5340e235047..1d6e2e0e430d 100644 --- a/cmd/kube-aggregator/pkg/cmd/server/BUILD +++ b/cmd/kube-aggregator/pkg/cmd/server/BUILD @@ -15,7 +15,6 @@ go_library( "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", "//cmd/kube-aggregator/pkg/apiserver:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/util/sets", @@ -23,6 +22,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/server", "//vendor:k8s.io/apiserver/pkg/server/filters", "//vendor:k8s.io/apiserver/pkg/server/options", + "//vendor:k8s.io/client-go/kubernetes", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/cmd/server/start.go b/cmd/kube-aggregator/pkg/cmd/server/start.go index b21188623b91..4776b42e3a80 100644 --- a/cmd/kube-aggregator/pkg/cmd/server/start.go +++ b/cmd/kube-aggregator/pkg/cmd/server/start.go @@ -28,10 +28,10 @@ import ( genericapiserver "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/filters" genericoptions "k8s.io/apiserver/pkg/server/options" + kubeclientset "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver" "k8s.io/kubernetes/pkg/api" - kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" diff --git a/hack/.linted_packages b/hack/.linted_packages index 0332f6ee24fd..dec1eab79e57 100644 --- a/hack/.linted_packages +++ b/hack/.linted_packages @@ -315,6 +315,40 @@ staging/src/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth staging/src/k8s.io/client-go/discovery staging/src/k8s.io/client-go/examples/in-cluster staging/src/k8s.io/client-go/examples/out-of-cluster +staging/src/k8s.io/client-go/informers +staging/src/k8s.io/client-go/informers/apps +staging/src/k8s.io/client-go/informers/apps/v1beta1 +staging/src/k8s.io/client-go/informers/autoscaling +staging/src/k8s.io/client-go/informers/autoscaling/v1 +staging/src/k8s.io/client-go/informers/autoscaling/v2alpha1 +staging/src/k8s.io/client-go/informers/batch +staging/src/k8s.io/client-go/informers/batch/v1 +staging/src/k8s.io/client-go/informers/batch/v2alpha1 +staging/src/k8s.io/client-go/informers/certificates +staging/src/k8s.io/client-go/informers/certificates/v1beta1 +staging/src/k8s.io/client-go/informers/core +staging/src/k8s.io/client-go/informers/core/v1 +staging/src/k8s.io/client-go/informers/extensions +staging/src/k8s.io/client-go/informers/extensions/v1beta1 +staging/src/k8s.io/client-go/informers/policy +staging/src/k8s.io/client-go/informers/policy/v1beta1 +staging/src/k8s.io/client-go/informers/rbac +staging/src/k8s.io/client-go/informers/rbac/v1alpha1 +staging/src/k8s.io/client-go/informers/rbac/v1beta1 +staging/src/k8s.io/client-go/informers/storage +staging/src/k8s.io/client-go/informers/storage/v1beta1 +staging/src/k8s.io/client-go/listers/apps/v1beta1 +staging/src/k8s.io/client-go/listers/autoscaling/v1 +staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1 +staging/src/k8s.io/client-go/listers/batch/v1 +staging/src/k8s.io/client-go/listers/batch/v2alpha1 +staging/src/k8s.io/client-go/listers/certificates/v1beta1 +staging/src/k8s.io/client-go/listers/core/v1 +staging/src/k8s.io/client-go/listers/extensions/v1beta1 +staging/src/k8s.io/client-go/listers/policy/v1beta1 +staging/src/k8s.io/client-go/listers/rbac/v1alpha1 +staging/src/k8s.io/client-go/listers/rbac/v1beta1 +staging/src/k8s.io/client-go/listers/storage/v1beta1 staging/src/k8s.io/client-go/plugin/pkg/client/auth staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp staging/src/k8s.io/client-go/rest/watch diff --git a/staging/copy.sh b/staging/copy.sh index 4b4f0ca6c98a..4816179dbfab 100755 --- a/staging/copy.sh +++ b/staging/copy.sh @@ -106,6 +106,7 @@ mkdir -p "${CLIENT_REPO_TEMP}/pkg/version" find "${MAIN_REPO}/pkg/version" -maxdepth 1 -type f | xargs -I{} cp {} "${CLIENT_REPO_TEMP}/pkg/version" # need to copy clientsets, though later we should copy APIs and later generate clientsets mkcp "pkg/client/clientset_generated/${CLIENTSET}" "pkg/client/clientset_generated" +mkcp "pkg/client/informers/informers_generated/externalversions" "pkg/client/informers/informers_generated" pushd "${CLIENT_REPO_TEMP}" > /dev/null echo "generating vendor/" @@ -171,6 +172,8 @@ function mvfolder { } mvfolder "pkg/client/clientset_generated/${CLIENTSET}" kubernetes +mvfolder "pkg/client/informers/informers_generated/externalversions" informers +mvfolder "pkg/client/listers" listers if [ "$(find "${CLIENT_REPO_TEMP}"/pkg/client -type f -name "*.go")" ]; then echo "${CLIENT_REPO_TEMP}/pkg/client is expected to be empty" exit 1 diff --git a/staging/src/k8s.io/client-go/informers/apps/interface.go b/staging/src/k8s.io/client-go/informers/apps/interface.go new file mode 100644 index 000000000000..e9957666a3b1 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/apps/interface.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package apps + +import ( + v1beta1 "k8s.io/client-go/informers/apps/v1beta1" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/apps/v1beta1/interface.go b/staging/src/k8s.io/client-go/informers/apps/v1beta1/interface.go new file mode 100644 index 000000000000..29fa84947d43 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/apps/v1beta1/interface.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // StatefulSets returns a StatefulSetInformer. + StatefulSets() StatefulSetInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// StatefulSets returns a StatefulSetInformer. +func (v *version) StatefulSets() StatefulSetInformer { + return &statefulSetInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/informers/apps/v1beta1/statefulset.go new file mode 100644 index 000000000000..4ee88dd611c7 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/apps/v1beta1/statefulset.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/apps/v1beta1" + apps_v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// StatefulSetInformer provides access to a shared informer and lister for +// StatefulSets. +type StatefulSetInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.StatefulSetLister +} + +type statefulSetInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newStatefulSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.AppsV1beta1().StatefulSets(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.AppsV1beta1().StatefulSets(v1.NamespaceAll).Watch(options) + }, + }, + &apps_v1beta1.StatefulSet{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *statefulSetInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&apps_v1beta1.StatefulSet{}, newStatefulSetInformer) +} + +func (f *statefulSetInformer) Lister() v1beta1.StatefulSetLister { + return v1beta1.NewStatefulSetLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/autoscaling/interface.go b/staging/src/k8s.io/client-go/informers/autoscaling/interface.go new file mode 100644 index 000000000000..02a73232b545 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/autoscaling/interface.go @@ -0,0 +1,52 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package autoscaling + +import ( + v1 "k8s.io/client-go/informers/autoscaling/v1" + v2alpha1 "k8s.io/client-go/informers/autoscaling/v2alpha1" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.Interface + // V2alpha1 provides access to shared informers for resources in V2alpha1. + V2alpha1() v2alpha1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.SharedInformerFactory) +} + +// V2alpha1 returns a new v2alpha1.Interface. +func (g *group) V2alpha1() v2alpha1.Interface { + return v2alpha1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go new file mode 100644 index 000000000000..7469a6b109ca --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/autoscaling/v1" + autoscaling_v1 "k8s.io/client-go/pkg/apis/autoscaling/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for +// HorizontalPodAutoscalers. +type HorizontalPodAutoscalerInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.HorizontalPodAutoscalerLister +} + +type horizontalPodAutoscalerInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newHorizontalPodAutoscalerInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.AutoscalingV1().HorizontalPodAutoscalers(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.AutoscalingV1().HorizontalPodAutoscalers(meta_v1.NamespaceAll).Watch(options) + }, + }, + &autoscaling_v1.HorizontalPodAutoscaler{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&autoscaling_v1.HorizontalPodAutoscaler{}, newHorizontalPodAutoscalerInformer) +} + +func (f *horizontalPodAutoscalerInformer) Lister() v1.HorizontalPodAutoscalerLister { + return v1.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/autoscaling/v1/interface.go b/staging/src/k8s.io/client-go/informers/autoscaling/v1/interface.go new file mode 100644 index 000000000000..45f4bb35a8c9 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/autoscaling/v1/interface.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer. + HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer. +func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer { + return &horizontalPodAutoscalerInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/autoscaling/v2alpha1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/informers/autoscaling/v2alpha1/horizontalpodautoscaler.go new file mode 100644 index 000000000000..81cd5eeb193f --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/autoscaling/v2alpha1/horizontalpodautoscaler.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v2alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v2alpha1 "k8s.io/client-go/listers/autoscaling/v2alpha1" + autoscaling_v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for +// HorizontalPodAutoscalers. +type HorizontalPodAutoscalerInformer interface { + Informer() cache.SharedIndexInformer + Lister() v2alpha1.HorizontalPodAutoscalerLister +} + +type horizontalPodAutoscalerInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newHorizontalPodAutoscalerInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.AutoscalingV2alpha1().HorizontalPodAutoscalers(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.AutoscalingV2alpha1().HorizontalPodAutoscalers(v1.NamespaceAll).Watch(options) + }, + }, + &autoscaling_v2alpha1.HorizontalPodAutoscaler{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&autoscaling_v2alpha1.HorizontalPodAutoscaler{}, newHorizontalPodAutoscalerInformer) +} + +func (f *horizontalPodAutoscalerInformer) Lister() v2alpha1.HorizontalPodAutoscalerLister { + return v2alpha1.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/autoscaling/v2alpha1/interface.go b/staging/src/k8s.io/client-go/informers/autoscaling/v2alpha1/interface.go new file mode 100644 index 000000000000..f334a3f52ab3 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/autoscaling/v2alpha1/interface.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v2alpha1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer. + HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer. +func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer { + return &horizontalPodAutoscalerInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/batch/interface.go b/staging/src/k8s.io/client-go/informers/batch/interface.go new file mode 100644 index 000000000000..4a75478044ff --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/batch/interface.go @@ -0,0 +1,52 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package batch + +import ( + v1 "k8s.io/client-go/informers/batch/v1" + v2alpha1 "k8s.io/client-go/informers/batch/v2alpha1" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.Interface + // V2alpha1 provides access to shared informers for resources in V2alpha1. + V2alpha1() v2alpha1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.SharedInformerFactory) +} + +// V2alpha1 returns a new v2alpha1.Interface. +func (g *group) V2alpha1() v2alpha1.Interface { + return v2alpha1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/batch/v1/interface.go b/staging/src/k8s.io/client-go/informers/batch/v1/interface.go new file mode 100644 index 000000000000..d4d7d56f624d --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/batch/v1/interface.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // Jobs returns a JobInformer. + Jobs() JobInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// Jobs returns a JobInformer. +func (v *version) Jobs() JobInformer { + return &jobInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/batch/v1/job.go b/staging/src/k8s.io/client-go/informers/batch/v1/job.go new file mode 100644 index 000000000000..c0e48c353c03 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/batch/v1/job.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/batch/v1" + batch_v1 "k8s.io/client-go/pkg/apis/batch/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// JobInformer provides access to a shared informer and lister for +// Jobs. +type JobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.JobLister +} + +type jobInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.BatchV1().Jobs(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.BatchV1().Jobs(meta_v1.NamespaceAll).Watch(options) + }, + }, + &batch_v1.Job{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *jobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&batch_v1.Job{}, newJobInformer) +} + +func (f *jobInformer) Lister() v1.JobLister { + return v1.NewJobLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go b/staging/src/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go new file mode 100644 index 000000000000..db36dbdc0924 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v2alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1" + batch_v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// CronJobInformer provides access to a shared informer and lister for +// CronJobs. +type CronJobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v2alpha1.CronJobLister +} + +type cronJobInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newCronJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.BatchV2alpha1().CronJobs(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.BatchV2alpha1().CronJobs(v1.NamespaceAll).Watch(options) + }, + }, + &batch_v2alpha1.CronJob{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *cronJobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&batch_v2alpha1.CronJob{}, newCronJobInformer) +} + +func (f *cronJobInformer) Lister() v2alpha1.CronJobLister { + return v2alpha1.NewCronJobLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/batch/v2alpha1/interface.go b/staging/src/k8s.io/client-go/informers/batch/v2alpha1/interface.go new file mode 100644 index 000000000000..48c423302f3b --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/batch/v2alpha1/interface.go @@ -0,0 +1,50 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v2alpha1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // CronJobs returns a CronJobInformer. + CronJobs() CronJobInformer + // Jobs returns a JobInformer. + Jobs() JobInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// CronJobs returns a CronJobInformer. +func (v *version) CronJobs() CronJobInformer { + return &cronJobInformer{factory: v.SharedInformerFactory} +} + +// Jobs returns a JobInformer. +func (v *version) Jobs() JobInformer { + return &jobInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/batch/v2alpha1/job.go b/staging/src/k8s.io/client-go/informers/batch/v2alpha1/job.go new file mode 100644 index 000000000000..f4fe0722796f --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/batch/v2alpha1/job.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v2alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1" + batch_v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// JobInformer provides access to a shared informer and lister for +// Jobs. +type JobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v2alpha1.JobLister +} + +type jobInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.BatchV2alpha1().Jobs(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.BatchV2alpha1().Jobs(v1.NamespaceAll).Watch(options) + }, + }, + &batch_v2alpha1.Job{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *jobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&batch_v2alpha1.Job{}, newJobInformer) +} + +func (f *jobInformer) Lister() v2alpha1.JobLister { + return v2alpha1.NewJobLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/certificates/interface.go b/staging/src/k8s.io/client-go/informers/certificates/interface.go new file mode 100644 index 000000000000..4d9f8ea50461 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/certificates/interface.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package certificates + +import ( + v1beta1 "k8s.io/client-go/informers/certificates/v1beta1" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go new file mode 100644 index 000000000000..d4a139b63506 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/certificates/v1beta1" + certificates_v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// CertificateSigningRequestInformer provides access to a shared informer and lister for +// CertificateSigningRequests. +type CertificateSigningRequestInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.CertificateSigningRequestLister +} + +type certificateSigningRequestInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newCertificateSigningRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.CertificatesV1beta1().CertificateSigningRequests().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.CertificatesV1beta1().CertificateSigningRequests().Watch(options) + }, + }, + &certificates_v1beta1.CertificateSigningRequest{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *certificateSigningRequestInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&certificates_v1beta1.CertificateSigningRequest{}, newCertificateSigningRequestInformer) +} + +func (f *certificateSigningRequestInformer) Lister() v1beta1.CertificateSigningRequestLister { + return v1beta1.NewCertificateSigningRequestLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/certificates/v1beta1/interface.go b/staging/src/k8s.io/client-go/informers/certificates/v1beta1/interface.go new file mode 100644 index 000000000000..8facec1276e3 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/certificates/v1beta1/interface.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // CertificateSigningRequests returns a CertificateSigningRequestInformer. + CertificateSigningRequests() CertificateSigningRequestInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// CertificateSigningRequests returns a CertificateSigningRequestInformer. +func (v *version) CertificateSigningRequests() CertificateSigningRequestInformer { + return &certificateSigningRequestInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/core/interface.go b/staging/src/k8s.io/client-go/informers/core/interface.go new file mode 100644 index 000000000000..f90c24851a2d --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/interface.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package core + +import ( + v1 "k8s.io/client-go/informers/core/v1" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/informers/core/v1/componentstatus.go new file mode 100644 index 000000000000..62a67d0d8c9f --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/componentstatus.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ComponentStatusInformer provides access to a shared informer and lister for +// ComponentStatuses. +type ComponentStatusInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ComponentStatusLister +} + +type componentStatusInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newComponentStatusInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ComponentStatuses().List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ComponentStatuses().Watch(options) + }, + }, + &api_v1.ComponentStatus{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *componentStatusInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.ComponentStatus{}, newComponentStatusInformer) +} + +func (f *componentStatusInformer) Lister() v1.ComponentStatusLister { + return v1.NewComponentStatusLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/configmap.go b/staging/src/k8s.io/client-go/informers/core/v1/configmap.go new file mode 100644 index 000000000000..2dc10f3a9c40 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/configmap.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ConfigMapInformer provides access to a shared informer and lister for +// ConfigMaps. +type ConfigMapInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ConfigMapLister +} + +type configMapInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newConfigMapInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ConfigMaps(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ConfigMaps(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.ConfigMap{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *configMapInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.ConfigMap{}, newConfigMapInformer) +} + +func (f *configMapInformer) Lister() v1.ConfigMapLister { + return v1.NewConfigMapLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/endpoints.go b/staging/src/k8s.io/client-go/informers/core/v1/endpoints.go new file mode 100644 index 000000000000..b0ea2bcb608c --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/endpoints.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// EndpointsInformer provides access to a shared informer and lister for +// Endpoints. +type EndpointsInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.EndpointsLister +} + +type endpointsInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newEndpointsInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Endpoints(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Endpoints(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.Endpoints{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *endpointsInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.Endpoints{}, newEndpointsInformer) +} + +func (f *endpointsInformer) Lister() v1.EndpointsLister { + return v1.NewEndpointsLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/event.go b/staging/src/k8s.io/client-go/informers/core/v1/event.go new file mode 100644 index 000000000000..bc314c425fa2 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/event.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// EventInformer provides access to a shared informer and lister for +// Events. +type EventInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.EventLister +} + +type eventInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newEventInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Events(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Events(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.Event{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *eventInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.Event{}, newEventInformer) +} + +func (f *eventInformer) Lister() v1.EventLister { + return v1.NewEventLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/interface.go b/staging/src/k8s.io/client-go/informers/core/v1/interface.go new file mode 100644 index 000000000000..5f2ff96b2cff --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/interface.go @@ -0,0 +1,148 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ComponentStatuses returns a ComponentStatusInformer. + ComponentStatuses() ComponentStatusInformer + // ConfigMaps returns a ConfigMapInformer. + ConfigMaps() ConfigMapInformer + // Endpoints returns a EndpointsInformer. + Endpoints() EndpointsInformer + // Events returns a EventInformer. + Events() EventInformer + // LimitRanges returns a LimitRangeInformer. + LimitRanges() LimitRangeInformer + // Namespaces returns a NamespaceInformer. + Namespaces() NamespaceInformer + // Nodes returns a NodeInformer. + Nodes() NodeInformer + // PersistentVolumes returns a PersistentVolumeInformer. + PersistentVolumes() PersistentVolumeInformer + // PersistentVolumeClaims returns a PersistentVolumeClaimInformer. + PersistentVolumeClaims() PersistentVolumeClaimInformer + // Pods returns a PodInformer. + Pods() PodInformer + // PodTemplates returns a PodTemplateInformer. + PodTemplates() PodTemplateInformer + // ReplicationControllers returns a ReplicationControllerInformer. + ReplicationControllers() ReplicationControllerInformer + // ResourceQuotas returns a ResourceQuotaInformer. + ResourceQuotas() ResourceQuotaInformer + // Secrets returns a SecretInformer. + Secrets() SecretInformer + // Services returns a ServiceInformer. + Services() ServiceInformer + // ServiceAccounts returns a ServiceAccountInformer. + ServiceAccounts() ServiceAccountInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// ComponentStatuses returns a ComponentStatusInformer. +func (v *version) ComponentStatuses() ComponentStatusInformer { + return &componentStatusInformer{factory: v.SharedInformerFactory} +} + +// ConfigMaps returns a ConfigMapInformer. +func (v *version) ConfigMaps() ConfigMapInformer { + return &configMapInformer{factory: v.SharedInformerFactory} +} + +// Endpoints returns a EndpointsInformer. +func (v *version) Endpoints() EndpointsInformer { + return &endpointsInformer{factory: v.SharedInformerFactory} +} + +// Events returns a EventInformer. +func (v *version) Events() EventInformer { + return &eventInformer{factory: v.SharedInformerFactory} +} + +// LimitRanges returns a LimitRangeInformer. +func (v *version) LimitRanges() LimitRangeInformer { + return &limitRangeInformer{factory: v.SharedInformerFactory} +} + +// Namespaces returns a NamespaceInformer. +func (v *version) Namespaces() NamespaceInformer { + return &namespaceInformer{factory: v.SharedInformerFactory} +} + +// Nodes returns a NodeInformer. +func (v *version) Nodes() NodeInformer { + return &nodeInformer{factory: v.SharedInformerFactory} +} + +// PersistentVolumes returns a PersistentVolumeInformer. +func (v *version) PersistentVolumes() PersistentVolumeInformer { + return &persistentVolumeInformer{factory: v.SharedInformerFactory} +} + +// PersistentVolumeClaims returns a PersistentVolumeClaimInformer. +func (v *version) PersistentVolumeClaims() PersistentVolumeClaimInformer { + return &persistentVolumeClaimInformer{factory: v.SharedInformerFactory} +} + +// Pods returns a PodInformer. +func (v *version) Pods() PodInformer { + return &podInformer{factory: v.SharedInformerFactory} +} + +// PodTemplates returns a PodTemplateInformer. +func (v *version) PodTemplates() PodTemplateInformer { + return &podTemplateInformer{factory: v.SharedInformerFactory} +} + +// ReplicationControllers returns a ReplicationControllerInformer. +func (v *version) ReplicationControllers() ReplicationControllerInformer { + return &replicationControllerInformer{factory: v.SharedInformerFactory} +} + +// ResourceQuotas returns a ResourceQuotaInformer. +func (v *version) ResourceQuotas() ResourceQuotaInformer { + return &resourceQuotaInformer{factory: v.SharedInformerFactory} +} + +// Secrets returns a SecretInformer. +func (v *version) Secrets() SecretInformer { + return &secretInformer{factory: v.SharedInformerFactory} +} + +// Services returns a ServiceInformer. +func (v *version) Services() ServiceInformer { + return &serviceInformer{factory: v.SharedInformerFactory} +} + +// ServiceAccounts returns a ServiceAccountInformer. +func (v *version) ServiceAccounts() ServiceAccountInformer { + return &serviceAccountInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/limitrange.go b/staging/src/k8s.io/client-go/informers/core/v1/limitrange.go new file mode 100644 index 000000000000..65edd82080de --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/limitrange.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// LimitRangeInformer provides access to a shared informer and lister for +// LimitRanges. +type LimitRangeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.LimitRangeLister +} + +type limitRangeInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newLimitRangeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().LimitRanges(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().LimitRanges(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.LimitRange{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *limitRangeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.LimitRange{}, newLimitRangeInformer) +} + +func (f *limitRangeInformer) Lister() v1.LimitRangeLister { + return v1.NewLimitRangeLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/namespace.go b/staging/src/k8s.io/client-go/informers/core/v1/namespace.go new file mode 100644 index 000000000000..281fd416cd1c --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/namespace.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// NamespaceInformer provides access to a shared informer and lister for +// Namespaces. +type NamespaceInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.NamespaceLister +} + +type namespaceInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newNamespaceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Namespaces().List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Namespaces().Watch(options) + }, + }, + &api_v1.Namespace{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *namespaceInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.Namespace{}, newNamespaceInformer) +} + +func (f *namespaceInformer) Lister() v1.NamespaceLister { + return v1.NewNamespaceLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/node.go b/staging/src/k8s.io/client-go/informers/core/v1/node.go new file mode 100644 index 000000000000..f66010edadf9 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/node.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// NodeInformer provides access to a shared informer and lister for +// Nodes. +type NodeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.NodeLister +} + +type nodeInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newNodeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Nodes().List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Nodes().Watch(options) + }, + }, + &api_v1.Node{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *nodeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.Node{}, newNodeInformer) +} + +func (f *nodeInformer) Lister() v1.NodeLister { + return v1.NewNodeLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/informers/core/v1/persistentvolume.go new file mode 100644 index 000000000000..3a552583fcfe --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/persistentvolume.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// PersistentVolumeInformer provides access to a shared informer and lister for +// PersistentVolumes. +type PersistentVolumeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.PersistentVolumeLister +} + +type persistentVolumeInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newPersistentVolumeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().PersistentVolumes().List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().PersistentVolumes().Watch(options) + }, + }, + &api_v1.PersistentVolume{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *persistentVolumeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.PersistentVolume{}, newPersistentVolumeInformer) +} + +func (f *persistentVolumeInformer) Lister() v1.PersistentVolumeLister { + return v1.NewPersistentVolumeLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go new file mode 100644 index 000000000000..5a79590da954 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// PersistentVolumeClaimInformer provides access to a shared informer and lister for +// PersistentVolumeClaims. +type PersistentVolumeClaimInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.PersistentVolumeClaimLister +} + +type persistentVolumeClaimInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newPersistentVolumeClaimInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().PersistentVolumeClaims(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().PersistentVolumeClaims(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.PersistentVolumeClaim{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *persistentVolumeClaimInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.PersistentVolumeClaim{}, newPersistentVolumeClaimInformer) +} + +func (f *persistentVolumeClaimInformer) Lister() v1.PersistentVolumeClaimLister { + return v1.NewPersistentVolumeClaimLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/pod.go b/staging/src/k8s.io/client-go/informers/core/v1/pod.go new file mode 100644 index 000000000000..8c58aee6d004 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/pod.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// PodInformer provides access to a shared informer and lister for +// Pods. +type PodInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.PodLister +} + +type podInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newPodInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Pods(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Pods(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.Pod{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *podInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.Pod{}, newPodInformer) +} + +func (f *podInformer) Lister() v1.PodLister { + return v1.NewPodLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/informers/core/v1/podtemplate.go new file mode 100644 index 000000000000..429906425bd7 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/podtemplate.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// PodTemplateInformer provides access to a shared informer and lister for +// PodTemplates. +type PodTemplateInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.PodTemplateLister +} + +type podTemplateInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newPodTemplateInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().PodTemplates(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().PodTemplates(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.PodTemplate{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *podTemplateInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.PodTemplate{}, newPodTemplateInformer) +} + +func (f *podTemplateInformer) Lister() v1.PodTemplateLister { + return v1.NewPodTemplateLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/informers/core/v1/replicationcontroller.go new file mode 100644 index 000000000000..e39b46de701d --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/replicationcontroller.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ReplicationControllerInformer provides access to a shared informer and lister for +// ReplicationControllers. +type ReplicationControllerInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ReplicationControllerLister +} + +type replicationControllerInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newReplicationControllerInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ReplicationControllers(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ReplicationControllers(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.ReplicationController{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *replicationControllerInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.ReplicationController{}, newReplicationControllerInformer) +} + +func (f *replicationControllerInformer) Lister() v1.ReplicationControllerLister { + return v1.NewReplicationControllerLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/informers/core/v1/resourcequota.go new file mode 100644 index 000000000000..afa1f65226ee --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/resourcequota.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ResourceQuotaInformer provides access to a shared informer and lister for +// ResourceQuotas. +type ResourceQuotaInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ResourceQuotaLister +} + +type resourceQuotaInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newResourceQuotaInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ResourceQuotas(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ResourceQuotas(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.ResourceQuota{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *resourceQuotaInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.ResourceQuota{}, newResourceQuotaInformer) +} + +func (f *resourceQuotaInformer) Lister() v1.ResourceQuotaLister { + return v1.NewResourceQuotaLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/secret.go b/staging/src/k8s.io/client-go/informers/core/v1/secret.go new file mode 100644 index 000000000000..7b8f58c9f1c0 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/secret.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// SecretInformer provides access to a shared informer and lister for +// Secrets. +type SecretInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.SecretLister +} + +type secretInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newSecretInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Secrets(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Secrets(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.Secret{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *secretInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.Secret{}, newSecretInformer) +} + +func (f *secretInformer) Lister() v1.SecretLister { + return v1.NewSecretLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/service.go b/staging/src/k8s.io/client-go/informers/core/v1/service.go new file mode 100644 index 000000000000..b20a43b47082 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/service.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ServiceInformer provides access to a shared informer and lister for +// Services. +type ServiceInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ServiceLister +} + +type serviceInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newServiceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Services(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Services(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.Service{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *serviceInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.Service{}, newServiceInformer) +} + +func (f *serviceInformer) Lister() v1.ServiceLister { + return v1.NewServiceLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/informers/core/v1/serviceaccount.go new file mode 100644 index 000000000000..911078ea2c9a --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/core/v1/serviceaccount.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/core/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ServiceAccountInformer provides access to a shared informer and lister for +// ServiceAccounts. +type ServiceAccountInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ServiceAccountLister +} + +type serviceAccountInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newServiceAccountInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ServiceAccounts(meta_v1.NamespaceAll).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ServiceAccounts(meta_v1.NamespaceAll).Watch(options) + }, + }, + &api_v1.ServiceAccount{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *serviceAccountInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&api_v1.ServiceAccount{}, newServiceAccountInformer) +} + +func (f *serviceAccountInformer) Lister() v1.ServiceAccountLister { + return v1.NewServiceAccountLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/extensions/interface.go b/staging/src/k8s.io/client-go/informers/extensions/interface.go new file mode 100644 index 000000000000..009a89b945af --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/extensions/interface.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package extensions + +import ( + v1beta1 "k8s.io/client-go/informers/extensions/v1beta1" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go new file mode 100644 index 000000000000..77f870e0fad6 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" + extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// DaemonSetInformer provides access to a shared informer and lister for +// DaemonSets. +type DaemonSetInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.DaemonSetLister +} + +type daemonSetInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newDaemonSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.ExtensionsV1beta1().DaemonSets(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.ExtensionsV1beta1().DaemonSets(v1.NamespaceAll).Watch(options) + }, + }, + &extensions_v1beta1.DaemonSet{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *daemonSetInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&extensions_v1beta1.DaemonSet{}, newDaemonSetInformer) +} + +func (f *daemonSetInformer) Lister() v1beta1.DaemonSetLister { + return v1beta1.NewDaemonSetLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/deployment.go new file mode 100644 index 000000000000..f74b35e02dbf --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/deployment.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" + extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// DeploymentInformer provides access to a shared informer and lister for +// Deployments. +type DeploymentInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.DeploymentLister +} + +type deploymentInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newDeploymentInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.ExtensionsV1beta1().Deployments(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.ExtensionsV1beta1().Deployments(v1.NamespaceAll).Watch(options) + }, + }, + &extensions_v1beta1.Deployment{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *deploymentInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&extensions_v1beta1.Deployment{}, newDeploymentInformer) +} + +func (f *deploymentInformer) Lister() v1beta1.DeploymentLister { + return v1beta1.NewDeploymentLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/ingress.go new file mode 100644 index 000000000000..e07f6fb2dbbc --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/ingress.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" + extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// IngressInformer provides access to a shared informer and lister for +// Ingresses. +type IngressInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.IngressLister +} + +type ingressInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newIngressInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.ExtensionsV1beta1().Ingresses(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.ExtensionsV1beta1().Ingresses(v1.NamespaceAll).Watch(options) + }, + }, + &extensions_v1beta1.Ingress{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *ingressInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&extensions_v1beta1.Ingress{}, newIngressInformer) +} + +func (f *ingressInformer) Lister() v1beta1.IngressLister { + return v1beta1.NewIngressLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/extensions/v1beta1/interface.go b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/interface.go new file mode 100644 index 000000000000..ef226bae04f2 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/interface.go @@ -0,0 +1,78 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // DaemonSets returns a DaemonSetInformer. + DaemonSets() DaemonSetInformer + // Deployments returns a DeploymentInformer. + Deployments() DeploymentInformer + // Ingresses returns a IngressInformer. + Ingresses() IngressInformer + // PodSecurityPolicies returns a PodSecurityPolicyInformer. + PodSecurityPolicies() PodSecurityPolicyInformer + // ReplicaSets returns a ReplicaSetInformer. + ReplicaSets() ReplicaSetInformer + // ThirdPartyResources returns a ThirdPartyResourceInformer. + ThirdPartyResources() ThirdPartyResourceInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// DaemonSets returns a DaemonSetInformer. +func (v *version) DaemonSets() DaemonSetInformer { + return &daemonSetInformer{factory: v.SharedInformerFactory} +} + +// Deployments returns a DeploymentInformer. +func (v *version) Deployments() DeploymentInformer { + return &deploymentInformer{factory: v.SharedInformerFactory} +} + +// Ingresses returns a IngressInformer. +func (v *version) Ingresses() IngressInformer { + return &ingressInformer{factory: v.SharedInformerFactory} +} + +// PodSecurityPolicies returns a PodSecurityPolicyInformer. +func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer { + return &podSecurityPolicyInformer{factory: v.SharedInformerFactory} +} + +// ReplicaSets returns a ReplicaSetInformer. +func (v *version) ReplicaSets() ReplicaSetInformer { + return &replicaSetInformer{factory: v.SharedInformerFactory} +} + +// ThirdPartyResources returns a ThirdPartyResourceInformer. +func (v *version) ThirdPartyResources() ThirdPartyResourceInformer { + return &thirdPartyResourceInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go new file mode 100644 index 000000000000..12fec02db513 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" + extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// PodSecurityPolicyInformer provides access to a shared informer and lister for +// PodSecurityPolicies. +type PodSecurityPolicyInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.PodSecurityPolicyLister +} + +type podSecurityPolicyInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.ExtensionsV1beta1().PodSecurityPolicies().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(options) + }, + }, + &extensions_v1beta1.PodSecurityPolicy{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&extensions_v1beta1.PodSecurityPolicy{}, newPodSecurityPolicyInformer) +} + +func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister { + return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go new file mode 100644 index 000000000000..8fa8a4291ba8 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" + extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ReplicaSetInformer provides access to a shared informer and lister for +// ReplicaSets. +type ReplicaSetInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ReplicaSetLister +} + +type replicaSetInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newReplicaSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.ExtensionsV1beta1().ReplicaSets(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.ExtensionsV1beta1().ReplicaSets(v1.NamespaceAll).Watch(options) + }, + }, + &extensions_v1beta1.ReplicaSet{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *replicaSetInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&extensions_v1beta1.ReplicaSet{}, newReplicaSetInformer) +} + +func (f *replicaSetInformer) Lister() v1beta1.ReplicaSetLister { + return v1beta1.NewReplicaSetLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/extensions/v1beta1/thirdpartyresource.go b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/thirdpartyresource.go new file mode 100644 index 000000000000..8a580406042d --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/extensions/v1beta1/thirdpartyresource.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" + extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ThirdPartyResourceInformer provides access to a shared informer and lister for +// ThirdPartyResources. +type ThirdPartyResourceInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ThirdPartyResourceLister +} + +type thirdPartyResourceInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newThirdPartyResourceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.ExtensionsV1beta1().ThirdPartyResources().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.ExtensionsV1beta1().ThirdPartyResources().Watch(options) + }, + }, + &extensions_v1beta1.ThirdPartyResource{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *thirdPartyResourceInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&extensions_v1beta1.ThirdPartyResource{}, newThirdPartyResourceInformer) +} + +func (f *thirdPartyResourceInformer) Lister() v1beta1.ThirdPartyResourceLister { + return v1beta1.NewThirdPartyResourceLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/factory.go b/staging/src/k8s.io/client-go/informers/factory.go new file mode 100644 index 000000000000..9db23775a9ae --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/factory.go @@ -0,0 +1,143 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package informers + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + apps "k8s.io/client-go/informers/apps" + autoscaling "k8s.io/client-go/informers/autoscaling" + batch "k8s.io/client-go/informers/batch" + certificates "k8s.io/client-go/informers/certificates" + core "k8s.io/client-go/informers/core" + extensions "k8s.io/client-go/informers/extensions" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + policy "k8s.io/client-go/informers/policy" + rbac "k8s.io/client-go/informers/rbac" + storage "k8s.io/client-go/informers/storage" + kubernetes "k8s.io/client-go/kubernetes" + cache "k8s.io/client-go/tools/cache" + reflect "reflect" + sync "sync" + time "time" +) + +type sharedInformerFactory struct { + client kubernetes.Interface + lock sync.Mutex + defaultResync time.Duration + + informers map[reflect.Type]cache.SharedIndexInformer + // startedInformers is used for tracking which informers have been started. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +func NewSharedInformerFactory(client kubernetes.Interface, defaultResync time.Duration) SharedInformerFactory { + return &sharedInformerFactory{ + client: client, + defaultResync: defaultResync, + informers: make(map[reflect.Type]cache.SharedIndexInformer), + startedInformers: make(map[reflect.Type]bool), + } +} + +// Start initializes all requested informers. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + informer = newFunc(f.client, f.defaultResync) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + Apps() apps.Interface + Autoscaling() autoscaling.Interface + Batch() batch.Interface + Certificates() certificates.Interface + Core() core.Interface + Extensions() extensions.Interface + Policy() policy.Interface + Rbac() rbac.Interface + Storage() storage.Interface +} + +func (f *sharedInformerFactory) Apps() apps.Interface { + return apps.New(f) +} + +func (f *sharedInformerFactory) Autoscaling() autoscaling.Interface { + return autoscaling.New(f) +} + +func (f *sharedInformerFactory) Batch() batch.Interface { + return batch.New(f) +} + +func (f *sharedInformerFactory) Certificates() certificates.Interface { + return certificates.New(f) +} + +func (f *sharedInformerFactory) Core() core.Interface { + return core.New(f) +} + +func (f *sharedInformerFactory) Extensions() extensions.Interface { + return extensions.New(f) +} + +func (f *sharedInformerFactory) Policy() policy.Interface { + return policy.New(f) +} + +func (f *sharedInformerFactory) Rbac() rbac.Interface { + return rbac.New(f) +} + +func (f *sharedInformerFactory) Storage() storage.Interface { + return storage.New(f) +} diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go new file mode 100644 index 000000000000..3d6201f97468 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -0,0 +1,170 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package informers + +import ( + "fmt" + schema "k8s.io/apimachinery/pkg/runtime/schema" + api_v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" + v1 "k8s.io/client-go/pkg/apis/autoscaling/v1" + v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1" + batch_v1 "k8s.io/client-go/pkg/apis/batch/v1" + batch_v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" + certificates_v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1" + extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + policy_v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + storage_v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1" + cache "k8s.io/client-go/tools/cache" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=Apps, Version=V1beta1 + case v1beta1.SchemeGroupVersion.WithResource("statefulsets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().StatefulSets().Informer()}, nil + + // Group=Autoscaling, Version=V1 + case v1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil + + // Group=Autoscaling, Version=V2alpha1 + case v2alpha1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2alpha1().HorizontalPodAutoscalers().Informer()}, nil + + // Group=Batch, Version=V1 + case batch_v1.SchemeGroupVersion.WithResource("jobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1().Jobs().Informer()}, nil + + // Group=Batch, Version=V2alpha1 + case batch_v2alpha1.SchemeGroupVersion.WithResource("cronjobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil + case batch_v2alpha1.SchemeGroupVersion.WithResource("jobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().Jobs().Informer()}, nil + + // Group=Certificates, Version=V1beta1 + case certificates_v1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil + + // Group=Core, Version=V1 + case api_v1.SchemeGroupVersion.WithResource("componentstatuses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ComponentStatuses().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("configmaps"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ConfigMaps().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("endpoints"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Endpoints().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("events"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Events().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("limitranges"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().LimitRanges().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("namespaces"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Namespaces().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("nodes"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Nodes().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("persistentvolumes"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PersistentVolumes().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("persistentvolumeclaims"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PersistentVolumeClaims().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("pods"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Pods().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("podtemplates"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PodTemplates().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("replicationcontrollers"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ReplicationControllers().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("resourcequotas"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ResourceQuotas().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("secrets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Secrets().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("services"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Services().Informer()}, nil + case api_v1.SchemeGroupVersion.WithResource("serviceaccounts"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil + + // Group=Extensions, Version=V1beta1 + case extensions_v1beta1.SchemeGroupVersion.WithResource("daemonsets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().DaemonSets().Informer()}, nil + case extensions_v1beta1.SchemeGroupVersion.WithResource("deployments"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Deployments().Informer()}, nil + case extensions_v1beta1.SchemeGroupVersion.WithResource("ingresses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Ingresses().Informer()}, nil + case extensions_v1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().PodSecurityPolicies().Informer()}, nil + case extensions_v1beta1.SchemeGroupVersion.WithResource("replicasets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil + case extensions_v1beta1.SchemeGroupVersion.WithResource("thirdpartyresources"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ThirdPartyResources().Informer()}, nil + + // Group=Policy, Version=V1beta1 + case policy_v1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil + + // Group=Rbac, Version=V1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("clusterroles"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoles().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("clusterrolebindings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoleBindings().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("roles"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().Roles().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("rolebindings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().RoleBindings().Informer()}, nil + + // Group=Rbac, Version=V1beta1 + case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterroles"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoles().Informer()}, nil + case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterrolebindings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoleBindings().Informer()}, nil + case rbac_v1beta1.SchemeGroupVersion.WithResource("roles"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().Roles().Informer()}, nil + case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil + + // Group=Storage, Version=V1beta1 + case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/staging/src/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go b/staging/src/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go new file mode 100644 index 000000000000..bfe354a59319 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go @@ -0,0 +1,34 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package internalinterfaces + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + kubernetes "k8s.io/client-go/kubernetes" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +type NewInformerFunc func(kubernetes.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} diff --git a/staging/src/k8s.io/client-go/informers/policy/interface.go b/staging/src/k8s.io/client-go/informers/policy/interface.go new file mode 100644 index 000000000000..c03b9bfd7bb0 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/policy/interface.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package policy + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + v1beta1 "k8s.io/client-go/informers/policy/v1beta1" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/policy/v1beta1/interface.go b/staging/src/k8s.io/client-go/informers/policy/v1beta1/interface.go new file mode 100644 index 000000000000..39b1abbeddfe --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/policy/v1beta1/interface.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // PodDisruptionBudgets returns a PodDisruptionBudgetInformer. + PodDisruptionBudgets() PodDisruptionBudgetInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// PodDisruptionBudgets returns a PodDisruptionBudgetInformer. +func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer { + return &podDisruptionBudgetInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go new file mode 100644 index 000000000000..a8258eaf837b --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/policy/v1beta1" + policy_v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// PodDisruptionBudgetInformer provides access to a shared informer and lister for +// PodDisruptionBudgets. +type PodDisruptionBudgetInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.PodDisruptionBudgetLister +} + +type podDisruptionBudgetInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newPodDisruptionBudgetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.PolicyV1beta1().PodDisruptionBudgets(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.PolicyV1beta1().PodDisruptionBudgets(v1.NamespaceAll).Watch(options) + }, + }, + &policy_v1beta1.PodDisruptionBudget{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *podDisruptionBudgetInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&policy_v1beta1.PodDisruptionBudget{}, newPodDisruptionBudgetInformer) +} + +func (f *podDisruptionBudgetInformer) Lister() v1beta1.PodDisruptionBudgetLister { + return v1beta1.NewPodDisruptionBudgetLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/interface.go b/staging/src/k8s.io/client-go/informers/rbac/interface.go new file mode 100644 index 000000000000..5bd1f29d95da --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/interface.go @@ -0,0 +1,52 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package rbac + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + v1alpha1 "k8s.io/client-go/informers/rbac/v1alpha1" + v1beta1 "k8s.io/client-go/informers/rbac/v1beta1" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.SharedInformerFactory) +} + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go new file mode 100644 index 000000000000..c378311be740 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1" + rbac_v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ClusterRoleInformer provides access to a shared informer and lister for +// ClusterRoles. +type ClusterRoleInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ClusterRoleLister +} + +type clusterRoleInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1alpha1().ClusterRoles().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1alpha1().ClusterRoles().Watch(options) + }, + }, + &rbac_v1alpha1.ClusterRole{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rbac_v1alpha1.ClusterRole{}, newClusterRoleInformer) +} + +func (f *clusterRoleInformer) Lister() v1alpha1.ClusterRoleLister { + return v1alpha1.NewClusterRoleLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go new file mode 100644 index 000000000000..bf101187ab79 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1" + rbac_v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ClusterRoleBindingInformer provides access to a shared informer and lister for +// ClusterRoleBindings. +type ClusterRoleBindingInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ClusterRoleBindingLister +} + +type clusterRoleBindingInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1alpha1().ClusterRoleBindings().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1alpha1().ClusterRoleBindings().Watch(options) + }, + }, + &rbac_v1alpha1.ClusterRoleBinding{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rbac_v1alpha1.ClusterRoleBinding{}, newClusterRoleBindingInformer) +} + +func (f *clusterRoleBindingInformer) Lister() v1alpha1.ClusterRoleBindingLister { + return v1alpha1.NewClusterRoleBindingLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/interface.go b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/interface.go new file mode 100644 index 000000000000..4c84b9a54c87 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/interface.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1alpha1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ClusterRoles returns a ClusterRoleInformer. + ClusterRoles() ClusterRoleInformer + // ClusterRoleBindings returns a ClusterRoleBindingInformer. + ClusterRoleBindings() ClusterRoleBindingInformer + // Roles returns a RoleInformer. + Roles() RoleInformer + // RoleBindings returns a RoleBindingInformer. + RoleBindings() RoleBindingInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// ClusterRoles returns a ClusterRoleInformer. +func (v *version) ClusterRoles() ClusterRoleInformer { + return &clusterRoleInformer{factory: v.SharedInformerFactory} +} + +// ClusterRoleBindings returns a ClusterRoleBindingInformer. +func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer { + return &clusterRoleBindingInformer{factory: v.SharedInformerFactory} +} + +// Roles returns a RoleInformer. +func (v *version) Roles() RoleInformer { + return &roleInformer{factory: v.SharedInformerFactory} +} + +// RoleBindings returns a RoleBindingInformer. +func (v *version) RoleBindings() RoleBindingInformer { + return &roleBindingInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/role.go new file mode 100644 index 000000000000..efaf45a73f97 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/role.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1" + rbac_v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// RoleInformer provides access to a shared informer and lister for +// Roles. +type RoleInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.RoleLister +} + +type roleInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1alpha1().Roles(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1alpha1().Roles(v1.NamespaceAll).Watch(options) + }, + }, + &rbac_v1alpha1.Role{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *roleInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rbac_v1alpha1.Role{}, newRoleInformer) +} + +func (f *roleInformer) Lister() v1alpha1.RoleLister { + return v1alpha1.NewRoleLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go new file mode 100644 index 000000000000..c7b515b61a07 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1" + rbac_v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// RoleBindingInformer provides access to a shared informer and lister for +// RoleBindings. +type RoleBindingInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.RoleBindingLister +} + +type roleBindingInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1alpha1().RoleBindings(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1alpha1().RoleBindings(v1.NamespaceAll).Watch(options) + }, + }, + &rbac_v1alpha1.RoleBinding{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rbac_v1alpha1.RoleBinding{}, newRoleBindingInformer) +} + +func (f *roleBindingInformer) Lister() v1alpha1.RoleBindingLister { + return v1alpha1.NewRoleBindingLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go new file mode 100644 index 000000000000..852804b5c860 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/rbac/v1beta1" + rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ClusterRoleInformer provides access to a shared informer and lister for +// ClusterRoles. +type ClusterRoleInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ClusterRoleLister +} + +type clusterRoleInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1beta1().ClusterRoles().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1beta1().ClusterRoles().Watch(options) + }, + }, + &rbac_v1beta1.ClusterRole{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rbac_v1beta1.ClusterRole{}, newClusterRoleInformer) +} + +func (f *clusterRoleInformer) Lister() v1beta1.ClusterRoleLister { + return v1beta1.NewClusterRoleLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go new file mode 100644 index 000000000000..1597da39041d --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/rbac/v1beta1" + rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ClusterRoleBindingInformer provides access to a shared informer and lister for +// ClusterRoleBindings. +type ClusterRoleBindingInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ClusterRoleBindingLister +} + +type clusterRoleBindingInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1beta1().ClusterRoleBindings().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1beta1().ClusterRoleBindings().Watch(options) + }, + }, + &rbac_v1beta1.ClusterRoleBinding{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rbac_v1beta1.ClusterRoleBinding{}, newClusterRoleBindingInformer) +} + +func (f *clusterRoleBindingInformer) Lister() v1beta1.ClusterRoleBindingLister { + return v1beta1.NewClusterRoleBindingLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1beta1/interface.go b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/interface.go new file mode 100644 index 000000000000..f8d082a3f4c3 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/interface.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ClusterRoles returns a ClusterRoleInformer. + ClusterRoles() ClusterRoleInformer + // ClusterRoleBindings returns a ClusterRoleBindingInformer. + ClusterRoleBindings() ClusterRoleBindingInformer + // Roles returns a RoleInformer. + Roles() RoleInformer + // RoleBindings returns a RoleBindingInformer. + RoleBindings() RoleBindingInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// ClusterRoles returns a ClusterRoleInformer. +func (v *version) ClusterRoles() ClusterRoleInformer { + return &clusterRoleInformer{factory: v.SharedInformerFactory} +} + +// ClusterRoleBindings returns a ClusterRoleBindingInformer. +func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer { + return &clusterRoleBindingInformer{factory: v.SharedInformerFactory} +} + +// Roles returns a RoleInformer. +func (v *version) Roles() RoleInformer { + return &roleInformer{factory: v.SharedInformerFactory} +} + +// RoleBindings returns a RoleBindingInformer. +func (v *version) RoleBindings() RoleBindingInformer { + return &roleBindingInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/role.go new file mode 100644 index 000000000000..27a595ab9ae6 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/role.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/rbac/v1beta1" + rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// RoleInformer provides access to a shared informer and lister for +// Roles. +type RoleInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.RoleLister +} + +type roleInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1beta1().Roles(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1beta1().Roles(v1.NamespaceAll).Watch(options) + }, + }, + &rbac_v1beta1.Role{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *roleInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rbac_v1beta1.Role{}, newRoleInformer) +} + +func (f *roleInformer) Lister() v1beta1.RoleLister { + return v1beta1.NewRoleLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go new file mode 100644 index 000000000000..508f7ec85f1f --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/rbac/v1beta1" + rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// RoleBindingInformer provides access to a shared informer and lister for +// RoleBindings. +type RoleBindingInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.RoleBindingLister +} + +type roleBindingInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1beta1().RoleBindings(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1beta1().RoleBindings(v1.NamespaceAll).Watch(options) + }, + }, + &rbac_v1beta1.RoleBinding{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rbac_v1beta1.RoleBinding{}, newRoleBindingInformer) +} + +func (f *roleBindingInformer) Lister() v1beta1.RoleBindingLister { + return v1beta1.NewRoleBindingLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/storage/interface.go b/staging/src/k8s.io/client-go/informers/storage/interface.go new file mode 100644 index 000000000000..a291548cbf64 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/storage/interface.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package storage + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + v1beta1 "k8s.io/client-go/informers/storage/v1beta1" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface +} + +type group struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &group{f} +} + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.SharedInformerFactory) +} diff --git a/staging/src/k8s.io/client-go/informers/storage/v1beta1/interface.go b/staging/src/k8s.io/client-go/informers/storage/v1beta1/interface.go new file mode 100644 index 000000000000..49e139f63133 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/storage/v1beta1/interface.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // StorageClasses returns a StorageClassInformer. + StorageClasses() StorageClassInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// StorageClasses returns a StorageClassInformer. +func (v *version) StorageClasses() StorageClassInformer { + return &storageClassInformer{factory: v.SharedInformerFactory} +} diff --git a/staging/src/k8s.io/client-go/informers/storage/v1beta1/storageclass.go b/staging/src/k8s.io/client-go/informers/storage/v1beta1/storageclass.go new file mode 100644 index 000000000000..e34548e0d3dd --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/storage/v1beta1/storageclass.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/storage/v1beta1" + storage_v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// StorageClassInformer provides access to a shared informer and lister for +// StorageClasses. +type StorageClassInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.StorageClassLister +} + +type storageClassInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.StorageV1beta1().StorageClasses().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.StorageV1beta1().StorageClasses().Watch(options) + }, + }, + &storage_v1beta1.StorageClass{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *storageClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&storage_v1beta1.StorageClass{}, newStorageClassInformer) +} + +func (f *storageClassInformer) Lister() v1beta1.StorageClassLister { + return v1beta1.NewStorageClassLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go new file mode 100644 index 000000000000..6a1f9a87754a --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go @@ -0,0 +1,19 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset.go new file mode 100644 index 000000000000..5bb903405f63 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + apps "k8s.io/client-go/pkg/apis/apps" + v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// StatefulSetLister helps list StatefulSets. +type StatefulSetLister interface { + // List lists all StatefulSets in the indexer. + List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) + // StatefulSets returns an object that can list and get StatefulSets. + StatefulSets(namespace string) StatefulSetNamespaceLister + StatefulSetListerExpansion +} + +// statefulSetLister implements the StatefulSetLister interface. +type statefulSetLister struct { + indexer cache.Indexer +} + +// NewStatefulSetLister returns a new StatefulSetLister. +func NewStatefulSetLister(indexer cache.Indexer) StatefulSetLister { + return &statefulSetLister{indexer: indexer} +} + +// List lists all StatefulSets in the indexer. +func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.StatefulSet)) + }) + return ret, err +} + +// StatefulSets returns an object that can list and get StatefulSets. +func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceLister { + return statefulSetNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// StatefulSetNamespaceLister helps list and get StatefulSets. +type StatefulSetNamespaceLister interface { + // List lists all StatefulSets in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) + // Get retrieves the StatefulSet from the indexer for a given namespace and name. + Get(name string) (*v1beta1.StatefulSet, error) + StatefulSetNamespaceListerExpansion +} + +// statefulSetNamespaceLister implements the StatefulSetNamespaceLister +// interface. +type statefulSetNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all StatefulSets in the indexer for a given namespace. +func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.StatefulSet)) + }) + return ret, err +} + +// Get retrieves the StatefulSet from the indexer for a given namespace and name. +func (s statefulSetNamespaceLister) Get(name string) (*v1beta1.StatefulSet, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(apps.Resource("statefulset"), name) + } + return obj.(*v1beta1.StatefulSet), nil +} diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go b/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go new file mode 100644 index 000000000000..d34e894ac358 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go @@ -0,0 +1,75 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/pkg/api/v1" + apps "k8s.io/client-go/pkg/apis/apps/v1beta1" +) + +// StatefulSetListerExpansion allows custom methods to be added to +// StatefulSetLister. +type StatefulSetListerExpansion interface { + GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) +} + +// StatefulSetNamespaceListerExpansion allows custom methods to be added to +// StatefulSetNamespaeLister. +type StatefulSetNamespaceListerExpansion interface{} + +// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found. +func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) { + var selector labels.Selector + var ps *apps.StatefulSet + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.StatefulSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var psList []*apps.StatefulSet + for i := range list { + ps = list[i] + if ps.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid selector: %v", err) + } + + // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + psList = append(psList, ps) + } + + if len(psList) == 0 { + return nil, fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return psList, nil +} diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go new file mode 100644 index 000000000000..a4da2b890819 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go @@ -0,0 +1,27 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +// HorizontalPodAutoscalerListerExpansion allows custom methods to be added to +// HorizontalPodAutoscalerLister. +type HorizontalPodAutoscalerListerExpansion interface{} + +// HorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to +// HorizontalPodAutoscalerNamespaeLister. +type HorizontalPodAutoscalerNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go new file mode 100644 index 000000000000..faa7688cf606 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + autoscaling "k8s.io/client-go/pkg/apis/autoscaling" + v1 "k8s.io/client-go/pkg/apis/autoscaling/v1" + "k8s.io/client-go/tools/cache" +) + +// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers. +type HorizontalPodAutoscalerLister interface { + // List lists all HorizontalPodAutoscalers in the indexer. + List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) + // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. + HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister + HorizontalPodAutoscalerListerExpansion +} + +// horizontalPodAutoscalerLister implements the HorizontalPodAutoscalerLister interface. +type horizontalPodAutoscalerLister struct { + indexer cache.Indexer +} + +// NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister. +func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister { + return &horizontalPodAutoscalerLister{indexer: indexer} +} + +// List lists all HorizontalPodAutoscalers in the indexer. +func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.HorizontalPodAutoscaler)) + }) + return ret, err +} + +// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. +func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister { + return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers. +type HorizontalPodAutoscalerNamespaceLister interface { + // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) + // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. + Get(name string) (*v1.HorizontalPodAutoscaler, error) + HorizontalPodAutoscalerNamespaceListerExpansion +} + +// horizontalPodAutoscalerNamespaceLister implements the HorizontalPodAutoscalerNamespaceLister +// interface. +type horizontalPodAutoscalerNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all HorizontalPodAutoscalers in the indexer for a given namespace. +func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.HorizontalPodAutoscaler)) + }) + return ret, err +} + +// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. +func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v1.HorizontalPodAutoscaler, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(autoscaling.Resource("horizontalpodautoscaler"), name) + } + return obj.(*v1.HorizontalPodAutoscaler), nil +} diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1/expansion_generated.go new file mode 100644 index 000000000000..65057e3aaab1 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1/expansion_generated.go @@ -0,0 +1,27 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v2alpha1 + +// HorizontalPodAutoscalerListerExpansion allows custom methods to be added to +// HorizontalPodAutoscalerLister. +type HorizontalPodAutoscalerListerExpansion interface{} + +// HorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to +// HorizontalPodAutoscalerNamespaeLister. +type HorizontalPodAutoscalerNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1/horizontalpodautoscaler.go new file mode 100644 index 000000000000..534f99709441 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1/horizontalpodautoscaler.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v2alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + autoscaling "k8s.io/client-go/pkg/apis/autoscaling" + v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1" + "k8s.io/client-go/tools/cache" +) + +// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers. +type HorizontalPodAutoscalerLister interface { + // List lists all HorizontalPodAutoscalers in the indexer. + List(selector labels.Selector) (ret []*v2alpha1.HorizontalPodAutoscaler, err error) + // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. + HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister + HorizontalPodAutoscalerListerExpansion +} + +// horizontalPodAutoscalerLister implements the HorizontalPodAutoscalerLister interface. +type horizontalPodAutoscalerLister struct { + indexer cache.Indexer +} + +// NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister. +func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister { + return &horizontalPodAutoscalerLister{indexer: indexer} +} + +// List lists all HorizontalPodAutoscalers in the indexer. +func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2alpha1.HorizontalPodAutoscaler, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v2alpha1.HorizontalPodAutoscaler)) + }) + return ret, err +} + +// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. +func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister { + return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers. +type HorizontalPodAutoscalerNamespaceLister interface { + // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v2alpha1.HorizontalPodAutoscaler, err error) + // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. + Get(name string) (*v2alpha1.HorizontalPodAutoscaler, error) + HorizontalPodAutoscalerNamespaceListerExpansion +} + +// horizontalPodAutoscalerNamespaceLister implements the HorizontalPodAutoscalerNamespaceLister +// interface. +type horizontalPodAutoscalerNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all HorizontalPodAutoscalers in the indexer for a given namespace. +func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.HorizontalPodAutoscaler, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v2alpha1.HorizontalPodAutoscaler)) + }) + return ret, err +} + +// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. +func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2alpha1.HorizontalPodAutoscaler, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(autoscaling.Resource("horizontalpodautoscaler"), name) + } + return obj.(*v2alpha1.HorizontalPodAutoscaler), nil +} diff --git a/staging/src/k8s.io/client-go/listers/batch/v1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/batch/v1/expansion_generated.go new file mode 100644 index 000000000000..38b7e2720e25 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/batch/v1/expansion_generated.go @@ -0,0 +1,19 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 diff --git a/staging/src/k8s.io/client-go/listers/batch/v1/job.go b/staging/src/k8s.io/client-go/listers/batch/v1/job.go new file mode 100644 index 000000000000..83d37e64286b --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/batch/v1/job.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + batch "k8s.io/client-go/pkg/apis/batch" + v1 "k8s.io/client-go/pkg/apis/batch/v1" + "k8s.io/client-go/tools/cache" +) + +// JobLister helps list Jobs. +type JobLister interface { + // List lists all Jobs in the indexer. + List(selector labels.Selector) (ret []*v1.Job, err error) + // Jobs returns an object that can list and get Jobs. + Jobs(namespace string) JobNamespaceLister + JobListerExpansion +} + +// jobLister implements the JobLister interface. +type jobLister struct { + indexer cache.Indexer +} + +// NewJobLister returns a new JobLister. +func NewJobLister(indexer cache.Indexer) JobLister { + return &jobLister{indexer: indexer} +} + +// List lists all Jobs in the indexer. +func (s *jobLister) List(selector labels.Selector) (ret []*v1.Job, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Job)) + }) + return ret, err +} + +// Jobs returns an object that can list and get Jobs. +func (s *jobLister) Jobs(namespace string) JobNamespaceLister { + return jobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// JobNamespaceLister helps list and get Jobs. +type JobNamespaceLister interface { + // List lists all Jobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.Job, err error) + // Get retrieves the Job from the indexer for a given namespace and name. + Get(name string) (*v1.Job, error) + JobNamespaceListerExpansion +} + +// jobNamespaceLister implements the JobNamespaceLister +// interface. +type jobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Jobs in the indexer for a given namespace. +func (s jobNamespaceLister) List(selector labels.Selector) (ret []*v1.Job, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Job)) + }) + return ret, err +} + +// Get retrieves the Job from the indexer for a given namespace and name. +func (s jobNamespaceLister) Get(name string) (*v1.Job, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(batch.Resource("job"), name) + } + return obj.(*v1.Job), nil +} diff --git a/staging/src/k8s.io/client-go/listers/batch/v1/job_expansion.go b/staging/src/k8s.io/client-go/listers/batch/v1/job_expansion.go new file mode 100644 index 000000000000..4b602d0aeb3f --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/batch/v1/job_expansion.go @@ -0,0 +1,64 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/pkg/api/v1" + batch "k8s.io/client-go/pkg/apis/batch/v1" +) + +// JobListerExpansion allows custom methods to be added to +// JobLister. +type JobListerExpansion interface { + // GetPodJobs returns a list of jobs managing a pod. An error is returned only + // if no matching jobs are found. + GetPodJobs(pod *v1.Pod) (jobs []batch.Job, err error) +} + +// GetPodJobs returns a list of jobs managing a pod. An error is returned only +// if no matching jobs are found. +func (l *jobLister) GetPodJobs(pod *v1.Pod) (jobs []batch.Job, err error) { + if len(pod.Labels) == 0 { + err = fmt.Errorf("no jobs found for pod %v because it has no labels", pod.Name) + return + } + + var list []*batch.Job + list, err = l.Jobs(pod.Namespace).List(labels.Everything()) + if err != nil { + return + } + for _, job := range list { + selector, _ := metav1.LabelSelectorAsSelector(job.Spec.Selector) + if !selector.Matches(labels.Set(pod.Labels)) { + continue + } + jobs = append(jobs, *job) + } + if len(jobs) == 0 { + err = fmt.Errorf("could not find jobs for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + return +} + +// JobNamespaceListerExpansion allows custom methods to be added to +// JobNamespaceLister. +type JobNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go b/staging/src/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go new file mode 100644 index 000000000000..57b874cf1e73 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v2alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + batch "k8s.io/client-go/pkg/apis/batch" + v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" + "k8s.io/client-go/tools/cache" +) + +// CronJobLister helps list CronJobs. +type CronJobLister interface { + // List lists all CronJobs in the indexer. + List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) + // CronJobs returns an object that can list and get CronJobs. + CronJobs(namespace string) CronJobNamespaceLister + CronJobListerExpansion +} + +// cronJobLister implements the CronJobLister interface. +type cronJobLister struct { + indexer cache.Indexer +} + +// NewCronJobLister returns a new CronJobLister. +func NewCronJobLister(indexer cache.Indexer) CronJobLister { + return &cronJobLister{indexer: indexer} +} + +// List lists all CronJobs in the indexer. +func (s *cronJobLister) List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v2alpha1.CronJob)) + }) + return ret, err +} + +// CronJobs returns an object that can list and get CronJobs. +func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister { + return cronJobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// CronJobNamespaceLister helps list and get CronJobs. +type CronJobNamespaceLister interface { + // List lists all CronJobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) + // Get retrieves the CronJob from the indexer for a given namespace and name. + Get(name string) (*v2alpha1.CronJob, error) + CronJobNamespaceListerExpansion +} + +// cronJobNamespaceLister implements the CronJobNamespaceLister +// interface. +type cronJobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all CronJobs in the indexer for a given namespace. +func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v2alpha1.CronJob)) + }) + return ret, err +} + +// Get retrieves the CronJob from the indexer for a given namespace and name. +func (s cronJobNamespaceLister) Get(name string) (*v2alpha1.CronJob, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(batch.Resource("cronjob"), name) + } + return obj.(*v2alpha1.CronJob), nil +} diff --git a/staging/src/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go new file mode 100644 index 000000000000..6974208ff2d4 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go @@ -0,0 +1,35 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v2alpha1 + +// CronJobListerExpansion allows custom methods to be added to +// CronJobLister. +type CronJobListerExpansion interface{} + +// CronJobNamespaceListerExpansion allows custom methods to be added to +// CronJobNamespaeLister. +type CronJobNamespaceListerExpansion interface{} + +// JobListerExpansion allows custom methods to be added to +// JobLister. +type JobListerExpansion interface{} + +// JobNamespaceListerExpansion allows custom methods to be added to +// JobNamespaeLister. +type JobNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/batch/v2alpha1/job.go b/staging/src/k8s.io/client-go/listers/batch/v2alpha1/job.go new file mode 100644 index 000000000000..09a9768ea6a2 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/batch/v2alpha1/job.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v2alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + batch "k8s.io/client-go/pkg/apis/batch" + v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" + "k8s.io/client-go/tools/cache" +) + +// JobLister helps list Jobs. +type JobLister interface { + // List lists all Jobs in the indexer. + List(selector labels.Selector) (ret []*v2alpha1.Job, err error) + // Jobs returns an object that can list and get Jobs. + Jobs(namespace string) JobNamespaceLister + JobListerExpansion +} + +// jobLister implements the JobLister interface. +type jobLister struct { + indexer cache.Indexer +} + +// NewJobLister returns a new JobLister. +func NewJobLister(indexer cache.Indexer) JobLister { + return &jobLister{indexer: indexer} +} + +// List lists all Jobs in the indexer. +func (s *jobLister) List(selector labels.Selector) (ret []*v2alpha1.Job, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v2alpha1.Job)) + }) + return ret, err +} + +// Jobs returns an object that can list and get Jobs. +func (s *jobLister) Jobs(namespace string) JobNamespaceLister { + return jobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// JobNamespaceLister helps list and get Jobs. +type JobNamespaceLister interface { + // List lists all Jobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v2alpha1.Job, err error) + // Get retrieves the Job from the indexer for a given namespace and name. + Get(name string) (*v2alpha1.Job, error) + JobNamespaceListerExpansion +} + +// jobNamespaceLister implements the JobNamespaceLister +// interface. +type jobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Jobs in the indexer for a given namespace. +func (s jobNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.Job, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v2alpha1.Job)) + }) + return ret, err +} + +// Get retrieves the Job from the indexer for a given namespace and name. +func (s jobNamespaceLister) Get(name string) (*v2alpha1.Job, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(batch.Resource("job"), name) + } + return obj.(*v2alpha1.Job), nil +} diff --git a/staging/src/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go new file mode 100644 index 000000000000..5c7f4322a591 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + certificates "k8s.io/client-go/pkg/apis/certificates" + v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// CertificateSigningRequestLister helps list CertificateSigningRequests. +type CertificateSigningRequestLister interface { + // List lists all CertificateSigningRequests in the indexer. + List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) + // Get retrieves the CertificateSigningRequest from the index for a given name. + Get(name string) (*v1beta1.CertificateSigningRequest, error) + CertificateSigningRequestListerExpansion +} + +// certificateSigningRequestLister implements the CertificateSigningRequestLister interface. +type certificateSigningRequestLister struct { + indexer cache.Indexer +} + +// NewCertificateSigningRequestLister returns a new CertificateSigningRequestLister. +func NewCertificateSigningRequestLister(indexer cache.Indexer) CertificateSigningRequestLister { + return &certificateSigningRequestLister{indexer: indexer} +} + +// List lists all CertificateSigningRequests in the indexer. +func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.CertificateSigningRequest)) + }) + return ret, err +} + +// Get retrieves the CertificateSigningRequest from the index for a given name. +func (s *certificateSigningRequestLister) Get(name string) (*v1beta1.CertificateSigningRequest, error) { + key := &v1beta1.CertificateSigningRequest{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(certificates.Resource("certificatesigningrequest"), name) + } + return obj.(*v1beta1.CertificateSigningRequest), nil +} diff --git a/staging/src/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go new file mode 100644 index 000000000000..c240be44ff00 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go @@ -0,0 +1,23 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +// CertificateSigningRequestListerExpansion allows custom methods to be added to +// CertificateSigningRequestLister. +type CertificateSigningRequestListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/listers/core/v1/componentstatus.go new file mode 100644 index 000000000000..a40deded29c0 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/componentstatus.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// ComponentStatusLister helps list ComponentStatuses. +type ComponentStatusLister interface { + // List lists all ComponentStatuses in the indexer. + List(selector labels.Selector) (ret []*v1.ComponentStatus, err error) + // Get retrieves the ComponentStatus from the index for a given name. + Get(name string) (*v1.ComponentStatus, error) + ComponentStatusListerExpansion +} + +// componentStatusLister implements the ComponentStatusLister interface. +type componentStatusLister struct { + indexer cache.Indexer +} + +// NewComponentStatusLister returns a new ComponentStatusLister. +func NewComponentStatusLister(indexer cache.Indexer) ComponentStatusLister { + return &componentStatusLister{indexer: indexer} +} + +// List lists all ComponentStatuses in the indexer. +func (s *componentStatusLister) List(selector labels.Selector) (ret []*v1.ComponentStatus, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ComponentStatus)) + }) + return ret, err +} + +// Get retrieves the ComponentStatus from the index for a given name. +func (s *componentStatusLister) Get(name string) (*v1.ComponentStatus, error) { + key := &v1.ComponentStatus{ObjectMeta: meta_v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("componentstatus"), name) + } + return obj.(*v1.ComponentStatus), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/configmap.go b/staging/src/k8s.io/client-go/listers/core/v1/configmap.go new file mode 100644 index 000000000000..32124dedbc7b --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/configmap.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// ConfigMapLister helps list ConfigMaps. +type ConfigMapLister interface { + // List lists all ConfigMaps in the indexer. + List(selector labels.Selector) (ret []*v1.ConfigMap, err error) + // ConfigMaps returns an object that can list and get ConfigMaps. + ConfigMaps(namespace string) ConfigMapNamespaceLister + ConfigMapListerExpansion +} + +// configMapLister implements the ConfigMapLister interface. +type configMapLister struct { + indexer cache.Indexer +} + +// NewConfigMapLister returns a new ConfigMapLister. +func NewConfigMapLister(indexer cache.Indexer) ConfigMapLister { + return &configMapLister{indexer: indexer} +} + +// List lists all ConfigMaps in the indexer. +func (s *configMapLister) List(selector labels.Selector) (ret []*v1.ConfigMap, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ConfigMap)) + }) + return ret, err +} + +// ConfigMaps returns an object that can list and get ConfigMaps. +func (s *configMapLister) ConfigMaps(namespace string) ConfigMapNamespaceLister { + return configMapNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ConfigMapNamespaceLister helps list and get ConfigMaps. +type ConfigMapNamespaceLister interface { + // List lists all ConfigMaps in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.ConfigMap, err error) + // Get retrieves the ConfigMap from the indexer for a given namespace and name. + Get(name string) (*v1.ConfigMap, error) + ConfigMapNamespaceListerExpansion +} + +// configMapNamespaceLister implements the ConfigMapNamespaceLister +// interface. +type configMapNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ConfigMaps in the indexer for a given namespace. +func (s configMapNamespaceLister) List(selector labels.Selector) (ret []*v1.ConfigMap, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ConfigMap)) + }) + return ret, err +} + +// Get retrieves the ConfigMap from the indexer for a given namespace and name. +func (s configMapNamespaceLister) Get(name string) (*v1.ConfigMap, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("configmap"), name) + } + return obj.(*v1.ConfigMap), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/endpoints.go b/staging/src/k8s.io/client-go/listers/core/v1/endpoints.go new file mode 100644 index 000000000000..0092e135b407 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/endpoints.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// EndpointsLister helps list Endpoints. +type EndpointsLister interface { + // List lists all Endpoints in the indexer. + List(selector labels.Selector) (ret []*v1.Endpoints, err error) + // Endpoints returns an object that can list and get Endpoints. + Endpoints(namespace string) EndpointsNamespaceLister + EndpointsListerExpansion +} + +// endpointsLister implements the EndpointsLister interface. +type endpointsLister struct { + indexer cache.Indexer +} + +// NewEndpointsLister returns a new EndpointsLister. +func NewEndpointsLister(indexer cache.Indexer) EndpointsLister { + return &endpointsLister{indexer: indexer} +} + +// List lists all Endpoints in the indexer. +func (s *endpointsLister) List(selector labels.Selector) (ret []*v1.Endpoints, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Endpoints)) + }) + return ret, err +} + +// Endpoints returns an object that can list and get Endpoints. +func (s *endpointsLister) Endpoints(namespace string) EndpointsNamespaceLister { + return endpointsNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// EndpointsNamespaceLister helps list and get Endpoints. +type EndpointsNamespaceLister interface { + // List lists all Endpoints in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.Endpoints, err error) + // Get retrieves the Endpoints from the indexer for a given namespace and name. + Get(name string) (*v1.Endpoints, error) + EndpointsNamespaceListerExpansion +} + +// endpointsNamespaceLister implements the EndpointsNamespaceLister +// interface. +type endpointsNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Endpoints in the indexer for a given namespace. +func (s endpointsNamespaceLister) List(selector labels.Selector) (ret []*v1.Endpoints, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Endpoints)) + }) + return ret, err +} + +// Get retrieves the Endpoints from the indexer for a given namespace and name. +func (s endpointsNamespaceLister) Get(name string) (*v1.Endpoints, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("endpoints"), name) + } + return obj.(*v1.Endpoints), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/event.go b/staging/src/k8s.io/client-go/listers/core/v1/event.go new file mode 100644 index 000000000000..f30e033a90d6 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/event.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// EventLister helps list Events. +type EventLister interface { + // List lists all Events in the indexer. + List(selector labels.Selector) (ret []*v1.Event, err error) + // Events returns an object that can list and get Events. + Events(namespace string) EventNamespaceLister + EventListerExpansion +} + +// eventLister implements the EventLister interface. +type eventLister struct { + indexer cache.Indexer +} + +// NewEventLister returns a new EventLister. +func NewEventLister(indexer cache.Indexer) EventLister { + return &eventLister{indexer: indexer} +} + +// List lists all Events in the indexer. +func (s *eventLister) List(selector labels.Selector) (ret []*v1.Event, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Event)) + }) + return ret, err +} + +// Events returns an object that can list and get Events. +func (s *eventLister) Events(namespace string) EventNamespaceLister { + return eventNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// EventNamespaceLister helps list and get Events. +type EventNamespaceLister interface { + // List lists all Events in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.Event, err error) + // Get retrieves the Event from the indexer for a given namespace and name. + Get(name string) (*v1.Event, error) + EventNamespaceListerExpansion +} + +// eventNamespaceLister implements the EventNamespaceLister +// interface. +type eventNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Events in the indexer for a given namespace. +func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Event)) + }) + return ret, err +} + +// Get retrieves the Event from the indexer for a given namespace and name. +func (s eventNamespaceLister) Get(name string) (*v1.Event, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("event"), name) + } + return obj.(*v1.Event), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/core/v1/expansion_generated.go new file mode 100644 index 000000000000..9b7fad0a56a9 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/expansion_generated.go @@ -0,0 +1,111 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +// ComponentStatusListerExpansion allows custom methods to be added to +// ComponentStatusLister. +type ComponentStatusListerExpansion interface{} + +// ConfigMapListerExpansion allows custom methods to be added to +// ConfigMapLister. +type ConfigMapListerExpansion interface{} + +// ConfigMapNamespaceListerExpansion allows custom methods to be added to +// ConfigMapNamespaeLister. +type ConfigMapNamespaceListerExpansion interface{} + +// EndpointsListerExpansion allows custom methods to be added to +// EndpointsLister. +type EndpointsListerExpansion interface{} + +// EndpointsNamespaceListerExpansion allows custom methods to be added to +// EndpointsNamespaeLister. +type EndpointsNamespaceListerExpansion interface{} + +// EventListerExpansion allows custom methods to be added to +// EventLister. +type EventListerExpansion interface{} + +// EventNamespaceListerExpansion allows custom methods to be added to +// EventNamespaeLister. +type EventNamespaceListerExpansion interface{} + +// LimitRangeListerExpansion allows custom methods to be added to +// LimitRangeLister. +type LimitRangeListerExpansion interface{} + +// LimitRangeNamespaceListerExpansion allows custom methods to be added to +// LimitRangeNamespaeLister. +type LimitRangeNamespaceListerExpansion interface{} + +// NamespaceListerExpansion allows custom methods to be added to +// NamespaceLister. +type NamespaceListerExpansion interface{} + +// PersistentVolumeListerExpansion allows custom methods to be added to +// PersistentVolumeLister. +type PersistentVolumeListerExpansion interface{} + +// PersistentVolumeClaimListerExpansion allows custom methods to be added to +// PersistentVolumeClaimLister. +type PersistentVolumeClaimListerExpansion interface{} + +// PersistentVolumeClaimNamespaceListerExpansion allows custom methods to be added to +// PersistentVolumeClaimNamespaeLister. +type PersistentVolumeClaimNamespaceListerExpansion interface{} + +// PodListerExpansion allows custom methods to be added to +// PodLister. +type PodListerExpansion interface{} + +// PodNamespaceListerExpansion allows custom methods to be added to +// PodNamespaeLister. +type PodNamespaceListerExpansion interface{} + +// PodTemplateListerExpansion allows custom methods to be added to +// PodTemplateLister. +type PodTemplateListerExpansion interface{} + +// PodTemplateNamespaceListerExpansion allows custom methods to be added to +// PodTemplateNamespaeLister. +type PodTemplateNamespaceListerExpansion interface{} + +// ResourceQuotaListerExpansion allows custom methods to be added to +// ResourceQuotaLister. +type ResourceQuotaListerExpansion interface{} + +// ResourceQuotaNamespaceListerExpansion allows custom methods to be added to +// ResourceQuotaNamespaeLister. +type ResourceQuotaNamespaceListerExpansion interface{} + +// SecretListerExpansion allows custom methods to be added to +// SecretLister. +type SecretListerExpansion interface{} + +// SecretNamespaceListerExpansion allows custom methods to be added to +// SecretNamespaeLister. +type SecretNamespaceListerExpansion interface{} + +// ServiceAccountListerExpansion allows custom methods to be added to +// ServiceAccountLister. +type ServiceAccountListerExpansion interface{} + +// ServiceAccountNamespaceListerExpansion allows custom methods to be added to +// ServiceAccountNamespaeLister. +type ServiceAccountNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/limitrange.go b/staging/src/k8s.io/client-go/listers/core/v1/limitrange.go new file mode 100644 index 000000000000..3ad2aeae4a31 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/limitrange.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// LimitRangeLister helps list LimitRanges. +type LimitRangeLister interface { + // List lists all LimitRanges in the indexer. + List(selector labels.Selector) (ret []*v1.LimitRange, err error) + // LimitRanges returns an object that can list and get LimitRanges. + LimitRanges(namespace string) LimitRangeNamespaceLister + LimitRangeListerExpansion +} + +// limitRangeLister implements the LimitRangeLister interface. +type limitRangeLister struct { + indexer cache.Indexer +} + +// NewLimitRangeLister returns a new LimitRangeLister. +func NewLimitRangeLister(indexer cache.Indexer) LimitRangeLister { + return &limitRangeLister{indexer: indexer} +} + +// List lists all LimitRanges in the indexer. +func (s *limitRangeLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.LimitRange)) + }) + return ret, err +} + +// LimitRanges returns an object that can list and get LimitRanges. +func (s *limitRangeLister) LimitRanges(namespace string) LimitRangeNamespaceLister { + return limitRangeNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// LimitRangeNamespaceLister helps list and get LimitRanges. +type LimitRangeNamespaceLister interface { + // List lists all LimitRanges in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.LimitRange, err error) + // Get retrieves the LimitRange from the indexer for a given namespace and name. + Get(name string) (*v1.LimitRange, error) + LimitRangeNamespaceListerExpansion +} + +// limitRangeNamespaceLister implements the LimitRangeNamespaceLister +// interface. +type limitRangeNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all LimitRanges in the indexer for a given namespace. +func (s limitRangeNamespaceLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.LimitRange)) + }) + return ret, err +} + +// Get retrieves the LimitRange from the indexer for a given namespace and name. +func (s limitRangeNamespaceLister) Get(name string) (*v1.LimitRange, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("limitrange"), name) + } + return obj.(*v1.LimitRange), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/namespace.go b/staging/src/k8s.io/client-go/listers/core/v1/namespace.go new file mode 100644 index 000000000000..23f036046b7d --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/namespace.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// NamespaceLister helps list Namespaces. +type NamespaceLister interface { + // List lists all Namespaces in the indexer. + List(selector labels.Selector) (ret []*v1.Namespace, err error) + // Get retrieves the Namespace from the index for a given name. + Get(name string) (*v1.Namespace, error) + NamespaceListerExpansion +} + +// namespaceLister implements the NamespaceLister interface. +type namespaceLister struct { + indexer cache.Indexer +} + +// NewNamespaceLister returns a new NamespaceLister. +func NewNamespaceLister(indexer cache.Indexer) NamespaceLister { + return &namespaceLister{indexer: indexer} +} + +// List lists all Namespaces in the indexer. +func (s *namespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Namespace)) + }) + return ret, err +} + +// Get retrieves the Namespace from the index for a given name. +func (s *namespaceLister) Get(name string) (*v1.Namespace, error) { + key := &v1.Namespace{ObjectMeta: meta_v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("namespace"), name) + } + return obj.(*v1.Namespace), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/node.go b/staging/src/k8s.io/client-go/listers/core/v1/node.go new file mode 100644 index 000000000000..9b729e833517 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/node.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// NodeLister helps list Nodes. +type NodeLister interface { + // List lists all Nodes in the indexer. + List(selector labels.Selector) (ret []*v1.Node, err error) + // Get retrieves the Node from the index for a given name. + Get(name string) (*v1.Node, error) + NodeListerExpansion +} + +// nodeLister implements the NodeLister interface. +type nodeLister struct { + indexer cache.Indexer +} + +// NewNodeLister returns a new NodeLister. +func NewNodeLister(indexer cache.Indexer) NodeLister { + return &nodeLister{indexer: indexer} +} + +// List lists all Nodes in the indexer. +func (s *nodeLister) List(selector labels.Selector) (ret []*v1.Node, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Node)) + }) + return ret, err +} + +// Get retrieves the Node from the index for a given name. +func (s *nodeLister) Get(name string) (*v1.Node, error) { + key := &v1.Node{ObjectMeta: meta_v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("node"), name) + } + return obj.(*v1.Node), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/node_expansion.go b/staging/src/k8s.io/client-go/listers/core/v1/node_expansion.go new file mode 100644 index 000000000000..8d446b0dca2d --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/node_expansion.go @@ -0,0 +1,48 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/pkg/api/v1" +) + +// NodeConditionPredicate is a function that indicates whether the given node's conditions meet +// some set of criteria defined by the function. +type NodeConditionPredicate func(node *v1.Node) bool + +// NodeListerExpansion allows custom methods to be added to +// NodeLister. +type NodeListerExpansion interface { + ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) +} + +func (l *nodeLister) ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) { + nodes, err := l.List(labels.Everything()) + if err != nil { + return nil, err + } + + var filtered []*v1.Node + for i := range nodes { + if predicate(nodes[i]) { + filtered = append(filtered, nodes[i]) + } + } + + return filtered, nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/listers/core/v1/persistentvolume.go new file mode 100644 index 000000000000..837c736ca662 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/persistentvolume.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// PersistentVolumeLister helps list PersistentVolumes. +type PersistentVolumeLister interface { + // List lists all PersistentVolumes in the indexer. + List(selector labels.Selector) (ret []*v1.PersistentVolume, err error) + // Get retrieves the PersistentVolume from the index for a given name. + Get(name string) (*v1.PersistentVolume, error) + PersistentVolumeListerExpansion +} + +// persistentVolumeLister implements the PersistentVolumeLister interface. +type persistentVolumeLister struct { + indexer cache.Indexer +} + +// NewPersistentVolumeLister returns a new PersistentVolumeLister. +func NewPersistentVolumeLister(indexer cache.Indexer) PersistentVolumeLister { + return &persistentVolumeLister{indexer: indexer} +} + +// List lists all PersistentVolumes in the indexer. +func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*v1.PersistentVolume, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.PersistentVolume)) + }) + return ret, err +} + +// Get retrieves the PersistentVolume from the index for a given name. +func (s *persistentVolumeLister) Get(name string) (*v1.PersistentVolume, error) { + key := &v1.PersistentVolume{ObjectMeta: meta_v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("persistentvolume"), name) + } + return obj.(*v1.PersistentVolume), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go new file mode 100644 index 000000000000..6b8aea80d479 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// PersistentVolumeClaimLister helps list PersistentVolumeClaims. +type PersistentVolumeClaimLister interface { + // List lists all PersistentVolumeClaims in the indexer. + List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) + // PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims. + PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister + PersistentVolumeClaimListerExpansion +} + +// persistentVolumeClaimLister implements the PersistentVolumeClaimLister interface. +type persistentVolumeClaimLister struct { + indexer cache.Indexer +} + +// NewPersistentVolumeClaimLister returns a new PersistentVolumeClaimLister. +func NewPersistentVolumeClaimLister(indexer cache.Indexer) PersistentVolumeClaimLister { + return &persistentVolumeClaimLister{indexer: indexer} +} + +// List lists all PersistentVolumeClaims in the indexer. +func (s *persistentVolumeClaimLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.PersistentVolumeClaim)) + }) + return ret, err +} + +// PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims. +func (s *persistentVolumeClaimLister) PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister { + return persistentVolumeClaimNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// PersistentVolumeClaimNamespaceLister helps list and get PersistentVolumeClaims. +type PersistentVolumeClaimNamespaceLister interface { + // List lists all PersistentVolumeClaims in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) + // Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name. + Get(name string) (*v1.PersistentVolumeClaim, error) + PersistentVolumeClaimNamespaceListerExpansion +} + +// persistentVolumeClaimNamespaceLister implements the PersistentVolumeClaimNamespaceLister +// interface. +type persistentVolumeClaimNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all PersistentVolumeClaims in the indexer for a given namespace. +func (s persistentVolumeClaimNamespaceLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.PersistentVolumeClaim)) + }) + return ret, err +} + +// Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name. +func (s persistentVolumeClaimNamespaceLister) Get(name string) (*v1.PersistentVolumeClaim, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("persistentvolumeclaim"), name) + } + return obj.(*v1.PersistentVolumeClaim), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/pod.go b/staging/src/k8s.io/client-go/listers/core/v1/pod.go new file mode 100644 index 000000000000..d5b78ee393a7 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/pod.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// PodLister helps list Pods. +type PodLister interface { + // List lists all Pods in the indexer. + List(selector labels.Selector) (ret []*v1.Pod, err error) + // Pods returns an object that can list and get Pods. + Pods(namespace string) PodNamespaceLister + PodListerExpansion +} + +// podLister implements the PodLister interface. +type podLister struct { + indexer cache.Indexer +} + +// NewPodLister returns a new PodLister. +func NewPodLister(indexer cache.Indexer) PodLister { + return &podLister{indexer: indexer} +} + +// List lists all Pods in the indexer. +func (s *podLister) List(selector labels.Selector) (ret []*v1.Pod, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Pod)) + }) + return ret, err +} + +// Pods returns an object that can list and get Pods. +func (s *podLister) Pods(namespace string) PodNamespaceLister { + return podNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// PodNamespaceLister helps list and get Pods. +type PodNamespaceLister interface { + // List lists all Pods in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.Pod, err error) + // Get retrieves the Pod from the indexer for a given namespace and name. + Get(name string) (*v1.Pod, error) + PodNamespaceListerExpansion +} + +// podNamespaceLister implements the PodNamespaceLister +// interface. +type podNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Pods in the indexer for a given namespace. +func (s podNamespaceLister) List(selector labels.Selector) (ret []*v1.Pod, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Pod)) + }) + return ret, err +} + +// Get retrieves the Pod from the indexer for a given namespace and name. +func (s podNamespaceLister) Get(name string) (*v1.Pod, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("pod"), name) + } + return obj.(*v1.Pod), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/listers/core/v1/podtemplate.go new file mode 100644 index 000000000000..fadd11fbeabe --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/podtemplate.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// PodTemplateLister helps list PodTemplates. +type PodTemplateLister interface { + // List lists all PodTemplates in the indexer. + List(selector labels.Selector) (ret []*v1.PodTemplate, err error) + // PodTemplates returns an object that can list and get PodTemplates. + PodTemplates(namespace string) PodTemplateNamespaceLister + PodTemplateListerExpansion +} + +// podTemplateLister implements the PodTemplateLister interface. +type podTemplateLister struct { + indexer cache.Indexer +} + +// NewPodTemplateLister returns a new PodTemplateLister. +func NewPodTemplateLister(indexer cache.Indexer) PodTemplateLister { + return &podTemplateLister{indexer: indexer} +} + +// List lists all PodTemplates in the indexer. +func (s *podTemplateLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.PodTemplate)) + }) + return ret, err +} + +// PodTemplates returns an object that can list and get PodTemplates. +func (s *podTemplateLister) PodTemplates(namespace string) PodTemplateNamespaceLister { + return podTemplateNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// PodTemplateNamespaceLister helps list and get PodTemplates. +type PodTemplateNamespaceLister interface { + // List lists all PodTemplates in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.PodTemplate, err error) + // Get retrieves the PodTemplate from the indexer for a given namespace and name. + Get(name string) (*v1.PodTemplate, error) + PodTemplateNamespaceListerExpansion +} + +// podTemplateNamespaceLister implements the PodTemplateNamespaceLister +// interface. +type podTemplateNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all PodTemplates in the indexer for a given namespace. +func (s podTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.PodTemplate)) + }) + return ret, err +} + +// Get retrieves the PodTemplate from the indexer for a given namespace and name. +func (s podTemplateNamespaceLister) Get(name string) (*v1.PodTemplate, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("podtemplate"), name) + } + return obj.(*v1.PodTemplate), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller.go new file mode 100644 index 000000000000..a38e5d7cc42d --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// ReplicationControllerLister helps list ReplicationControllers. +type ReplicationControllerLister interface { + // List lists all ReplicationControllers in the indexer. + List(selector labels.Selector) (ret []*v1.ReplicationController, err error) + // ReplicationControllers returns an object that can list and get ReplicationControllers. + ReplicationControllers(namespace string) ReplicationControllerNamespaceLister + ReplicationControllerListerExpansion +} + +// replicationControllerLister implements the ReplicationControllerLister interface. +type replicationControllerLister struct { + indexer cache.Indexer +} + +// NewReplicationControllerLister returns a new ReplicationControllerLister. +func NewReplicationControllerLister(indexer cache.Indexer) ReplicationControllerLister { + return &replicationControllerLister{indexer: indexer} +} + +// List lists all ReplicationControllers in the indexer. +func (s *replicationControllerLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ReplicationController)) + }) + return ret, err +} + +// ReplicationControllers returns an object that can list and get ReplicationControllers. +func (s *replicationControllerLister) ReplicationControllers(namespace string) ReplicationControllerNamespaceLister { + return replicationControllerNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ReplicationControllerNamespaceLister helps list and get ReplicationControllers. +type ReplicationControllerNamespaceLister interface { + // List lists all ReplicationControllers in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.ReplicationController, err error) + // Get retrieves the ReplicationController from the indexer for a given namespace and name. + Get(name string) (*v1.ReplicationController, error) + ReplicationControllerNamespaceListerExpansion +} + +// replicationControllerNamespaceLister implements the ReplicationControllerNamespaceLister +// interface. +type replicationControllerNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ReplicationControllers in the indexer for a given namespace. +func (s replicationControllerNamespaceLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ReplicationController)) + }) + return ret, err +} + +// Get retrieves the ReplicationController from the indexer for a given namespace and name. +func (s replicationControllerNamespaceLister) Get(name string) (*v1.ReplicationController, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("replicationcontroller"), name) + } + return obj.(*v1.ReplicationController), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go b/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go new file mode 100644 index 000000000000..6a6398681248 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/pkg/api/v1" +) + +// ReplicationControllerListerExpansion allows custom methods to be added to +// ReplicationControllerLister. +type ReplicationControllerListerExpansion interface { + GetPodControllers(pod *v1.Pod) ([]*v1.ReplicationController, error) +} + +// ReplicationControllerNamespaceListerExpansion allows custom methods to be added to +// ReplicationControllerNamespaeLister. +type ReplicationControllerNamespaceListerExpansion interface{} + +// GetPodControllers returns a list of replication controllers managing a pod. Returns an error only if no matching controllers are found. +func (s *replicationControllerLister) GetPodControllers(pod *v1.Pod) ([]*v1.ReplicationController, error) { + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no controllers found for pod %v because it has no labels", pod.Name) + } + + items, err := s.ReplicationControllers(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var controllers []*v1.ReplicationController + for i := range items { + rc := items[i] + selector := labels.Set(rc.Spec.Selector).AsSelectorPreValidated() + + // If an rc with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + controllers = append(controllers, rc) + } + + if len(controllers) == 0 { + return nil, fmt.Errorf("could not find controller for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return controllers, nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/listers/core/v1/resourcequota.go new file mode 100644 index 000000000000..1a30bc6286cc --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/resourcequota.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// ResourceQuotaLister helps list ResourceQuotas. +type ResourceQuotaLister interface { + // List lists all ResourceQuotas in the indexer. + List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) + // ResourceQuotas returns an object that can list and get ResourceQuotas. + ResourceQuotas(namespace string) ResourceQuotaNamespaceLister + ResourceQuotaListerExpansion +} + +// resourceQuotaLister implements the ResourceQuotaLister interface. +type resourceQuotaLister struct { + indexer cache.Indexer +} + +// NewResourceQuotaLister returns a new ResourceQuotaLister. +func NewResourceQuotaLister(indexer cache.Indexer) ResourceQuotaLister { + return &resourceQuotaLister{indexer: indexer} +} + +// List lists all ResourceQuotas in the indexer. +func (s *resourceQuotaLister) List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ResourceQuota)) + }) + return ret, err +} + +// ResourceQuotas returns an object that can list and get ResourceQuotas. +func (s *resourceQuotaLister) ResourceQuotas(namespace string) ResourceQuotaNamespaceLister { + return resourceQuotaNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ResourceQuotaNamespaceLister helps list and get ResourceQuotas. +type ResourceQuotaNamespaceLister interface { + // List lists all ResourceQuotas in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) + // Get retrieves the ResourceQuota from the indexer for a given namespace and name. + Get(name string) (*v1.ResourceQuota, error) + ResourceQuotaNamespaceListerExpansion +} + +// resourceQuotaNamespaceLister implements the ResourceQuotaNamespaceLister +// interface. +type resourceQuotaNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ResourceQuotas in the indexer for a given namespace. +func (s resourceQuotaNamespaceLister) List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ResourceQuota)) + }) + return ret, err +} + +// Get retrieves the ResourceQuota from the indexer for a given namespace and name. +func (s resourceQuotaNamespaceLister) Get(name string) (*v1.ResourceQuota, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("resourcequota"), name) + } + return obj.(*v1.ResourceQuota), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/secret.go b/staging/src/k8s.io/client-go/listers/core/v1/secret.go new file mode 100644 index 000000000000..150bd9450e0b --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/secret.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// SecretLister helps list Secrets. +type SecretLister interface { + // List lists all Secrets in the indexer. + List(selector labels.Selector) (ret []*v1.Secret, err error) + // Secrets returns an object that can list and get Secrets. + Secrets(namespace string) SecretNamespaceLister + SecretListerExpansion +} + +// secretLister implements the SecretLister interface. +type secretLister struct { + indexer cache.Indexer +} + +// NewSecretLister returns a new SecretLister. +func NewSecretLister(indexer cache.Indexer) SecretLister { + return &secretLister{indexer: indexer} +} + +// List lists all Secrets in the indexer. +func (s *secretLister) List(selector labels.Selector) (ret []*v1.Secret, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Secret)) + }) + return ret, err +} + +// Secrets returns an object that can list and get Secrets. +func (s *secretLister) Secrets(namespace string) SecretNamespaceLister { + return secretNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// SecretNamespaceLister helps list and get Secrets. +type SecretNamespaceLister interface { + // List lists all Secrets in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.Secret, err error) + // Get retrieves the Secret from the indexer for a given namespace and name. + Get(name string) (*v1.Secret, error) + SecretNamespaceListerExpansion +} + +// secretNamespaceLister implements the SecretNamespaceLister +// interface. +type secretNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Secrets in the indexer for a given namespace. +func (s secretNamespaceLister) List(selector labels.Selector) (ret []*v1.Secret, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Secret)) + }) + return ret, err +} + +// Get retrieves the Secret from the indexer for a given namespace and name. +func (s secretNamespaceLister) Get(name string) (*v1.Secret, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("secret"), name) + } + return obj.(*v1.Secret), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/service.go b/staging/src/k8s.io/client-go/listers/core/v1/service.go new file mode 100644 index 000000000000..30d22c154be1 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/service.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// ServiceLister helps list Services. +type ServiceLister interface { + // List lists all Services in the indexer. + List(selector labels.Selector) (ret []*v1.Service, err error) + // Services returns an object that can list and get Services. + Services(namespace string) ServiceNamespaceLister + ServiceListerExpansion +} + +// serviceLister implements the ServiceLister interface. +type serviceLister struct { + indexer cache.Indexer +} + +// NewServiceLister returns a new ServiceLister. +func NewServiceLister(indexer cache.Indexer) ServiceLister { + return &serviceLister{indexer: indexer} +} + +// List lists all Services in the indexer. +func (s *serviceLister) List(selector labels.Selector) (ret []*v1.Service, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Service)) + }) + return ret, err +} + +// Services returns an object that can list and get Services. +func (s *serviceLister) Services(namespace string) ServiceNamespaceLister { + return serviceNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ServiceNamespaceLister helps list and get Services. +type ServiceNamespaceLister interface { + // List lists all Services in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.Service, err error) + // Get retrieves the Service from the indexer for a given namespace and name. + Get(name string) (*v1.Service, error) + ServiceNamespaceListerExpansion +} + +// serviceNamespaceLister implements the ServiceNamespaceLister +// interface. +type serviceNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Services in the indexer for a given namespace. +func (s serviceNamespaceLister) List(selector labels.Selector) (ret []*v1.Service, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Service)) + }) + return ret, err +} + +// Get retrieves the Service from the indexer for a given namespace and name. +func (s serviceNamespaceLister) Get(name string) (*v1.Service, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("service"), name) + } + return obj.(*v1.Service), nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/service_expansion.go b/staging/src/k8s.io/client-go/listers/core/v1/service_expansion.go new file mode 100644 index 000000000000..fd07f6d89f63 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/service_expansion.go @@ -0,0 +1,56 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/pkg/api/v1" +) + +// ServiceListerExpansion allows custom methods to be added to +// ServiceLister. +type ServiceListerExpansion interface { + GetPodServices(pod *v1.Pod) ([]*v1.Service, error) +} + +// ServiceNamespaceListerExpansion allows custom methods to be added to +// ServiceNamespaeLister. +type ServiceNamespaceListerExpansion interface{} + +// TODO: Move this back to scheduler as a helper function that takes a Store, +// rather than a method of ServiceLister. +func (s *serviceLister) GetPodServices(pod *v1.Pod) ([]*v1.Service, error) { + allServices, err := s.Services(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var services []*v1.Service + for i := range allServices { + service := allServices[i] + if service.Spec.Selector == nil { + // services with nil selectors match nothing, not everything. + continue + } + selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated() + if selector.Matches(labels.Set(pod.Labels)) { + services = append(services, service) + } + } + + return services, nil +} diff --git a/staging/src/k8s.io/client-go/listers/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/listers/core/v1/serviceaccount.go new file mode 100644 index 000000000000..9c07933995d3 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/core/v1/serviceaccount.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" +) + +// ServiceAccountLister helps list ServiceAccounts. +type ServiceAccountLister interface { + // List lists all ServiceAccounts in the indexer. + List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) + // ServiceAccounts returns an object that can list and get ServiceAccounts. + ServiceAccounts(namespace string) ServiceAccountNamespaceLister + ServiceAccountListerExpansion +} + +// serviceAccountLister implements the ServiceAccountLister interface. +type serviceAccountLister struct { + indexer cache.Indexer +} + +// NewServiceAccountLister returns a new ServiceAccountLister. +func NewServiceAccountLister(indexer cache.Indexer) ServiceAccountLister { + return &serviceAccountLister{indexer: indexer} +} + +// List lists all ServiceAccounts in the indexer. +func (s *serviceAccountLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ServiceAccount)) + }) + return ret, err +} + +// ServiceAccounts returns an object that can list and get ServiceAccounts. +func (s *serviceAccountLister) ServiceAccounts(namespace string) ServiceAccountNamespaceLister { + return serviceAccountNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ServiceAccountNamespaceLister helps list and get ServiceAccounts. +type ServiceAccountNamespaceLister interface { + // List lists all ServiceAccounts in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) + // Get retrieves the ServiceAccount from the indexer for a given namespace and name. + Get(name string) (*v1.ServiceAccount, error) + ServiceAccountNamespaceListerExpansion +} + +// serviceAccountNamespaceLister implements the ServiceAccountNamespaceLister +// interface. +type serviceAccountNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ServiceAccounts in the indexer for a given namespace. +func (s serviceAccountNamespaceLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ServiceAccount)) + }) + return ret, err +} + +// Get retrieves the ServiceAccount from the indexer for a given namespace and name. +func (s serviceAccountNamespaceLister) Get(name string) (*v1.ServiceAccount, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(api.Resource("serviceaccount"), name) + } + return obj.(*v1.ServiceAccount), nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go new file mode 100644 index 000000000000..14cebbf50c58 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/client-go/pkg/apis/extensions" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// DaemonSetLister helps list DaemonSets. +type DaemonSetLister interface { + // List lists all DaemonSets in the indexer. + List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) + // DaemonSets returns an object that can list and get DaemonSets. + DaemonSets(namespace string) DaemonSetNamespaceLister + DaemonSetListerExpansion +} + +// daemonSetLister implements the DaemonSetLister interface. +type daemonSetLister struct { + indexer cache.Indexer +} + +// NewDaemonSetLister returns a new DaemonSetLister. +func NewDaemonSetLister(indexer cache.Indexer) DaemonSetLister { + return &daemonSetLister{indexer: indexer} +} + +// List lists all DaemonSets in the indexer. +func (s *daemonSetLister) List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.DaemonSet)) + }) + return ret, err +} + +// DaemonSets returns an object that can list and get DaemonSets. +func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister { + return daemonSetNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// DaemonSetNamespaceLister helps list and get DaemonSets. +type DaemonSetNamespaceLister interface { + // List lists all DaemonSets in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) + // Get retrieves the DaemonSet from the indexer for a given namespace and name. + Get(name string) (*v1beta1.DaemonSet, error) + DaemonSetNamespaceListerExpansion +} + +// daemonSetNamespaceLister implements the DaemonSetNamespaceLister +// interface. +type daemonSetNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all DaemonSets in the indexer for a given namespace. +func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.DaemonSet)) + }) + return ret, err +} + +// Get retrieves the DaemonSet from the indexer for a given namespace and name. +func (s daemonSetNamespaceLister) Get(name string) (*v1beta1.DaemonSet, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(extensions.Resource("daemonset"), name) + } + return obj.(*v1beta1.DaemonSet), nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go new file mode 100644 index 000000000000..dc17c105cf80 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go @@ -0,0 +1,77 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/pkg/apis/extensions/v1beta1" +) + +// DaemonSetListerExpansion allows custom methods to be added to +// DaemonSetLister. +type DaemonSetListerExpansion interface { + GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, error) +} + +// DaemonSetNamespaceListerExpansion allows custom methods to be added to +// DaemonSetNamespaeLister. +type DaemonSetNamespaceListerExpansion interface{} + +// GetPodDaemonSets returns a list of daemon sets managing a pod. +// Returns an error if and only if no matching daemon sets are found. +func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, error) { + var selector labels.Selector + var daemonSet *v1beta1.DaemonSet + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.DaemonSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var daemonSets []*v1beta1.DaemonSet + for i := range list { + daemonSet = list[i] + if daemonSet.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) + if err != nil { + // this should not happen if the DaemonSet passed validation + return nil, err + } + + // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + daemonSets = append(daemonSets, daemonSet) + } + + if len(daemonSets) == 0 { + return nil, fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return daemonSets, nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment.go new file mode 100644 index 000000000000..5c67b0d653b3 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/client-go/pkg/apis/extensions" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// DeploymentLister helps list Deployments. +type DeploymentLister interface { + // List lists all Deployments in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) + // Deployments returns an object that can list and get Deployments. + Deployments(namespace string) DeploymentNamespaceLister + DeploymentListerExpansion +} + +// deploymentLister implements the DeploymentLister interface. +type deploymentLister struct { + indexer cache.Indexer +} + +// NewDeploymentLister returns a new DeploymentLister. +func NewDeploymentLister(indexer cache.Indexer) DeploymentLister { + return &deploymentLister{indexer: indexer} +} + +// List lists all Deployments in the indexer. +func (s *deploymentLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Deployment)) + }) + return ret, err +} + +// Deployments returns an object that can list and get Deployments. +func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceLister { + return deploymentNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// DeploymentNamespaceLister helps list and get Deployments. +type DeploymentNamespaceLister interface { + // List lists all Deployments in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) + // Get retrieves the Deployment from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Deployment, error) + DeploymentNamespaceListerExpansion +} + +// deploymentNamespaceLister implements the DeploymentNamespaceLister +// interface. +type deploymentNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Deployments in the indexer for a given namespace. +func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Deployment)) + }) + return ret, err +} + +// Get retrieves the Deployment from the indexer for a given namespace and name. +func (s deploymentNamespaceLister) Get(name string) (*v1beta1.Deployment, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(extensions.Resource("deployment"), name) + } + return obj.(*v1beta1.Deployment), nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go new file mode 100644 index 000000000000..276aed7af6ce --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go @@ -0,0 +1,67 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/client-go/pkg/apis/extensions/v1beta1" +) + +// DeploymentListerExpansion allows custom methods to be added to +// DeploymentLister. +type DeploymentListerExpansion interface { + GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) +} + +// DeploymentNamespaceListerExpansion allows custom methods to be added to +// DeploymentNamespaeLister. +type DeploymentNamespaceListerExpansion interface{} + +// GetDeploymentsForReplicaSet returns a list of deployments managing a replica set. Returns an error only if no matching deployments are found. +func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) { + if len(rs.Labels) == 0 { + return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) + } + + // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label + dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var deployments []*extensions.Deployment + for _, d := range dList { + selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid label selector: %v", err) + } + // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { + continue + } + deployments = append(deployments, d) + } + + if len(deployments) == 0 { + return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) + } + + return deployments, nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go new file mode 100644 index 000000000000..fa5ccbb6083b --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +// IngressListerExpansion allows custom methods to be added to +// IngressLister. +type IngressListerExpansion interface{} + +// IngressNamespaceListerExpansion allows custom methods to be added to +// IngressNamespaeLister. +type IngressNamespaceListerExpansion interface{} + +// PodSecurityPolicyListerExpansion allows custom methods to be added to +// PodSecurityPolicyLister. +type PodSecurityPolicyListerExpansion interface{} + +// ScaleListerExpansion allows custom methods to be added to +// ScaleLister. +type ScaleListerExpansion interface{} + +// ScaleNamespaceListerExpansion allows custom methods to be added to +// ScaleNamespaeLister. +type ScaleNamespaceListerExpansion interface{} + +// ThirdPartyResourceListerExpansion allows custom methods to be added to +// ThirdPartyResourceLister. +type ThirdPartyResourceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/ingress.go new file mode 100644 index 000000000000..3f0fe3bc45f3 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/ingress.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/client-go/pkg/apis/extensions" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// IngressLister helps list Ingresses. +type IngressLister interface { + // List lists all Ingresses in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) + // Ingresses returns an object that can list and get Ingresses. + Ingresses(namespace string) IngressNamespaceLister + IngressListerExpansion +} + +// ingressLister implements the IngressLister interface. +type ingressLister struct { + indexer cache.Indexer +} + +// NewIngressLister returns a new IngressLister. +func NewIngressLister(indexer cache.Indexer) IngressLister { + return &ingressLister{indexer: indexer} +} + +// List lists all Ingresses in the indexer. +func (s *ingressLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Ingress)) + }) + return ret, err +} + +// Ingresses returns an object that can list and get Ingresses. +func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister { + return ingressNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// IngressNamespaceLister helps list and get Ingresses. +type IngressNamespaceLister interface { + // List lists all Ingresses in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) + // Get retrieves the Ingress from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Ingress, error) + IngressNamespaceListerExpansion +} + +// ingressNamespaceLister implements the IngressNamespaceLister +// interface. +type ingressNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Ingresses in the indexer for a given namespace. +func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Ingress)) + }) + return ret, err +} + +// Get retrieves the Ingress from the indexer for a given namespace and name. +func (s ingressNamespaceLister) Get(name string) (*v1beta1.Ingress, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(extensions.Resource("ingress"), name) + } + return obj.(*v1beta1.Ingress), nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go new file mode 100644 index 000000000000..c4990dde28df --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/client-go/pkg/apis/extensions" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// PodSecurityPolicyLister helps list PodSecurityPolicies. +type PodSecurityPolicyLister interface { + // List lists all PodSecurityPolicies in the indexer. + List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) + // Get retrieves the PodSecurityPolicy from the index for a given name. + Get(name string) (*v1beta1.PodSecurityPolicy, error) + PodSecurityPolicyListerExpansion +} + +// podSecurityPolicyLister implements the PodSecurityPolicyLister interface. +type podSecurityPolicyLister struct { + indexer cache.Indexer +} + +// NewPodSecurityPolicyLister returns a new PodSecurityPolicyLister. +func NewPodSecurityPolicyLister(indexer cache.Indexer) PodSecurityPolicyLister { + return &podSecurityPolicyLister{indexer: indexer} +} + +// List lists all PodSecurityPolicies in the indexer. +func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.PodSecurityPolicy)) + }) + return ret, err +} + +// Get retrieves the PodSecurityPolicy from the index for a given name. +func (s *podSecurityPolicyLister) Get(name string) (*v1beta1.PodSecurityPolicy, error) { + key := &v1beta1.PodSecurityPolicy{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(extensions.Resource("podsecuritypolicy"), name) + } + return obj.(*v1beta1.PodSecurityPolicy), nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go new file mode 100644 index 000000000000..17bb1827ae5d --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/client-go/pkg/apis/extensions" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// ReplicaSetLister helps list ReplicaSets. +type ReplicaSetLister interface { + // List lists all ReplicaSets in the indexer. + List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) + // ReplicaSets returns an object that can list and get ReplicaSets. + ReplicaSets(namespace string) ReplicaSetNamespaceLister + ReplicaSetListerExpansion +} + +// replicaSetLister implements the ReplicaSetLister interface. +type replicaSetLister struct { + indexer cache.Indexer +} + +// NewReplicaSetLister returns a new ReplicaSetLister. +func NewReplicaSetLister(indexer cache.Indexer) ReplicaSetLister { + return &replicaSetLister{indexer: indexer} +} + +// List lists all ReplicaSets in the indexer. +func (s *replicaSetLister) List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ReplicaSet)) + }) + return ret, err +} + +// ReplicaSets returns an object that can list and get ReplicaSets. +func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceLister { + return replicaSetNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ReplicaSetNamespaceLister helps list and get ReplicaSets. +type ReplicaSetNamespaceLister interface { + // List lists all ReplicaSets in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) + // Get retrieves the ReplicaSet from the indexer for a given namespace and name. + Get(name string) (*v1beta1.ReplicaSet, error) + ReplicaSetNamespaceListerExpansion +} + +// replicaSetNamespaceLister implements the ReplicaSetNamespaceLister +// interface. +type replicaSetNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ReplicaSets in the indexer for a given namespace. +func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ReplicaSet)) + }) + return ret, err +} + +// Get retrieves the ReplicaSet from the indexer for a given namespace and name. +func (s replicaSetNamespaceLister) Get(name string) (*v1beta1.ReplicaSet, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(extensions.Resource("replicaset"), name) + } + return obj.(*v1beta1.ReplicaSet), nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go new file mode 100644 index 000000000000..8b92a32835c2 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go @@ -0,0 +1,71 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/pkg/api/v1" + extensions "k8s.io/client-go/pkg/apis/extensions/v1beta1" +) + +// ReplicaSetListerExpansion allows custom methods to be added to +// ReplicaSetLister. +type ReplicaSetListerExpansion interface { + GetPodReplicaSets(pod *v1.Pod) ([]*extensions.ReplicaSet, error) +} + +// ReplicaSetNamespaceListerExpansion allows custom methods to be added to +// ReplicaSetNamespaeLister. +type ReplicaSetNamespaceListerExpansion interface{} + +// GetPodReplicaSets returns a list of ReplicaSets managing a pod. Returns an error only if no matching ReplicaSets are found. +func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*extensions.ReplicaSet, error) { + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.ReplicaSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var rss []*extensions.ReplicaSet + for _, rs := range list { + if rs.Namespace != pod.Namespace { + continue + } + selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid selector: %v", err) + } + + // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + rss = append(rss, rs) + } + + if len(rss) == 0 { + return nil, fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return rss, nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/scale.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/scale.go new file mode 100644 index 000000000000..5b80c233d006 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/scale.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/client-go/pkg/apis/extensions" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// ScaleLister helps list Scales. +type ScaleLister interface { + // List lists all Scales in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Scale, err error) + // Scales returns an object that can list and get Scales. + Scales(namespace string) ScaleNamespaceLister + ScaleListerExpansion +} + +// scaleLister implements the ScaleLister interface. +type scaleLister struct { + indexer cache.Indexer +} + +// NewScaleLister returns a new ScaleLister. +func NewScaleLister(indexer cache.Indexer) ScaleLister { + return &scaleLister{indexer: indexer} +} + +// List lists all Scales in the indexer. +func (s *scaleLister) List(selector labels.Selector) (ret []*v1beta1.Scale, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Scale)) + }) + return ret, err +} + +// Scales returns an object that can list and get Scales. +func (s *scaleLister) Scales(namespace string) ScaleNamespaceLister { + return scaleNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ScaleNamespaceLister helps list and get Scales. +type ScaleNamespaceLister interface { + // List lists all Scales in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Scale, err error) + // Get retrieves the Scale from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Scale, error) + ScaleNamespaceListerExpansion +} + +// scaleNamespaceLister implements the ScaleNamespaceLister +// interface. +type scaleNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Scales in the indexer for a given namespace. +func (s scaleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Scale, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Scale)) + }) + return ret, err +} + +// Get retrieves the Scale from the indexer for a given namespace and name. +func (s scaleNamespaceLister) Get(name string) (*v1beta1.Scale, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(extensions.Resource("scale"), name) + } + return obj.(*v1beta1.Scale), nil +} diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/thirdpartyresource.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/thirdpartyresource.go new file mode 100644 index 000000000000..e2bf171b640f --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/thirdpartyresource.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/client-go/pkg/apis/extensions" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// ThirdPartyResourceLister helps list ThirdPartyResources. +type ThirdPartyResourceLister interface { + // List lists all ThirdPartyResources in the indexer. + List(selector labels.Selector) (ret []*v1beta1.ThirdPartyResource, err error) + // Get retrieves the ThirdPartyResource from the index for a given name. + Get(name string) (*v1beta1.ThirdPartyResource, error) + ThirdPartyResourceListerExpansion +} + +// thirdPartyResourceLister implements the ThirdPartyResourceLister interface. +type thirdPartyResourceLister struct { + indexer cache.Indexer +} + +// NewThirdPartyResourceLister returns a new ThirdPartyResourceLister. +func NewThirdPartyResourceLister(indexer cache.Indexer) ThirdPartyResourceLister { + return &thirdPartyResourceLister{indexer: indexer} +} + +// List lists all ThirdPartyResources in the indexer. +func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*v1beta1.ThirdPartyResource, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ThirdPartyResource)) + }) + return ret, err +} + +// Get retrieves the ThirdPartyResource from the index for a given name. +func (s *thirdPartyResourceLister) Get(name string) (*v1beta1.ThirdPartyResource, error) { + key := &v1beta1.ThirdPartyResource{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(extensions.Resource("thirdpartyresource"), name) + } + return obj.(*v1beta1.ThirdPartyResource), nil +} diff --git a/staging/src/k8s.io/client-go/listers/policy/v1beta1/eviction.go b/staging/src/k8s.io/client-go/listers/policy/v1beta1/eviction.go new file mode 100644 index 000000000000..150835c6edb0 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/policy/v1beta1/eviction.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + policy "k8s.io/client-go/pkg/apis/policy" + v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// EvictionLister helps list Evictions. +type EvictionLister interface { + // List lists all Evictions in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) + // Evictions returns an object that can list and get Evictions. + Evictions(namespace string) EvictionNamespaceLister + EvictionListerExpansion +} + +// evictionLister implements the EvictionLister interface. +type evictionLister struct { + indexer cache.Indexer +} + +// NewEvictionLister returns a new EvictionLister. +func NewEvictionLister(indexer cache.Indexer) EvictionLister { + return &evictionLister{indexer: indexer} +} + +// List lists all Evictions in the indexer. +func (s *evictionLister) List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Eviction)) + }) + return ret, err +} + +// Evictions returns an object that can list and get Evictions. +func (s *evictionLister) Evictions(namespace string) EvictionNamespaceLister { + return evictionNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// EvictionNamespaceLister helps list and get Evictions. +type EvictionNamespaceLister interface { + // List lists all Evictions in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) + // Get retrieves the Eviction from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Eviction, error) + EvictionNamespaceListerExpansion +} + +// evictionNamespaceLister implements the EvictionNamespaceLister +// interface. +type evictionNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Evictions in the indexer for a given namespace. +func (s evictionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Eviction)) + }) + return ret, err +} + +// Get retrieves the Eviction from the indexer for a given namespace and name. +func (s evictionNamespaceLister) Get(name string) (*v1beta1.Eviction, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(policy.Resource("eviction"), name) + } + return obj.(*v1beta1.Eviction), nil +} diff --git a/staging/src/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go new file mode 100644 index 000000000000..8a2081a30d56 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go @@ -0,0 +1,27 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +// EvictionListerExpansion allows custom methods to be added to +// EvictionLister. +type EvictionListerExpansion interface{} + +// EvictionNamespaceListerExpansion allows custom methods to be added to +// EvictionNamespaeLister. +type EvictionNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go new file mode 100644 index 000000000000..65294df04743 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + policy "k8s.io/client-go/pkg/apis/policy" + v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// PodDisruptionBudgetLister helps list PodDisruptionBudgets. +type PodDisruptionBudgetLister interface { + // List lists all PodDisruptionBudgets in the indexer. + List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) + // PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets. + PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister + PodDisruptionBudgetListerExpansion +} + +// podDisruptionBudgetLister implements the PodDisruptionBudgetLister interface. +type podDisruptionBudgetLister struct { + indexer cache.Indexer +} + +// NewPodDisruptionBudgetLister returns a new PodDisruptionBudgetLister. +func NewPodDisruptionBudgetLister(indexer cache.Indexer) PodDisruptionBudgetLister { + return &podDisruptionBudgetLister{indexer: indexer} +} + +// List lists all PodDisruptionBudgets in the indexer. +func (s *podDisruptionBudgetLister) List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.PodDisruptionBudget)) + }) + return ret, err +} + +// PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets. +func (s *podDisruptionBudgetLister) PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister { + return podDisruptionBudgetNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// PodDisruptionBudgetNamespaceLister helps list and get PodDisruptionBudgets. +type PodDisruptionBudgetNamespaceLister interface { + // List lists all PodDisruptionBudgets in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) + // Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name. + Get(name string) (*v1beta1.PodDisruptionBudget, error) + PodDisruptionBudgetNamespaceListerExpansion +} + +// podDisruptionBudgetNamespaceLister implements the PodDisruptionBudgetNamespaceLister +// interface. +type podDisruptionBudgetNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all PodDisruptionBudgets in the indexer for a given namespace. +func (s podDisruptionBudgetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.PodDisruptionBudget)) + }) + return ret, err +} + +// Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name. +func (s podDisruptionBudgetNamespaceLister) Get(name string) (*v1beta1.PodDisruptionBudget, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(policy.Resource("poddisruptionbudget"), name) + } + return obj.(*v1beta1.PodDisruptionBudget), nil +} diff --git a/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go b/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go new file mode 100644 index 000000000000..880604a94610 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go @@ -0,0 +1,74 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/pkg/api/v1" + policy "k8s.io/client-go/pkg/apis/policy/v1beta1" +) + +// PodDisruptionBudgetListerExpansion allows custom methods to be added to +// PodDisruptionBudgetLister. +type PodDisruptionBudgetListerExpansion interface { + GetPodPodDisruptionBudgets(pod *v1.Pod) ([]*policy.PodDisruptionBudget, error) +} + +// PodDisruptionBudgetNamespaceListerExpansion allows custom methods to be added to +// PodDisruptionBudgetNamespaeLister. +type PodDisruptionBudgetNamespaceListerExpansion interface{} + +// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found. +func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]*policy.PodDisruptionBudget, error) { + var selector labels.Selector + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.PodDisruptionBudgets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var pdbList []*policy.PodDisruptionBudget + for i := range list { + pdb := list[i] + selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) + if err != nil { + glog.Warningf("invalid selector: %v", err) + // TODO(mml): add an event to the PDB + continue + } + + // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + pdbList = append(pdbList, pdb) + } + + if len(pdbList) == 0 { + return nil, fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return pdbList, nil +} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go new file mode 100644 index 000000000000..9ca59849f26a --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/client-go/pkg/apis/rbac" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + "k8s.io/client-go/tools/cache" +) + +// ClusterRoleLister helps list ClusterRoles. +type ClusterRoleLister interface { + // List lists all ClusterRoles in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error) + // Get retrieves the ClusterRole from the index for a given name. + Get(name string) (*v1alpha1.ClusterRole, error) + ClusterRoleListerExpansion +} + +// clusterRoleLister implements the ClusterRoleLister interface. +type clusterRoleLister struct { + indexer cache.Indexer +} + +// NewClusterRoleLister returns a new ClusterRoleLister. +func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister { + return &clusterRoleLister{indexer: indexer} +} + +// List lists all ClusterRoles in the indexer. +func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ClusterRole)) + }) + return ret, err +} + +// Get retrieves the ClusterRole from the index for a given name. +func (s *clusterRoleLister) Get(name string) (*v1alpha1.ClusterRole, error) { + key := &v1alpha1.ClusterRole{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("clusterrole"), name) + } + return obj.(*v1alpha1.ClusterRole), nil +} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go new file mode 100644 index 000000000000..1bc98e6397c0 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/client-go/pkg/apis/rbac" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + "k8s.io/client-go/tools/cache" +) + +// ClusterRoleBindingLister helps list ClusterRoleBindings. +type ClusterRoleBindingLister interface { + // List lists all ClusterRoleBindings in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error) + // Get retrieves the ClusterRoleBinding from the index for a given name. + Get(name string) (*v1alpha1.ClusterRoleBinding, error) + ClusterRoleBindingListerExpansion +} + +// clusterRoleBindingLister implements the ClusterRoleBindingLister interface. +type clusterRoleBindingLister struct { + indexer cache.Indexer +} + +// NewClusterRoleBindingLister returns a new ClusterRoleBindingLister. +func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister { + return &clusterRoleBindingLister{indexer: indexer} +} + +// List lists all ClusterRoleBindings in the indexer. +func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ClusterRoleBinding)) + }) + return ret, err +} + +// Get retrieves the ClusterRoleBinding from the index for a given name. +func (s *clusterRoleBindingLister) Get(name string) (*v1alpha1.ClusterRoleBinding, error) { + key := &v1alpha1.ClusterRoleBinding{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("clusterrolebinding"), name) + } + return obj.(*v1alpha1.ClusterRoleBinding), nil +} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go new file mode 100644 index 000000000000..30eed015d884 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1alpha1 + +// ClusterRoleListerExpansion allows custom methods to be added to +// ClusterRoleLister. +type ClusterRoleListerExpansion interface{} + +// ClusterRoleBindingListerExpansion allows custom methods to be added to +// ClusterRoleBindingLister. +type ClusterRoleBindingListerExpansion interface{} + +// RoleListerExpansion allows custom methods to be added to +// RoleLister. +type RoleListerExpansion interface{} + +// RoleNamespaceListerExpansion allows custom methods to be added to +// RoleNamespaeLister. +type RoleNamespaceListerExpansion interface{} + +// RoleBindingListerExpansion allows custom methods to be added to +// RoleBindingLister. +type RoleBindingListerExpansion interface{} + +// RoleBindingNamespaceListerExpansion allows custom methods to be added to +// RoleBindingNamespaeLister. +type RoleBindingNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/role.go new file mode 100644 index 000000000000..cbd221973281 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/role.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/client-go/pkg/apis/rbac" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + "k8s.io/client-go/tools/cache" +) + +// RoleLister helps list Roles. +type RoleLister interface { + // List lists all Roles in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.Role, err error) + // Roles returns an object that can list and get Roles. + Roles(namespace string) RoleNamespaceLister + RoleListerExpansion +} + +// roleLister implements the RoleLister interface. +type roleLister struct { + indexer cache.Indexer +} + +// NewRoleLister returns a new RoleLister. +func NewRoleLister(indexer cache.Indexer) RoleLister { + return &roleLister{indexer: indexer} +} + +// List lists all Roles in the indexer. +func (s *roleLister) List(selector labels.Selector) (ret []*v1alpha1.Role, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.Role)) + }) + return ret, err +} + +// Roles returns an object that can list and get Roles. +func (s *roleLister) Roles(namespace string) RoleNamespaceLister { + return roleNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RoleNamespaceLister helps list and get Roles. +type RoleNamespaceLister interface { + // List lists all Roles in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.Role, err error) + // Get retrieves the Role from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.Role, error) + RoleNamespaceListerExpansion +} + +// roleNamespaceLister implements the RoleNamespaceLister +// interface. +type roleNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Roles in the indexer for a given namespace. +func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Role, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.Role)) + }) + return ret, err +} + +// Get retrieves the Role from the indexer for a given namespace and name. +func (s roleNamespaceLister) Get(name string) (*v1alpha1.Role, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("role"), name) + } + return obj.(*v1alpha1.Role), nil +} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go new file mode 100644 index 000000000000..4828048a3661 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/client-go/pkg/apis/rbac" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + "k8s.io/client-go/tools/cache" +) + +// RoleBindingLister helps list RoleBindings. +type RoleBindingLister interface { + // List lists all RoleBindings in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) + // RoleBindings returns an object that can list and get RoleBindings. + RoleBindings(namespace string) RoleBindingNamespaceLister + RoleBindingListerExpansion +} + +// roleBindingLister implements the RoleBindingLister interface. +type roleBindingLister struct { + indexer cache.Indexer +} + +// NewRoleBindingLister returns a new RoleBindingLister. +func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister { + return &roleBindingLister{indexer: indexer} +} + +// List lists all RoleBindings in the indexer. +func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.RoleBinding)) + }) + return ret, err +} + +// RoleBindings returns an object that can list and get RoleBindings. +func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceLister { + return roleBindingNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RoleBindingNamespaceLister helps list and get RoleBindings. +type RoleBindingNamespaceLister interface { + // List lists all RoleBindings in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) + // Get retrieves the RoleBinding from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.RoleBinding, error) + RoleBindingNamespaceListerExpansion +} + +// roleBindingNamespaceLister implements the RoleBindingNamespaceLister +// interface. +type roleBindingNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all RoleBindings in the indexer for a given namespace. +func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.RoleBinding)) + }) + return ret, err +} + +// Get retrieves the RoleBinding from the indexer for a given namespace and name. +func (s roleBindingNamespaceLister) Get(name string) (*v1alpha1.RoleBinding, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("rolebinding"), name) + } + return obj.(*v1alpha1.RoleBinding), nil +} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go new file mode 100644 index 000000000000..b59b6952e257 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/client-go/pkg/apis/rbac" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// ClusterRoleLister helps list ClusterRoles. +type ClusterRoleLister interface { + // List lists all ClusterRoles in the indexer. + List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) + // Get retrieves the ClusterRole from the index for a given name. + Get(name string) (*v1beta1.ClusterRole, error) + ClusterRoleListerExpansion +} + +// clusterRoleLister implements the ClusterRoleLister interface. +type clusterRoleLister struct { + indexer cache.Indexer +} + +// NewClusterRoleLister returns a new ClusterRoleLister. +func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister { + return &clusterRoleLister{indexer: indexer} +} + +// List lists all ClusterRoles in the indexer. +func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ClusterRole)) + }) + return ret, err +} + +// Get retrieves the ClusterRole from the index for a given name. +func (s *clusterRoleLister) Get(name string) (*v1beta1.ClusterRole, error) { + key := &v1beta1.ClusterRole{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("clusterrole"), name) + } + return obj.(*v1beta1.ClusterRole), nil +} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go new file mode 100644 index 000000000000..3d83381bbdb9 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/client-go/pkg/apis/rbac" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// ClusterRoleBindingLister helps list ClusterRoleBindings. +type ClusterRoleBindingLister interface { + // List lists all ClusterRoleBindings in the indexer. + List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) + // Get retrieves the ClusterRoleBinding from the index for a given name. + Get(name string) (*v1beta1.ClusterRoleBinding, error) + ClusterRoleBindingListerExpansion +} + +// clusterRoleBindingLister implements the ClusterRoleBindingLister interface. +type clusterRoleBindingLister struct { + indexer cache.Indexer +} + +// NewClusterRoleBindingLister returns a new ClusterRoleBindingLister. +func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister { + return &clusterRoleBindingLister{indexer: indexer} +} + +// List lists all ClusterRoleBindings in the indexer. +func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ClusterRoleBinding)) + }) + return ret, err +} + +// Get retrieves the ClusterRoleBinding from the index for a given name. +func (s *clusterRoleBindingLister) Get(name string) (*v1beta1.ClusterRoleBinding, error) { + key := &v1beta1.ClusterRoleBinding{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("clusterrolebinding"), name) + } + return obj.(*v1beta1.ClusterRoleBinding), nil +} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go new file mode 100644 index 000000000000..3af76eabdf5b --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +// ClusterRoleListerExpansion allows custom methods to be added to +// ClusterRoleLister. +type ClusterRoleListerExpansion interface{} + +// ClusterRoleBindingListerExpansion allows custom methods to be added to +// ClusterRoleBindingLister. +type ClusterRoleBindingListerExpansion interface{} + +// RoleListerExpansion allows custom methods to be added to +// RoleLister. +type RoleListerExpansion interface{} + +// RoleNamespaceListerExpansion allows custom methods to be added to +// RoleNamespaeLister. +type RoleNamespaceListerExpansion interface{} + +// RoleBindingListerExpansion allows custom methods to be added to +// RoleBindingLister. +type RoleBindingListerExpansion interface{} + +// RoleBindingNamespaceListerExpansion allows custom methods to be added to +// RoleBindingNamespaeLister. +type RoleBindingNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/role.go new file mode 100644 index 000000000000..2e7929775470 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/role.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/client-go/pkg/apis/rbac" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// RoleLister helps list Roles. +type RoleLister interface { + // List lists all Roles in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Role, err error) + // Roles returns an object that can list and get Roles. + Roles(namespace string) RoleNamespaceLister + RoleListerExpansion +} + +// roleLister implements the RoleLister interface. +type roleLister struct { + indexer cache.Indexer +} + +// NewRoleLister returns a new RoleLister. +func NewRoleLister(indexer cache.Indexer) RoleLister { + return &roleLister{indexer: indexer} +} + +// List lists all Roles in the indexer. +func (s *roleLister) List(selector labels.Selector) (ret []*v1beta1.Role, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Role)) + }) + return ret, err +} + +// Roles returns an object that can list and get Roles. +func (s *roleLister) Roles(namespace string) RoleNamespaceLister { + return roleNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RoleNamespaceLister helps list and get Roles. +type RoleNamespaceLister interface { + // List lists all Roles in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Role, err error) + // Get retrieves the Role from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Role, error) + RoleNamespaceListerExpansion +} + +// roleNamespaceLister implements the RoleNamespaceLister +// interface. +type roleNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Roles in the indexer for a given namespace. +func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Role, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Role)) + }) + return ret, err +} + +// Get retrieves the Role from the indexer for a given namespace and name. +func (s roleNamespaceLister) Get(name string) (*v1beta1.Role, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("role"), name) + } + return obj.(*v1beta1.Role), nil +} diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go new file mode 100644 index 000000000000..1a5b1ae77b80 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/client-go/pkg/apis/rbac" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// RoleBindingLister helps list RoleBindings. +type RoleBindingLister interface { + // List lists all RoleBindings in the indexer. + List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) + // RoleBindings returns an object that can list and get RoleBindings. + RoleBindings(namespace string) RoleBindingNamespaceLister + RoleBindingListerExpansion +} + +// roleBindingLister implements the RoleBindingLister interface. +type roleBindingLister struct { + indexer cache.Indexer +} + +// NewRoleBindingLister returns a new RoleBindingLister. +func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister { + return &roleBindingLister{indexer: indexer} +} + +// List lists all RoleBindings in the indexer. +func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.RoleBinding)) + }) + return ret, err +} + +// RoleBindings returns an object that can list and get RoleBindings. +func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceLister { + return roleBindingNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RoleBindingNamespaceLister helps list and get RoleBindings. +type RoleBindingNamespaceLister interface { + // List lists all RoleBindings in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) + // Get retrieves the RoleBinding from the indexer for a given namespace and name. + Get(name string) (*v1beta1.RoleBinding, error) + RoleBindingNamespaceListerExpansion +} + +// roleBindingNamespaceLister implements the RoleBindingNamespaceLister +// interface. +type roleBindingNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all RoleBindings in the indexer for a given namespace. +func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.RoleBinding)) + }) + return ret, err +} + +// Get retrieves the RoleBinding from the indexer for a given namespace and name. +func (s roleBindingNamespaceLister) Get(name string) (*v1beta1.RoleBinding, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("rolebinding"), name) + } + return obj.(*v1beta1.RoleBinding), nil +} diff --git a/staging/src/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go new file mode 100644 index 000000000000..84e0f9c440b5 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go @@ -0,0 +1,23 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +// StorageClassListerExpansion allows custom methods to be added to +// StorageClassLister. +type StorageClassListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/storage/v1beta1/storageclass.go b/staging/src/k8s.io/client-go/listers/storage/v1beta1/storageclass.go new file mode 100644 index 000000000000..513046c8a1b5 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/storage/v1beta1/storageclass.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + storage "k8s.io/client-go/pkg/apis/storage" + v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1" + "k8s.io/client-go/tools/cache" +) + +// StorageClassLister helps list StorageClasses. +type StorageClassLister interface { + // List lists all StorageClasses in the indexer. + List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error) + // Get retrieves the StorageClass from the index for a given name. + Get(name string) (*v1beta1.StorageClass, error) + StorageClassListerExpansion +} + +// storageClassLister implements the StorageClassLister interface. +type storageClassLister struct { + indexer cache.Indexer +} + +// NewStorageClassLister returns a new StorageClassLister. +func NewStorageClassLister(indexer cache.Indexer) StorageClassLister { + return &storageClassLister{indexer: indexer} +} + +// List lists all StorageClasses in the indexer. +func (s *storageClassLister) List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.StorageClass)) + }) + return ret, err +} + +// Get retrieves the StorageClass from the index for a given name. +func (s *storageClassLister) Get(name string) (*v1beta1.StorageClass, error) { + key := &v1beta1.StorageClass{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(storage.Resource("storageclass"), name) + } + return obj.(*v1beta1.StorageClass), nil +} diff --git a/vendor/BUILD b/vendor/BUILD index a12af8d348e7..3028203a4db5 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -15687,3 +15687,643 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", ], ) + +go_library( + name = "k8s.io/client-go/informers", + srcs = [ + "k8s.io/client-go/informers/factory.go", + "k8s.io/client-go/informers/generic.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/client-go/informers/apps", + "//vendor:k8s.io/client-go/informers/autoscaling", + "//vendor:k8s.io/client-go/informers/batch", + "//vendor:k8s.io/client-go/informers/certificates", + "//vendor:k8s.io/client-go/informers/core", + "//vendor:k8s.io/client-go/informers/extensions", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/informers/policy", + "//vendor:k8s.io/client-go/informers/rbac", + "//vendor:k8s.io/client-go/informers/storage", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/pkg/api/v1", + "//vendor:k8s.io/client-go/pkg/apis/apps/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v1", + "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v2alpha1", + "//vendor:k8s.io/client-go/pkg/apis/batch/v1", + "//vendor:k8s.io/client-go/pkg/apis/batch/v2alpha1", + "//vendor:k8s.io/client-go/pkg/apis/certificates/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/extensions/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/rbac/v1alpha1", + "//vendor:k8s.io/client-go/pkg/apis/rbac/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/storage/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/apps", + srcs = ["k8s.io/client-go/informers/apps/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/apps/v1beta1", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + ], +) + +go_library( + name = "k8s.io/client-go/informers/apps/v1beta1", + srcs = [ + "k8s.io/client-go/informers/apps/v1beta1/interface.go", + "k8s.io/client-go/informers/apps/v1beta1/statefulset.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/apps/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/apps/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/autoscaling", + srcs = ["k8s.io/client-go/informers/autoscaling/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/autoscaling/v1", + "//vendor:k8s.io/client-go/informers/autoscaling/v2alpha1", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + ], +) + +go_library( + name = "k8s.io/client-go/informers/autoscaling/v1", + srcs = [ + "k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go", + "k8s.io/client-go/informers/autoscaling/v1/interface.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/autoscaling/v1", + "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/autoscaling/v2alpha1", + srcs = [ + "k8s.io/client-go/informers/autoscaling/v2alpha1/horizontalpodautoscaler.go", + "k8s.io/client-go/informers/autoscaling/v2alpha1/interface.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/autoscaling/v2alpha1", + "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v2alpha1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/batch", + srcs = ["k8s.io/client-go/informers/batch/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/batch/v1", + "//vendor:k8s.io/client-go/informers/batch/v2alpha1", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + ], +) + +go_library( + name = "k8s.io/client-go/informers/batch/v1", + srcs = [ + "k8s.io/client-go/informers/batch/v1/interface.go", + "k8s.io/client-go/informers/batch/v1/job.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/batch/v1", + "//vendor:k8s.io/client-go/pkg/apis/batch/v1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/batch/v2alpha1", + srcs = [ + "k8s.io/client-go/informers/batch/v2alpha1/cronjob.go", + "k8s.io/client-go/informers/batch/v2alpha1/interface.go", + "k8s.io/client-go/informers/batch/v2alpha1/job.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/batch/v2alpha1", + "//vendor:k8s.io/client-go/pkg/apis/batch/v2alpha1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/certificates", + srcs = ["k8s.io/client-go/informers/certificates/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/certificates/v1beta1", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + ], +) + +go_library( + name = "k8s.io/client-go/informers/certificates/v1beta1", + srcs = [ + "k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go", + "k8s.io/client-go/informers/certificates/v1beta1/interface.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/certificates/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/certificates/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/core", + srcs = ["k8s.io/client-go/informers/core/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/core/v1", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + ], +) + +go_library( + name = "k8s.io/client-go/informers/core/v1", + srcs = [ + "k8s.io/client-go/informers/core/v1/componentstatus.go", + "k8s.io/client-go/informers/core/v1/configmap.go", + "k8s.io/client-go/informers/core/v1/endpoints.go", + "k8s.io/client-go/informers/core/v1/event.go", + "k8s.io/client-go/informers/core/v1/interface.go", + "k8s.io/client-go/informers/core/v1/limitrange.go", + "k8s.io/client-go/informers/core/v1/namespace.go", + "k8s.io/client-go/informers/core/v1/node.go", + "k8s.io/client-go/informers/core/v1/persistentvolume.go", + "k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go", + "k8s.io/client-go/informers/core/v1/pod.go", + "k8s.io/client-go/informers/core/v1/podtemplate.go", + "k8s.io/client-go/informers/core/v1/replicationcontroller.go", + "k8s.io/client-go/informers/core/v1/resourcequota.go", + "k8s.io/client-go/informers/core/v1/secret.go", + "k8s.io/client-go/informers/core/v1/service.go", + "k8s.io/client-go/informers/core/v1/serviceaccount.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/core/v1", + "//vendor:k8s.io/client-go/pkg/api/v1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/extensions", + srcs = ["k8s.io/client-go/informers/extensions/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/extensions/v1beta1", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + ], +) + +go_library( + name = "k8s.io/client-go/informers/extensions/v1beta1", + srcs = [ + "k8s.io/client-go/informers/extensions/v1beta1/daemonset.go", + "k8s.io/client-go/informers/extensions/v1beta1/deployment.go", + "k8s.io/client-go/informers/extensions/v1beta1/ingress.go", + "k8s.io/client-go/informers/extensions/v1beta1/interface.go", + "k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go", + "k8s.io/client-go/informers/extensions/v1beta1/replicaset.go", + "k8s.io/client-go/informers/extensions/v1beta1/thirdpartyresource.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/extensions/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/extensions/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/internalinterfaces", + srcs = ["k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/policy", + srcs = ["k8s.io/client-go/informers/policy/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/informers/policy/v1beta1", + ], +) + +go_library( + name = "k8s.io/client-go/informers/policy/v1beta1", + srcs = [ + "k8s.io/client-go/informers/policy/v1beta1/interface.go", + "k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/policy/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/rbac", + srcs = ["k8s.io/client-go/informers/rbac/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/informers/rbac/v1alpha1", + "//vendor:k8s.io/client-go/informers/rbac/v1beta1", + ], +) + +go_library( + name = "k8s.io/client-go/informers/rbac/v1alpha1", + srcs = [ + "k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go", + "k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go", + "k8s.io/client-go/informers/rbac/v1alpha1/interface.go", + "k8s.io/client-go/informers/rbac/v1alpha1/role.go", + "k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/rbac/v1alpha1", + "//vendor:k8s.io/client-go/pkg/apis/rbac/v1alpha1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/rbac/v1beta1", + srcs = [ + "k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go", + "k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go", + "k8s.io/client-go/informers/rbac/v1beta1/interface.go", + "k8s.io/client-go/informers/rbac/v1beta1/role.go", + "k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/rbac/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/rbac/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/informers/storage", + srcs = ["k8s.io/client-go/informers/storage/interface.go"], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/informers/storage/v1beta1", + ], +) + +go_library( + name = "k8s.io/client-go/informers/storage/v1beta1", + srcs = [ + "k8s.io/client-go/informers/storage/v1beta1/interface.go", + "k8s.io/client-go/informers/storage/v1beta1/storageclass.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/informers/internalinterfaces", + "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/listers/storage/v1beta1", + "//vendor:k8s.io/client-go/pkg/apis/storage/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/apps/v1beta1", + srcs = [ + "k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go", + "k8s.io/client-go/listers/apps/v1beta1/statefulset.go", + "k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/api/v1", + "//vendor:k8s.io/client-go/pkg/apis/apps", + "//vendor:k8s.io/client-go/pkg/apis/apps/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/autoscaling/v1", + srcs = [ + "k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go", + "k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/apis/autoscaling", + "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/autoscaling/v2alpha1", + srcs = [ + "k8s.io/client-go/listers/autoscaling/v2alpha1/expansion_generated.go", + "k8s.io/client-go/listers/autoscaling/v2alpha1/horizontalpodautoscaler.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/apis/autoscaling", + "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v2alpha1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/batch/v1", + srcs = [ + "k8s.io/client-go/listers/batch/v1/expansion_generated.go", + "k8s.io/client-go/listers/batch/v1/job.go", + "k8s.io/client-go/listers/batch/v1/job_expansion.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/api/v1", + "//vendor:k8s.io/client-go/pkg/apis/batch", + "//vendor:k8s.io/client-go/pkg/apis/batch/v1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/batch/v2alpha1", + srcs = [ + "k8s.io/client-go/listers/batch/v2alpha1/cronjob.go", + "k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go", + "k8s.io/client-go/listers/batch/v2alpha1/job.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/apis/batch", + "//vendor:k8s.io/client-go/pkg/apis/batch/v2alpha1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/certificates/v1beta1", + srcs = [ + "k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go", + "k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/apis/certificates", + "//vendor:k8s.io/client-go/pkg/apis/certificates/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/core/v1", + srcs = [ + "k8s.io/client-go/listers/core/v1/componentstatus.go", + "k8s.io/client-go/listers/core/v1/configmap.go", + "k8s.io/client-go/listers/core/v1/endpoints.go", + "k8s.io/client-go/listers/core/v1/event.go", + "k8s.io/client-go/listers/core/v1/expansion_generated.go", + "k8s.io/client-go/listers/core/v1/limitrange.go", + "k8s.io/client-go/listers/core/v1/namespace.go", + "k8s.io/client-go/listers/core/v1/node.go", + "k8s.io/client-go/listers/core/v1/node_expansion.go", + "k8s.io/client-go/listers/core/v1/persistentvolume.go", + "k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go", + "k8s.io/client-go/listers/core/v1/pod.go", + "k8s.io/client-go/listers/core/v1/podtemplate.go", + "k8s.io/client-go/listers/core/v1/replicationcontroller.go", + "k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go", + "k8s.io/client-go/listers/core/v1/resourcequota.go", + "k8s.io/client-go/listers/core/v1/secret.go", + "k8s.io/client-go/listers/core/v1/service.go", + "k8s.io/client-go/listers/core/v1/service_expansion.go", + "k8s.io/client-go/listers/core/v1/serviceaccount.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/api", + "//vendor:k8s.io/client-go/pkg/api/v1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/extensions/v1beta1", + srcs = [ + "k8s.io/client-go/listers/extensions/v1beta1/daemonset.go", + "k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go", + "k8s.io/client-go/listers/extensions/v1beta1/deployment.go", + "k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go", + "k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go", + "k8s.io/client-go/listers/extensions/v1beta1/ingress.go", + "k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go", + "k8s.io/client-go/listers/extensions/v1beta1/replicaset.go", + "k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go", + "k8s.io/client-go/listers/extensions/v1beta1/scale.go", + "k8s.io/client-go/listers/extensions/v1beta1/thirdpartyresource.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/api/v1", + "//vendor:k8s.io/client-go/pkg/apis/extensions", + "//vendor:k8s.io/client-go/pkg/apis/extensions/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/policy/v1beta1", + srcs = [ + "k8s.io/client-go/listers/policy/v1beta1/eviction.go", + "k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go", + "k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go", + "k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/api/v1", + "//vendor:k8s.io/client-go/pkg/apis/policy", + "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/rbac/v1alpha1", + srcs = [ + "k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go", + "k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go", + "k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go", + "k8s.io/client-go/listers/rbac/v1alpha1/role.go", + "k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/apis/rbac", + "//vendor:k8s.io/client-go/pkg/apis/rbac/v1alpha1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/rbac/v1beta1", + srcs = [ + "k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go", + "k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go", + "k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go", + "k8s.io/client-go/listers/rbac/v1beta1/role.go", + "k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/apis/rbac", + "//vendor:k8s.io/client-go/pkg/apis/rbac/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + +go_library( + name = "k8s.io/client-go/listers/storage/v1beta1", + srcs = [ + "k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go", + "k8s.io/client-go/listers/storage/v1beta1/storageclass.go", + ], + tags = ["automanaged"], + deps = [ + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/pkg/apis/storage", + "//vendor:k8s.io/client-go/pkg/apis/storage/v1beta1", + "//vendor:k8s.io/client-go/tools/cache", + ], +)