Merge pull request #49112 from gmarek/eventAPI

Automatic merge from submit-queue (batch tested with PRs 55952, 49112, 55450, 56178, 56151). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

New API group for Events.

Fix kubernetes/features#383

cc @shyamjvs

```release-note
Add events.k8s.io api group with v1beta1 API containing redesigned Event type.
```

Kubernetes-commit: 60c20901911c710491a57eb8b9c48850cdbab054
This commit is contained in:
Kubernetes Publisher 2017-11-22 21:48:42 -08:00
commit 375bcf98d2
28 changed files with 1699 additions and 704 deletions

166
Godeps/Godeps.json generated
View File

@ -372,327 +372,331 @@
}, },
{ {
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1", "ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/admissionregistration/v1beta1", "ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1", "ImportPath": "k8s.io/api/apps/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta1", "ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta2", "ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1", "ImportPath": "k8s.io/api/authentication/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1beta1", "ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1", "ImportPath": "k8s.io/api/authorization/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1beta1", "ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v1", "ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta1", "ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1beta1", "ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v2alpha1", "ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/certificates/v1beta1", "ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/core/v1", "ImportPath": "k8s.io/api/core/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
},
{
"ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/extensions/v1beta1", "ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1", "ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/networking/v1", "ImportPath": "k8s.io/api/networking/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/policy/v1beta1", "ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1", "ImportPath": "k8s.io/api/rbac/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1alpha1", "ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1beta1", "ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/scheduling/v1alpha1", "ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/settings/v1alpha1", "ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1", "ImportPath": "k8s.io/api/storage/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1alpha1", "ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1beta1", "ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "c18c417b5eb7424945ae723ef240465d00ddf054"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/equality", "ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/errors", "ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/meta", "ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/resource", "ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing", "ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion", "ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/fields", "ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/labels", "ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime", "ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/selection", "ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/types", "ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/cache", "ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/clock", "ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/diff", "ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/errors", "ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/framer", "ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr", "ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/json", "ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/net", "ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime", "ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/sets", "ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation", "ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/wait", "ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml", "ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/version", "ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/watch", "ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "e05a599c640e0fa2623bdf1003833f2f4658f985" "Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
}, },
{ {
"ImportPath": "k8s.io/kube-openapi/pkg/common", "ImportPath": "k8s.io/kube-openapi/pkg/common",

View File

@ -25,6 +25,7 @@ go_library(
"//vendor/k8s.io/api/batch/v2alpha1:go_default_library", "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
"//vendor/k8s.io/api/certificates/v1beta1:go_default_library", "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/events/v1beta1:go_default_library",
"//vendor/k8s.io/api/extensions/v1beta1:go_default_library", "//vendor/k8s.io/api/extensions/v1beta1:go_default_library",
"//vendor/k8s.io/api/networking/v1:go_default_library", "//vendor/k8s.io/api/networking/v1:go_default_library",
"//vendor/k8s.io/api/policy/v1beta1:go_default_library", "//vendor/k8s.io/api/policy/v1beta1:go_default_library",
@ -45,6 +46,7 @@ go_library(
"//vendor/k8s.io/client-go/informers/batch:go_default_library", "//vendor/k8s.io/client-go/informers/batch:go_default_library",
"//vendor/k8s.io/client-go/informers/certificates:go_default_library", "//vendor/k8s.io/client-go/informers/certificates:go_default_library",
"//vendor/k8s.io/client-go/informers/core:go_default_library", "//vendor/k8s.io/client-go/informers/core:go_default_library",
"//vendor/k8s.io/client-go/informers/events:go_default_library",
"//vendor/k8s.io/client-go/informers/extensions:go_default_library", "//vendor/k8s.io/client-go/informers/extensions:go_default_library",
"//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library",
"//vendor/k8s.io/client-go/informers/networking:go_default_library", "//vendor/k8s.io/client-go/informers/networking:go_default_library",
@ -75,6 +77,7 @@ filegroup(
"//staging/src/k8s.io/client-go/informers/batch:all-srcs", "//staging/src/k8s.io/client-go/informers/batch:all-srcs",
"//staging/src/k8s.io/client-go/informers/certificates:all-srcs", "//staging/src/k8s.io/client-go/informers/certificates:all-srcs",
"//staging/src/k8s.io/client-go/informers/core:all-srcs", "//staging/src/k8s.io/client-go/informers/core:all-srcs",
"//staging/src/k8s.io/client-go/informers/events:all-srcs",
"//staging/src/k8s.io/client-go/informers/extensions:all-srcs", "//staging/src/k8s.io/client-go/informers/extensions:all-srcs",
"//staging/src/k8s.io/client-go/informers/internalinterfaces:all-srcs", "//staging/src/k8s.io/client-go/informers/internalinterfaces:all-srcs",
"//staging/src/k8s.io/client-go/informers/networking:all-srcs", "//staging/src/k8s.io/client-go/informers/networking:all-srcs",

29
informers/events/BUILD Normal file
View File

@ -0,0 +1,29 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["interface.go"],
importpath = "k8s.io/client-go/informers/events",
visibility = ["//visibility:public"],
deps = [
"//vendor/k8s.io/client-go/informers/events/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/informers/internalinterfaces: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/informers/events/v1beta1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@ -0,0 +1,46 @@
/*
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 events
import (
v1beta1 "k8s.io/client-go/informers/events/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 {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1beta1 returns a new v1beta1.Interface.
func (g *group) V1beta1() v1beta1.Interface {
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
}

View File

@ -0,0 +1,35 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"event.go",
"interface.go",
],
importpath = "k8s.io/client-go/informers/events/v1beta1",
visibility = ["//visibility:public"],
deps = [
"//vendor/k8s.io/api/events/v1beta1: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/events/v1beta1: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"],
)

View File

@ -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.
*/
// This file was automatically generated by informer-gen
package v1beta1
import (
events_v1beta1 "k8s.io/api/events/v1beta1"
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/events/v1beta1"
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() v1beta1.EventLister
}
type eventInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewEventInformer constructs a new informer for Event 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 NewEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredEventInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredEventInformer constructs a new informer for Event 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 NewFilteredEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.EventsV1beta1().Events(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.EventsV1beta1().Events(namespace).Watch(options)
},
},
&events_v1beta1.Event{},
resyncPeriod,
indexers,
)
}
func (f *eventInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredEventInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *eventInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&events_v1beta1.Event{}, f.defaultInformer)
}
func (f *eventInformer) Lister() v1beta1.EventLister {
return v1beta1.NewEventLister(f.Informer().GetIndexer())
}

View File

@ -0,0 +1,45 @@
/*
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 {
// Events returns a EventInformer.
Events() EventInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// Events returns a EventInformer.
func (v *version) Events() EventInformer {
return &eventInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@ -28,6 +28,7 @@ import (
batch "k8s.io/client-go/informers/batch" batch "k8s.io/client-go/informers/batch"
certificates "k8s.io/client-go/informers/certificates" certificates "k8s.io/client-go/informers/certificates"
core "k8s.io/client-go/informers/core" core "k8s.io/client-go/informers/core"
events "k8s.io/client-go/informers/events"
extensions "k8s.io/client-go/informers/extensions" extensions "k8s.io/client-go/informers/extensions"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
networking "k8s.io/client-go/informers/networking" networking "k8s.io/client-go/informers/networking"
@ -140,6 +141,7 @@ type SharedInformerFactory interface {
Batch() batch.Interface Batch() batch.Interface
Certificates() certificates.Interface Certificates() certificates.Interface
Core() core.Interface Core() core.Interface
Events() events.Interface
Extensions() extensions.Interface Extensions() extensions.Interface
Networking() networking.Interface Networking() networking.Interface
Policy() policy.Interface Policy() policy.Interface
@ -173,6 +175,10 @@ func (f *sharedInformerFactory) Core() core.Interface {
return core.New(f, f.namespace, f.tweakListOptions) return core.New(f, f.namespace, f.tweakListOptions)
} }
func (f *sharedInformerFactory) Events() events.Interface {
return events.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Extensions() extensions.Interface { func (f *sharedInformerFactory) Extensions() extensions.Interface {
return extensions.New(f, f.namespace, f.tweakListOptions) return extensions.New(f, f.namespace, f.tweakListOptions)
} }

View File

@ -32,6 +32,7 @@ import (
v2alpha1 "k8s.io/api/batch/v2alpha1" v2alpha1 "k8s.io/api/batch/v2alpha1"
certificates_v1beta1 "k8s.io/api/certificates/v1beta1" certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
core_v1 "k8s.io/api/core/v1" core_v1 "k8s.io/api/core/v1"
events_v1beta1 "k8s.io/api/events/v1beta1"
extensions_v1beta1 "k8s.io/api/extensions/v1beta1" extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
networking_v1 "k8s.io/api/networking/v1" networking_v1 "k8s.io/api/networking/v1"
policy_v1beta1 "k8s.io/api/policy/v1beta1" policy_v1beta1 "k8s.io/api/policy/v1beta1"
@ -173,6 +174,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case core_v1.SchemeGroupVersion.WithResource("serviceaccounts"): case core_v1.SchemeGroupVersion.WithResource("serviceaccounts"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil
// Group=events.k8s.io, Version=v1beta1
case events_v1beta1.SchemeGroupVersion.WithResource("events"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1beta1().Events().Informer()}, nil
// Group=extensions, Version=v1beta1 // Group=extensions, Version=v1beta1
case extensions_v1beta1.SchemeGroupVersion.WithResource("daemonsets"): case extensions_v1beta1.SchemeGroupVersion.WithResource("daemonsets"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().DaemonSets().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().DaemonSets().Informer()}, nil

View File

@ -32,6 +32,7 @@ go_library(
"//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library",
@ -77,6 +78,7 @@ filegroup(
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/networking/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/networking/v1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1:all-srcs",

View File

@ -35,6 +35,7 @@ import (
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
corev1 "k8s.io/client-go/kubernetes/typed/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
@ -84,6 +85,9 @@ type Interface interface {
CoreV1() corev1.CoreV1Interface CoreV1() corev1.CoreV1Interface
// Deprecated: please explicitly pick a version if possible. // Deprecated: please explicitly pick a version if possible.
Core() corev1.CoreV1Interface Core() corev1.CoreV1Interface
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
// Deprecated: please explicitly pick a version if possible.
Events() eventsv1beta1.EventsV1beta1Interface
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
// Deprecated: please explicitly pick a version if possible. // Deprecated: please explicitly pick a version if possible.
Extensions() extensionsv1beta1.ExtensionsV1beta1Interface Extensions() extensionsv1beta1.ExtensionsV1beta1Interface
@ -131,6 +135,7 @@ type Clientset struct {
batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client
certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
coreV1 *corev1.CoreV1Client coreV1 *corev1.CoreV1Client
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
networkingV1 *networkingv1.NetworkingV1Client networkingV1 *networkingv1.NetworkingV1Client
policyV1beta1 *policyv1beta1.PolicyV1beta1Client policyV1beta1 *policyv1beta1.PolicyV1beta1Client
@ -272,6 +277,17 @@ func (c *Clientset) Core() corev1.CoreV1Interface {
return c.coreV1 return c.coreV1
} }
// EventsV1beta1 retrieves the EventsV1beta1Client
func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
return c.eventsV1beta1
}
// Deprecated: Events retrieves the default version of EventsClient.
// Please explicitly pick a version.
func (c *Clientset) Events() eventsv1beta1.EventsV1beta1Interface {
return c.eventsV1beta1
}
// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
return c.extensionsV1beta1 return c.extensionsV1beta1
@ -449,6 +465,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.extensionsV1beta1, err = extensionsv1beta1.NewForConfig(&configShallowCopy) cs.extensionsV1beta1, err = extensionsv1beta1.NewForConfig(&configShallowCopy)
if err != nil { if err != nil {
return nil, err return nil, err
@ -522,6 +542,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c) cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c) cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
cs.coreV1 = corev1.NewForConfigOrDie(c) cs.coreV1 = corev1.NewForConfigOrDie(c)
cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c)
cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c) cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
cs.networkingV1 = networkingv1.NewForConfigOrDie(c) cs.networkingV1 = networkingv1.NewForConfigOrDie(c)
cs.policyV1beta1 = policyv1beta1.NewForConfigOrDie(c) cs.policyV1beta1 = policyv1beta1.NewForConfigOrDie(c)
@ -557,6 +578,7 @@ func New(c rest.Interface) *Clientset {
cs.batchV2alpha1 = batchv2alpha1.New(c) cs.batchV2alpha1 = batchv2alpha1.New(c)
cs.certificatesV1beta1 = certificatesv1beta1.New(c) cs.certificatesV1beta1 = certificatesv1beta1.New(c)
cs.coreV1 = corev1.New(c) cs.coreV1 = corev1.New(c)
cs.eventsV1beta1 = eventsv1beta1.New(c)
cs.extensionsV1beta1 = extensionsv1beta1.New(c) cs.extensionsV1beta1 = extensionsv1beta1.New(c)
cs.networkingV1 = networkingv1.New(c) cs.networkingV1 = networkingv1.New(c)
cs.policyV1beta1 = policyv1beta1.New(c) cs.policyV1beta1 = policyv1beta1.New(c)

View File

@ -30,6 +30,7 @@ go_library(
"//vendor/k8s.io/api/batch/v2alpha1:go_default_library", "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
"//vendor/k8s.io/api/certificates/v1beta1:go_default_library", "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/events/v1beta1:go_default_library",
"//vendor/k8s.io/api/extensions/v1beta1:go_default_library", "//vendor/k8s.io/api/extensions/v1beta1:go_default_library",
"//vendor/k8s.io/api/networking/v1:go_default_library", "//vendor/k8s.io/api/networking/v1:go_default_library",
"//vendor/k8s.io/api/policy/v1beta1:go_default_library", "//vendor/k8s.io/api/policy/v1beta1:go_default_library",
@ -81,6 +82,8 @@ go_library(
"//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library",

View File

@ -54,6 +54,8 @@ import (
fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake" fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake"
corev1 "k8s.io/client-go/kubernetes/typed/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake" fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake"
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake"
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
fakeextensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake" fakeextensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake"
networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
@ -232,6 +234,16 @@ func (c *Clientset) Core() corev1.CoreV1Interface {
return &fakecorev1.FakeCoreV1{Fake: &c.Fake} return &fakecorev1.FakeCoreV1{Fake: &c.Fake}
} }
// EventsV1beta1 retrieves the EventsV1beta1Client
func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake}
}
// Events retrieves the EventsV1beta1Client
func (c *Clientset) Events() eventsv1beta1.EventsV1beta1Interface {
return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake}
}
// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake} return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}

View File

@ -33,6 +33,7 @@ import (
batchv2alpha1 "k8s.io/api/batch/v2alpha1" batchv2alpha1 "k8s.io/api/batch/v2alpha1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
eventsv1beta1 "k8s.io/api/events/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
networkingv1 "k8s.io/api/networking/v1" networkingv1 "k8s.io/api/networking/v1"
policyv1beta1 "k8s.io/api/policy/v1beta1" policyv1beta1 "k8s.io/api/policy/v1beta1"
@ -90,6 +91,7 @@ func AddToScheme(scheme *runtime.Scheme) {
batchv2alpha1.AddToScheme(scheme) batchv2alpha1.AddToScheme(scheme)
certificatesv1beta1.AddToScheme(scheme) certificatesv1beta1.AddToScheme(scheme)
corev1.AddToScheme(scheme) corev1.AddToScheme(scheme)
eventsv1beta1.AddToScheme(scheme)
extensionsv1beta1.AddToScheme(scheme) extensionsv1beta1.AddToScheme(scheme)
networkingv1.AddToScheme(scheme) networkingv1.AddToScheme(scheme)
policyv1beta1.AddToScheme(scheme) policyv1beta1.AddToScheme(scheme)

View File

@ -29,6 +29,7 @@ go_library(
"//vendor/k8s.io/api/batch/v2alpha1:go_default_library", "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
"//vendor/k8s.io/api/certificates/v1beta1:go_default_library", "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/events/v1beta1:go_default_library",
"//vendor/k8s.io/api/extensions/v1beta1:go_default_library", "//vendor/k8s.io/api/extensions/v1beta1:go_default_library",
"//vendor/k8s.io/api/networking/v1:go_default_library", "//vendor/k8s.io/api/networking/v1:go_default_library",
"//vendor/k8s.io/api/policy/v1beta1:go_default_library", "//vendor/k8s.io/api/policy/v1beta1:go_default_library",

View File

@ -33,6 +33,7 @@ import (
batchv2alpha1 "k8s.io/api/batch/v2alpha1" batchv2alpha1 "k8s.io/api/batch/v2alpha1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
eventsv1beta1 "k8s.io/api/events/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
networkingv1 "k8s.io/api/networking/v1" networkingv1 "k8s.io/api/networking/v1"
policyv1beta1 "k8s.io/api/policy/v1beta1" policyv1beta1 "k8s.io/api/policy/v1beta1"
@ -90,6 +91,7 @@ func AddToScheme(scheme *runtime.Scheme) {
batchv2alpha1.AddToScheme(scheme) batchv2alpha1.AddToScheme(scheme)
certificatesv1beta1.AddToScheme(scheme) certificatesv1beta1.AddToScheme(scheme)
corev1.AddToScheme(scheme) corev1.AddToScheme(scheme)
eventsv1beta1.AddToScheme(scheme)
extensionsv1beta1.AddToScheme(scheme) extensionsv1beta1.AddToScheme(scheme)
networkingv1.AddToScheme(scheme) networkingv1.AddToScheme(scheme)
policyv1beta1.AddToScheme(scheme) policyv1beta1.AddToScheme(scheme)

View File

@ -0,0 +1,39 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"event.go",
"events_client.go",
"generated_expansion.go",
],
importpath = "k8s.io/client-go/kubernetes/typed/events/v1beta1",
visibility = ["//visibility:public"],
deps = [
"//vendor/k8s.io/api/events/v1beta1: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/events/v1beta1/fake:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@ -0,0 +1,18 @@
/*
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 has the automatically generated typed clients.
package v1beta1

View File

@ -0,0 +1,155 @@
/*
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 (
v1beta1 "k8s.io/api/events/v1beta1"
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"
)
// EventsGetter has a method to return a EventInterface.
// A group's client should implement this interface.
type EventsGetter interface {
Events(namespace string) EventInterface
}
// EventInterface has methods to work with Event resources.
type EventInterface interface {
Create(*v1beta1.Event) (*v1beta1.Event, error)
Update(*v1beta1.Event) (*v1beta1.Event, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.Event, error)
List(opts v1.ListOptions) (*v1beta1.EventList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error)
EventExpansion
}
// events implements EventInterface
type events struct {
client rest.Interface
ns string
}
// newEvents returns a Events
func newEvents(c *EventsV1beta1Client, namespace string) *events {
return &events{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
func (c *events) Get(name string, options v1.GetOptions) (result *v1beta1.Event, err error) {
result = &v1beta1.Event{}
err = c.client.Get().
Namespace(c.ns).
Resource("events").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *events) List(opts v1.ListOptions) (result *v1beta1.EventList, err error) {
result = &v1beta1.EventList{}
err = c.client.Get().
Namespace(c.ns).
Resource("events").
VersionedParams(&opts, scheme.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("events").
VersionedParams(&opts, scheme.ParameterCodec).
Watch()
}
// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.
func (c *events) Create(event *v1beta1.Event) (result *v1beta1.Event, err error) {
result = &v1beta1.Event{}
err = c.client.Post().
Namespace(c.ns).
Resource("events").
Body(event).
Do().
Into(result)
return
}
// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
func (c *events) Update(event *v1beta1.Event) (result *v1beta1.Event, err error) {
result = &v1beta1.Event{}
err = c.client.Put().
Namespace(c.ns).
Resource("events").
Name(event.Name).
Body(event).
Do().
Into(result)
return
}
// Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *events) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched event.
func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) {
result = &v1beta1.Event{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("events").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@ -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 v1beta1
import (
v1beta1 "k8s.io/api/events/v1beta1"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type EventsV1beta1Interface interface {
RESTClient() rest.Interface
EventsGetter
}
// EventsV1beta1Client is used to interact with features provided by the events.k8s.io group.
type EventsV1beta1Client struct {
restClient rest.Interface
}
func (c *EventsV1beta1Client) Events(namespace string) EventInterface {
return newEvents(c, namespace)
}
// NewForConfig creates a new EventsV1beta1Client for the given config.
func NewForConfig(c *rest.Config) (*EventsV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &EventsV1beta1Client{client}, nil
}
// NewForConfigOrDie creates a new EventsV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *EventsV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new EventsV1beta1Client for the given RESTClient.
func New(c rest.Interface) *EventsV1beta1Client {
return &EventsV1beta1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1beta1.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 *EventsV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@ -0,0 +1,37 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_event.go",
"fake_events_client.go",
],
importpath = "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake",
visibility = ["//visibility:public"],
deps = [
"//vendor/k8s.io/api/events/v1beta1: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/events/v1beta1: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"],
)

View File

@ -0,0 +1,18 @@
/*
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 has the automatically generated clients.
package fake

View File

@ -0,0 +1,126 @@
/*
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 (
v1beta1 "k8s.io/api/events/v1beta1"
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"
)
// FakeEvents implements EventInterface
type FakeEvents struct {
Fake *FakeEventsV1beta1
ns string
}
var eventsResource = schema.GroupVersionResource{Group: "events.k8s.io", Version: "v1beta1", Resource: "events"}
var eventsKind = schema.GroupVersionKind{Group: "events.k8s.io", Version: "v1beta1", Kind: "Event"}
// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *v1beta1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(eventsResource, c.ns, name), &v1beta1.Event{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Event), err
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *FakeEvents) List(opts v1.ListOptions) (result *v1beta1.EventList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &v1beta1.EventList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.EventList{}
for _, item := range obj.(*v1beta1.EventList).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 events.
func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts))
}
// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.
func (c *FakeEvents) Create(event *v1beta1.Event) (result *v1beta1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &v1beta1.Event{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Event), err
}
// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
func (c *FakeEvents) Update(event *v1beta1.Event) (result *v1beta1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &v1beta1.Event{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Event), err
}
// Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &v1beta1.Event{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.EventList{})
return err
}
// Patch applies the patch and returns the patched event.
func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &v1beta1.Event{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Event), err
}

View File

@ -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 (
v1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeEventsV1beta1 struct {
*testing.Fake
}
func (c *FakeEventsV1beta1) Events(namespace string) v1beta1.EventInterface {
return &FakeEvents{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeEventsV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@ -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 v1beta1
type EventExpansion interface{}

View File

@ -0,0 +1,31 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"event.go",
"expansion_generated.go",
],
importpath = "k8s.io/client-go/listers/events/v1beta1",
visibility = ["//visibility:public"],
deps = [
"//vendor/k8s.io/api/events/v1beta1: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"],
)

View File

@ -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 v1beta1
import (
v1beta1 "k8s.io/api/events/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"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 []*v1beta1.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 []*v1beta1.Event, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.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 []*v1beta1.Event, err error)
// Get retrieves the Event from the indexer for a given namespace and name.
Get(name string) (*v1beta1.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 []*v1beta1.Event, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.Event))
})
return ret, err
}
// Get retrieves the Event from the indexer for a given namespace and name.
func (s eventNamespaceLister) Get(name string) (*v1beta1.Event, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("event"), name)
}
return obj.(*v1beta1.Event), nil
}

View File

@ -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
// EventListerExpansion allows custom methods to be added to
// EventLister.
type EventListerExpansion interface{}
// EventNamespaceListerExpansion allows custom methods to be added to
// EventNamespaceLister.
type EventNamespaceListerExpansion interface{}