diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 5521b59c..351933f1 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -376,299 +376,303 @@ }, { "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + }, + { + "ImportPath": "k8s.io/api/apps/v1", + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/apps/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/apps/v1beta2", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/authentication/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/authentication/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/authorization/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/authorization/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/autoscaling/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/autoscaling/v2beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/batch/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/batch/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/batch/v2alpha1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/certificates/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/core/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/extensions/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/imagepolicy/v1alpha1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/networking/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/policy/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/rbac/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/rbac/v1alpha1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/rbac/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/scheduling/v1alpha1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/settings/v1alpha1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/storage/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/api/storage/v1beta1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/equality", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/unstructured", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/cache", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/clock", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" + "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", diff --git a/informers/BUILD b/informers/BUILD index 1b1df145..41d83f38 100644 --- a/informers/BUILD +++ b/informers/BUILD @@ -13,6 +13,7 @@ go_library( ], deps = [ "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", + "//vendor/k8s.io/api/apps/v1:go_default_library", "//vendor/k8s.io/api/apps/v1beta1:go_default_library", "//vendor/k8s.io/api/apps/v1beta2:go_default_library", "//vendor/k8s.io/api/autoscaling/v1:go_default_library", diff --git a/informers/apps/BUILD b/informers/apps/BUILD index f7c0d115..ac42ea4d 100644 --- a/informers/apps/BUILD +++ b/informers/apps/BUILD @@ -9,6 +9,7 @@ go_library( name = "go_default_library", srcs = ["interface.go"], deps = [ + "//vendor/k8s.io/client-go/informers/apps/v1:go_default_library", "//vendor/k8s.io/client-go/informers/apps/v1beta1:go_default_library", "//vendor/k8s.io/client-go/informers/apps/v1beta2:go_default_library", "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", @@ -26,6 +27,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/client-go/informers/apps/v1:all-srcs", "//staging/src/k8s.io/client-go/informers/apps/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/informers/apps/v1beta2:all-srcs", ], diff --git a/informers/apps/interface.go b/informers/apps/interface.go index 8be06cfd..9344787c 100644 --- a/informers/apps/interface.go +++ b/informers/apps/interface.go @@ -19,6 +19,7 @@ limitations under the License. package apps import ( + v1 "k8s.io/client-go/informers/apps/v1" v1beta1 "k8s.io/client-go/informers/apps/v1beta1" v1beta2 "k8s.io/client-go/informers/apps/v1beta2" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -26,6 +27,8 @@ import ( // 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 // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface // V1beta2 provides access to shared informers for resources in V1beta2. @@ -41,6 +44,11 @@ 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) +} + // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.SharedInformerFactory) diff --git a/informers/apps/v1/BUILD b/informers/apps/v1/BUILD new file mode 100644 index 00000000..2e3bc9cf --- /dev/null +++ b/informers/apps/v1/BUILD @@ -0,0 +1,34 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "daemonset.go", + "interface.go", + ], + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/listers/apps/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/informers/apps/v1/daemonset.go b/informers/apps/v1/daemonset.go new file mode 100644 index 00000000..6dad76a0 --- /dev/null +++ b/informers/apps/v1/daemonset.go @@ -0,0 +1,73 @@ +/* +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 ( + apps_v1 "k8s.io/api/apps/v1" + 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/apps/v1" + 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() v1.DaemonSetLister +} + +type daemonSetInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +// NewDaemonSetInformer constructs a new informer for DaemonSet type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.AppsV1().DaemonSets(namespace).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.AppsV1().DaemonSets(namespace).Watch(options) + }, + }, + &apps_v1.DaemonSet{}, + resyncPeriod, + indexers, + ) +} + +func defaultDaemonSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewDaemonSetInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) +} + +func (f *daemonSetInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&apps_v1.DaemonSet{}, defaultDaemonSetInformer) +} + +func (f *daemonSetInformer) Lister() v1.DaemonSetLister { + return v1.NewDaemonSetLister(f.Informer().GetIndexer()) +} diff --git a/informers/apps/v1/interface.go b/informers/apps/v1/interface.go new file mode 100644 index 00000000..82e557c9 --- /dev/null +++ b/informers/apps/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 { + // DaemonSets returns a DaemonSetInformer. + DaemonSets() DaemonSetInformer +} + +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} +} diff --git a/informers/generic.go b/informers/generic.go index 23c4440c..67b1d4cd 100644 --- a/informers/generic.go +++ b/informers/generic.go @@ -21,9 +21,10 @@ package informers import ( "fmt" v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + v1 "k8s.io/api/apps/v1" v1beta1 "k8s.io/api/apps/v1beta1" v1beta2 "k8s.io/api/apps/v1beta2" - v1 "k8s.io/api/autoscaling/v1" + autoscaling_v1 "k8s.io/api/autoscaling/v1" v2beta1 "k8s.io/api/autoscaling/v2beta1" batch_v1 "k8s.io/api/batch/v1" batch_v1beta1 "k8s.io/api/batch/v1beta1" @@ -76,6 +77,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1alpha1.SchemeGroupVersion.WithResource("initializerconfigurations"): return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().InitializerConfigurations().Informer()}, nil + // Group=Apps, Version=V1 + case v1.SchemeGroupVersion.WithResource("daemonsets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1().DaemonSets().Informer()}, nil + // Group=Apps, Version=V1beta1 case v1beta1.SchemeGroupVersion.WithResource("controllerrevisions"): return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().ControllerRevisions().Informer()}, nil @@ -97,7 +102,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().StatefulSets().Informer()}, nil // Group=Autoscaling, Version=V1 - case v1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): + case autoscaling_v1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil // Group=Autoscaling, Version=V2beta1 diff --git a/kubernetes/BUILD b/kubernetes/BUILD index 2a15cc0a..00eff326 100644 --- a/kubernetes/BUILD +++ b/kubernetes/BUILD @@ -16,6 +16,7 @@ go_library( "//vendor/github.com/golang/glog:go_default_library", "//vendor/k8s.io/client-go/discovery:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", @@ -58,6 +59,7 @@ filegroup( "//staging/src/k8s.io/client-go/kubernetes/fake:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/scheme:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:all-srcs", + "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:all-srcs", diff --git a/kubernetes/clientset.go b/kubernetes/clientset.go index d0070914..310eb61b 100644 --- a/kubernetes/clientset.go +++ b/kubernetes/clientset.go @@ -20,6 +20,7 @@ import ( glog "github.com/golang/glog" discovery "k8s.io/client-go/discovery" admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" + appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1" @@ -54,8 +55,9 @@ type Interface interface { Admissionregistration() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface AppsV1beta1() appsv1beta1.AppsV1beta1Interface AppsV1beta2() appsv1beta2.AppsV1beta2Interface + AppsV1() appsv1.AppsV1Interface // Deprecated: please explicitly pick a version if possible. - Apps() appsv1beta2.AppsV1beta2Interface + Apps() appsv1.AppsV1Interface AuthenticationV1() authenticationv1.AuthenticationV1Interface // Deprecated: please explicitly pick a version if possible. Authentication() authenticationv1.AuthenticationV1Interface @@ -112,6 +114,7 @@ type Clientset struct { admissionregistrationV1alpha1 *admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Client appsV1beta1 *appsv1beta1.AppsV1beta1Client appsV1beta2 *appsv1beta2.AppsV1beta2Client + appsV1 *appsv1.AppsV1Client authenticationV1 *authenticationv1.AuthenticationV1Client authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client authorizationV1 *authorizationv1.AuthorizationV1Client @@ -156,10 +159,15 @@ func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface { return c.appsV1beta2 } +// AppsV1 retrieves the AppsV1Client +func (c *Clientset) AppsV1() appsv1.AppsV1Interface { + return c.appsV1 +} + // Deprecated: Apps retrieves the default version of AppsClient. // Please explicitly pick a version. -func (c *Clientset) Apps() appsv1beta2.AppsV1beta2Interface { - return c.appsV1beta2 +func (c *Clientset) Apps() appsv1.AppsV1Interface { + return c.appsV1 } // AuthenticationV1 retrieves the AuthenticationV1Client @@ -373,6 +381,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.appsV1, err = appsv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.authenticationV1, err = authenticationv1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -473,6 +485,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.admissionregistrationV1alpha1 = admissionregistrationv1alpha1.NewForConfigOrDie(c) cs.appsV1beta1 = appsv1beta1.NewForConfigOrDie(c) cs.appsV1beta2 = appsv1beta2.NewForConfigOrDie(c) + cs.appsV1 = appsv1.NewForConfigOrDie(c) cs.authenticationV1 = authenticationv1.NewForConfigOrDie(c) cs.authenticationV1beta1 = authenticationv1beta1.NewForConfigOrDie(c) cs.authorizationV1 = authorizationv1.NewForConfigOrDie(c) @@ -505,6 +518,7 @@ func New(c rest.Interface) *Clientset { cs.admissionregistrationV1alpha1 = admissionregistrationv1alpha1.New(c) cs.appsV1beta1 = appsv1beta1.New(c) cs.appsV1beta2 = appsv1beta2.New(c) + cs.appsV1 = appsv1.New(c) cs.authenticationV1 = authenticationv1.New(c) cs.authenticationV1beta1 = authenticationv1beta1.New(c) cs.authorizationV1 = authorizationv1.New(c) diff --git a/kubernetes/fake/BUILD b/kubernetes/fake/BUILD index 046bd515..f40fec3a 100644 --- a/kubernetes/fake/BUILD +++ b/kubernetes/fake/BUILD @@ -14,6 +14,7 @@ go_library( ], deps = [ "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", + "//vendor/k8s.io/api/apps/v1:go_default_library", "//vendor/k8s.io/api/apps/v1beta1:go_default_library", "//vendor/k8s.io/api/apps/v1beta2:go_default_library", "//vendor/k8s.io/api/authentication/v1:go_default_library", @@ -47,6 +48,8 @@ go_library( "//vendor/k8s.io/client-go/kubernetes:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", diff --git a/kubernetes/fake/clientset_generated.go b/kubernetes/fake/clientset_generated.go index 0983f4c2..e5fb713d 100644 --- a/kubernetes/fake/clientset_generated.go +++ b/kubernetes/fake/clientset_generated.go @@ -24,6 +24,8 @@ import ( clientset "k8s.io/client-go/kubernetes" admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" fakeadmissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake" + appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" + fakeappsv1 "k8s.io/client-go/kubernetes/typed/apps/v1/fake" appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" fakeappsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake" appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" @@ -126,9 +128,14 @@ func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface { return &fakeappsv1beta2.FakeAppsV1beta2{Fake: &c.Fake} } -// Apps retrieves the AppsV1beta2Client -func (c *Clientset) Apps() appsv1beta2.AppsV1beta2Interface { - return &fakeappsv1beta2.FakeAppsV1beta2{Fake: &c.Fake} +// AppsV1 retrieves the AppsV1Client +func (c *Clientset) AppsV1() appsv1.AppsV1Interface { + return &fakeappsv1.FakeAppsV1{Fake: &c.Fake} +} + +// Apps retrieves the AppsV1Client +func (c *Clientset) Apps() appsv1.AppsV1Interface { + return &fakeappsv1.FakeAppsV1{Fake: &c.Fake} } // AuthenticationV1 retrieves the AuthenticationV1Client diff --git a/kubernetes/fake/register.go b/kubernetes/fake/register.go index 6395d73d..f649ff5c 100644 --- a/kubernetes/fake/register.go +++ b/kubernetes/fake/register.go @@ -18,6 +18,7 @@ package fake import ( admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" appsv1beta2 "k8s.io/api/apps/v1beta2" authenticationv1 "k8s.io/api/authentication/v1" @@ -74,6 +75,7 @@ func AddToScheme(scheme *runtime.Scheme) { admissionregistrationv1alpha1.AddToScheme(scheme) appsv1beta1.AddToScheme(scheme) appsv1beta2.AddToScheme(scheme) + appsv1.AddToScheme(scheme) authenticationv1.AddToScheme(scheme) authenticationv1beta1.AddToScheme(scheme) authorizationv1.AddToScheme(scheme) diff --git a/kubernetes/scheme/BUILD b/kubernetes/scheme/BUILD index e0dc5f6f..fbb00668 100644 --- a/kubernetes/scheme/BUILD +++ b/kubernetes/scheme/BUILD @@ -13,6 +13,7 @@ go_library( ], deps = [ "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", + "//vendor/k8s.io/api/apps/v1:go_default_library", "//vendor/k8s.io/api/apps/v1beta1:go_default_library", "//vendor/k8s.io/api/apps/v1beta2:go_default_library", "//vendor/k8s.io/api/authentication/v1:go_default_library", diff --git a/kubernetes/scheme/register.go b/kubernetes/scheme/register.go index 0ee26387..984b8bc6 100644 --- a/kubernetes/scheme/register.go +++ b/kubernetes/scheme/register.go @@ -18,6 +18,7 @@ package scheme import ( admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" appsv1beta2 "k8s.io/api/apps/v1beta2" authenticationv1 "k8s.io/api/authentication/v1" @@ -74,6 +75,7 @@ func AddToScheme(scheme *runtime.Scheme) { admissionregistrationv1alpha1.AddToScheme(scheme) appsv1beta1.AddToScheme(scheme) appsv1beta2.AddToScheme(scheme) + appsv1.AddToScheme(scheme) authenticationv1.AddToScheme(scheme) authenticationv1beta1.AddToScheme(scheme) authorizationv1.AddToScheme(scheme) diff --git a/kubernetes/typed/apps/v1/BUILD b/kubernetes/typed/apps/v1/BUILD new file mode 100644 index 00000000..d603be08 --- /dev/null +++ b/kubernetes/typed/apps/v1/BUILD @@ -0,0 +1,38 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "apps_client.go", + "daemonset.go", + "doc.go", + "generated_expansion.go", + ], + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/kubernetes/typed/apps/v1/apps_client.go b/kubernetes/typed/apps/v1/apps_client.go new file mode 100644 index 00000000..20a09cd4 --- /dev/null +++ b/kubernetes/typed/apps/v1/apps_client.go @@ -0,0 +1,88 @@ +/* +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 ( + v1 "k8s.io/api/apps/v1" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type AppsV1Interface interface { + RESTClient() rest.Interface + DaemonSetsGetter +} + +// AppsV1Client is used to interact with features provided by the apps group. +type AppsV1Client struct { + restClient rest.Interface +} + +func (c *AppsV1Client) DaemonSets(namespace string) DaemonSetInterface { + return newDaemonSets(c, namespace) +} + +// NewForConfig creates a new AppsV1Client for the given config. +func NewForConfig(c *rest.Config) (*AppsV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AppsV1Client{client}, nil +} + +// NewForConfigOrDie creates a new AppsV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AppsV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AppsV1Client for the given RESTClient. +func New(c rest.Interface) *AppsV1Client { + return &AppsV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AppsV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/kubernetes/typed/apps/v1/daemonset.go b/kubernetes/typed/apps/v1/daemonset.go new file mode 100644 index 00000000..fd38c53c --- /dev/null +++ b/kubernetes/typed/apps/v1/daemonset.go @@ -0,0 +1,172 @@ +/* +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 ( + v1 "k8s.io/api/apps/v1" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// DaemonSetsGetter has a method to return a DaemonSetInterface. +// A group's client should implement this interface. +type DaemonSetsGetter interface { + DaemonSets(namespace string) DaemonSetInterface +} + +// DaemonSetInterface has methods to work with DaemonSet resources. +type DaemonSetInterface interface { + Create(*v1.DaemonSet) (*v1.DaemonSet, error) + Update(*v1.DaemonSet) (*v1.DaemonSet, error) + UpdateStatus(*v1.DaemonSet) (*v1.DaemonSet, error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.DaemonSet, error) + List(opts meta_v1.ListOptions) (*v1.DaemonSetList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) + DaemonSetExpansion +} + +// daemonSets implements DaemonSetInterface +type daemonSets struct { + client rest.Interface + ns string +} + +// newDaemonSets returns a DaemonSets +func newDaemonSets(c *AppsV1Client, namespace string) *daemonSets { + return &daemonSets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. +func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1.DaemonSet, err error) { + result = &v1.DaemonSet{} + err = c.client.Get(). + Namespace(c.ns). + Resource("daemonsets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DaemonSets that match those selectors. +func (c *daemonSets) List(opts meta_v1.ListOptions) (result *v1.DaemonSetList, err error) { + result = &v1.DaemonSetList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("daemonsets"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested daemonSets. +func (c *daemonSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("daemonsets"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *daemonSets) Create(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { + result = &v1.DaemonSet{} + err = c.client.Post(). + Namespace(c.ns). + Resource("daemonsets"). + Body(daemonSet). + Do(). + Into(result) + return +} + +// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *daemonSets) Update(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { + result = &v1.DaemonSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("daemonsets"). + Name(daemonSet.Name). + Body(daemonSet). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *daemonSets) UpdateStatus(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { + result = &v1.DaemonSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("daemonsets"). + Name(daemonSet.Name). + SubResource("status"). + Body(daemonSet). + Do(). + Into(result) + return +} + +// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. +func (c *daemonSets) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("daemonsets"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *daemonSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("daemonsets"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched daemonSet. +func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) { + result = &v1.DaemonSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("daemonsets"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/kubernetes/typed/apps/v1/doc.go b/kubernetes/typed/apps/v1/doc.go new file mode 100644 index 00000000..54673bfa --- /dev/null +++ b/kubernetes/typed/apps/v1/doc.go @@ -0,0 +1,20 @@ +/* +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 package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1 diff --git a/kubernetes/typed/apps/v1/fake/BUILD b/kubernetes/typed/apps/v1/fake/BUILD new file mode 100644 index 00000000..d20322a5 --- /dev/null +++ b/kubernetes/typed/apps/v1/fake/BUILD @@ -0,0 +1,36 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "fake_apps_client.go", + "fake_daemonset.go", + ], + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/kubernetes/typed/apps/v1/fake/doc.go b/kubernetes/typed/apps/v1/fake/doc.go new file mode 100644 index 00000000..c6548330 --- /dev/null +++ b/kubernetes/typed/apps/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +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 package is generated by client-gen with custom arguments. + +// Package fake has the automatically generated clients. +package fake diff --git a/kubernetes/typed/apps/v1/fake/fake_apps_client.go b/kubernetes/typed/apps/v1/fake/fake_apps_client.go new file mode 100644 index 00000000..8d9dcc9e --- /dev/null +++ b/kubernetes/typed/apps/v1/fake/fake_apps_client.go @@ -0,0 +1,38 @@ +/* +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 fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/apps/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAppsV1 struct { + *testing.Fake +} + +func (c *FakeAppsV1) DaemonSets(namespace string) v1.DaemonSetInterface { + return &FakeDaemonSets{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAppsV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/kubernetes/typed/apps/v1/fake/fake_daemonset.go b/kubernetes/typed/apps/v1/fake/fake_daemonset.go new file mode 100644 index 00000000..3f32ed1f --- /dev/null +++ b/kubernetes/typed/apps/v1/fake/fake_daemonset.go @@ -0,0 +1,138 @@ +/* +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 fake + +import ( + apps_v1 "k8s.io/api/apps/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeDaemonSets implements DaemonSetInterface +type FakeDaemonSets struct { + Fake *FakeAppsV1 + ns string +} + +var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "daemonsets"} + +var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"} + +// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. +func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *apps_v1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &apps_v1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps_v1.DaemonSet), err +} + +// List takes label and field selectors, and returns the list of DaemonSets that match those selectors. +func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *apps_v1.DaemonSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &apps_v1.DaemonSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &apps_v1.DaemonSetList{} + for _, item := range obj.(*apps_v1.DaemonSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested daemonSets. +func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) + +} + +// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *FakeDaemonSets) Create(daemonSet *apps_v1.DaemonSet) (result *apps_v1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &apps_v1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps_v1.DaemonSet), err +} + +// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *FakeDaemonSets) Update(daemonSet *apps_v1.DaemonSet) (result *apps_v1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &apps_v1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps_v1.DaemonSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDaemonSets) UpdateStatus(daemonSet *apps_v1.DaemonSet) (*apps_v1.DaemonSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &apps_v1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps_v1.DaemonSet), err +} + +// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. +func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &apps_v1.DaemonSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &apps_v1.DaemonSetList{}) + return err +} + +// Patch applies the patch and returns the patched daemonSet. +func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &apps_v1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps_v1.DaemonSet), err +} diff --git a/kubernetes/typed/apps/v1/generated_expansion.go b/kubernetes/typed/apps/v1/generated_expansion.go new file mode 100644 index 00000000..face4d0b --- /dev/null +++ b/kubernetes/typed/apps/v1/generated_expansion.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. +*/ + +package v1 + +type DaemonSetExpansion interface{} diff --git a/listers/apps/v1/BUILD b/listers/apps/v1/BUILD new file mode 100644 index 00000000..7bf48ddc --- /dev/null +++ b/listers/apps/v1/BUILD @@ -0,0 +1,30 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "daemonset.go", + "expansion_generated.go", + ], + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/listers/apps/v1/daemonset.go b/listers/apps/v1/daemonset.go new file mode 100644 index 00000000..307f8bc7 --- /dev/null +++ b/listers/apps/v1/daemonset.go @@ -0,0 +1,94 @@ +/* +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 ( + v1 "k8s.io/api/apps/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "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 []*v1.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 []*v1.DaemonSet, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.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 []*v1.DaemonSet, err error) + // Get retrieves the DaemonSet from the indexer for a given namespace and name. + Get(name string) (*v1.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 []*v1.DaemonSet, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.DaemonSet)) + }) + return ret, err +} + +// Get retrieves the DaemonSet from the indexer for a given namespace and name. +func (s daemonSetNamespaceLister) Get(name string) (*v1.DaemonSet, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("daemonset"), name) + } + return obj.(*v1.DaemonSet), nil +} diff --git a/listers/apps/v1/expansion_generated.go b/listers/apps/v1/expansion_generated.go new file mode 100644 index 00000000..148f763d --- /dev/null +++ b/listers/apps/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 + +// DaemonSetListerExpansion allows custom methods to be added to +// DaemonSetLister. +type DaemonSetListerExpansion interface{} + +// DaemonSetNamespaceListerExpansion allows custom methods to be added to +// DaemonSetNamespaceLister. +type DaemonSetNamespaceListerExpansion interface{}