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. ```
This commit is contained in:
1208
api/openapi-spec/swagger.json
generated
1208
api/openapi-spec/swagger.json
generated
File diff suppressed because it is too large
Load Diff
114
api/swagger-spec/events.k8s.io.json
generated
Normal file
114
api/swagger-spec/events.k8s.io.json
generated
Normal file
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"swaggerVersion": "1.2",
|
||||
"apiVersion": "",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/apis/events.k8s.io",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/apis/events.k8s.io",
|
||||
"description": "get information of a group",
|
||||
"operations": [
|
||||
{
|
||||
"type": "v1.APIGroup",
|
||||
"method": "GET",
|
||||
"summary": "get information of a group",
|
||||
"nickname": "getAPIGroup",
|
||||
"parameters": [],
|
||||
"produces": [
|
||||
"application/json",
|
||||
"application/yaml",
|
||||
"application/vnd.kubernetes.protobuf"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json",
|
||||
"application/yaml",
|
||||
"application/vnd.kubernetes.protobuf"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"models": {
|
||||
"v1.APIGroup": {
|
||||
"id": "v1.APIGroup",
|
||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||
"required": [
|
||||
"name",
|
||||
"versions",
|
||||
"serverAddressByClientCIDRs"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
|
||||
},
|
||||
"apiVersion": {
|
||||
"type": "string",
|
||||
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "name is the name of the group."
|
||||
},
|
||||
"versions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1.GroupVersionForDiscovery"
|
||||
},
|
||||
"description": "versions are the versions supported in this group."
|
||||
},
|
||||
"preferredVersion": {
|
||||
"$ref": "v1.GroupVersionForDiscovery",
|
||||
"description": "preferredVersion is the version preferred by the API server, which probably is the storage version."
|
||||
},
|
||||
"serverAddressByClientCIDRs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1.ServerAddressByClientCIDR"
|
||||
},
|
||||
"description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.GroupVersionForDiscovery": {
|
||||
"id": "v1.GroupVersionForDiscovery",
|
||||
"description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.",
|
||||
"required": [
|
||||
"groupVersion",
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"groupVersion": {
|
||||
"type": "string",
|
||||
"description": "groupVersion specifies the API group and version in the form \"group/version\""
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.ServerAddressByClientCIDR": {
|
||||
"id": "v1.ServerAddressByClientCIDR",
|
||||
"description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.",
|
||||
"required": [
|
||||
"clientCIDR",
|
||||
"serverAddress"
|
||||
],
|
||||
"properties": {
|
||||
"clientCIDR": {
|
||||
"type": "string",
|
||||
"description": "The CIDR with which clients can match their IP to figure out the server address that they should use."
|
||||
},
|
||||
"serverAddress": {
|
||||
"type": "string",
|
||||
"description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1600
api/swagger-spec/events.k8s.io_v1beta1.json
generated
Normal file
1600
api/swagger-spec/events.k8s.io_v1beta1.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
8
api/swagger-spec/resourceListing.json
generated
8
api/swagger-spec/resourceListing.json
generated
@@ -180,6 +180,14 @@
|
||||
{
|
||||
"path": "/apis/admissionregistration.k8s.io",
|
||||
"description": "get information of a group"
|
||||
},
|
||||
{
|
||||
"path": "/apis/events.k8s.io/v1beta1",
|
||||
"description": "API at /apis/events.k8s.io/v1beta1"
|
||||
},
|
||||
{
|
||||
"path": "/apis/events.k8s.io",
|
||||
"description": "get information of a group"
|
||||
}
|
||||
],
|
||||
"apiVersion": "",
|
||||
|
47
api/swagger-spec/v1.json
generated
47
api/swagger-spec/v1.json
generated
@@ -19634,7 +19634,9 @@
|
||||
"description": "Event is a report of an event somewhere in the cluster.",
|
||||
"required": [
|
||||
"metadata",
|
||||
"involvedObject"
|
||||
"involvedObject",
|
||||
"reportingComponent",
|
||||
"reportingInstance"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
@@ -19681,6 +19683,30 @@
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Type of this event (Normal, Warning), new types could be added in the future"
|
||||
},
|
||||
"eventTime": {
|
||||
"type": "string",
|
||||
"description": "Time when this Event was first observed."
|
||||
},
|
||||
"series": {
|
||||
"$ref": "v1.EventSeries",
|
||||
"description": "Data about the Event series this event represents or nil if it's a singleton Event."
|
||||
},
|
||||
"action": {
|
||||
"type": "string",
|
||||
"description": "What action was taken/failed regarding to the Regarding object."
|
||||
},
|
||||
"related": {
|
||||
"$ref": "v1.ObjectReference",
|
||||
"description": "Optional secondary object for more complex actions."
|
||||
},
|
||||
"reportingComponent": {
|
||||
"type": "string",
|
||||
"description": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`."
|
||||
},
|
||||
"reportingInstance": {
|
||||
"type": "string",
|
||||
"description": "ID of the controller instance, e.g. `kubelet-xyzf`."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -19698,6 +19724,25 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.EventSeries": {
|
||||
"id": "v1.EventSeries",
|
||||
"description": "EventSeries contain information on series of events, i.e. thing that was/is happening continously for some time.",
|
||||
"properties": {
|
||||
"count": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Number of occurrences in this series up to the last heartbeat time"
|
||||
},
|
||||
"lastObservedTime": {
|
||||
"type": "string",
|
||||
"description": "Time of the last occurence observed"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "State of this Series: Ongoing or Finished"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.LimitRangeList": {
|
||||
"id": "v1.LimitRangeList",
|
||||
"description": "LimitRangeList is a list of LimitRange items.",
|
||||
|
@@ -20,6 +20,7 @@ go_library(
|
||||
"//pkg/apis/apps:go_default_library",
|
||||
"//pkg/apis/batch:go_default_library",
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/events:go_default_library",
|
||||
"//pkg/apis/extensions:go_default_library",
|
||||
"//pkg/apis/networking:go_default_library",
|
||||
"//pkg/apis/storage:go_default_library",
|
||||
|
@@ -205,6 +205,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{
|
||||
{Group: "apps", Version: "v1beta1"}: {group: 17800, version: 1},
|
||||
{Group: "apps", Version: "v1beta2"}: {group: 17800, version: 9},
|
||||
{Group: "apps", Version: "v1"}: {group: 17800, version: 15},
|
||||
{Group: "events.k8s.io", Version: "v1beta1"}: {group: 17750, version: 5},
|
||||
{Group: "authentication.k8s.io", Version: "v1"}: {group: 17700, version: 15},
|
||||
{Group: "authentication.k8s.io", Version: "v1beta1"}: {group: 17700, version: 9},
|
||||
{Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15},
|
||||
|
@@ -66,6 +66,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/apis/apps"
|
||||
"k8s.io/kubernetes/pkg/apis/batch"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
"k8s.io/kubernetes/pkg/apis/events"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
"k8s.io/kubernetes/pkg/apis/networking"
|
||||
"k8s.io/kubernetes/pkg/apis/storage"
|
||||
@@ -579,6 +580,7 @@ func BuildStorageFactory(s *options.ServerRunOptions) (*serverstorage.DefaultSto
|
||||
storageFactory.AddCohabitatingResources(extensions.Resource("deployments"), apps.Resource("deployments"))
|
||||
storageFactory.AddCohabitatingResources(extensions.Resource("daemonsets"), apps.Resource("daemonsets"))
|
||||
storageFactory.AddCohabitatingResources(extensions.Resource("replicasets"), apps.Resource("replicasets"))
|
||||
storageFactory.AddCohabitatingResources(api.Resource("events"), events.Resource("events"))
|
||||
for _, override := range s.Etcd.EtcdServersOverrides {
|
||||
tokens := strings.Split(override, "#")
|
||||
if len(tokens) != 2 {
|
||||
|
@@ -34,6 +34,7 @@ go_library(
|
||||
"//pkg/apis/certificates/install:go_default_library",
|
||||
"//pkg/apis/componentconfig:go_default_library",
|
||||
"//pkg/apis/core/install:go_default_library",
|
||||
"//pkg/apis/events/install:go_default_library",
|
||||
"//pkg/apis/extensions/install:go_default_library",
|
||||
"//pkg/apis/policy/install:go_default_library",
|
||||
"//pkg/apis/rbac/install:go_default_library",
|
||||
|
@@ -30,6 +30,7 @@ import (
|
||||
_ "k8s.io/kubernetes/pkg/apis/batch/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/certificates/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/core/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/events/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/extensions/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/policy/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/rbac/install"
|
||||
|
1617
docs/api-reference/events.k8s.io/v1beta1/definitions.html
generated
Executable file
1617
docs/api-reference/events.k8s.io/v1beta1/definitions.html
generated
Executable file
File diff suppressed because it is too large
Load Diff
2212
docs/api-reference/events.k8s.io/v1beta1/operations.html
generated
Executable file
2212
docs/api-reference/events.k8s.io/v1beta1/operations.html
generated
Executable file
File diff suppressed because it is too large
Load Diff
90
docs/api-reference/v1/definitions.html
generated
90
docs/api-reference/v1/definitions.html
generated
@@ -3743,6 +3743,54 @@ Examples:<br>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_eventseries">v1.EventSeries</h3>
|
||||
<div class="paragraph">
|
||||
<p>EventSeries contain information on series of events, i.e. thing that was/is happening continously for some time.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Name</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Schema</th>
|
||||
<th class="tableblock halign-left valign-top">Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">count</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Number of occurrences in this series up to the last heartbeat time</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lastObservedTime</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Time of the last occurence observed</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">state</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">State of this Series: Ongoing or Finished</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_httpgetaction">v1.HTTPGetAction</h3>
|
||||
@@ -5300,6 +5348,48 @@ Examples:<br>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">eventTime</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Time when this Event was first observed.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">series</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Data about the Event series this event represents or nil if it’s a singleton Event.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_eventseries">v1.EventSeries</a></p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">action</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">What action was taken/failed regarding to the Regarding object.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">related</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Optional secondary object for more complex actions.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_objectreference">v1.ObjectReference</a></p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">reportingComponent</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the controller that emitted this Event, e.g. <code>kubernetes.io/kubelet</code>.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">reportingInstance</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">ID of the controller instance, e.g. <code>kubelet-xyzf</code>.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@@ -53,6 +53,8 @@ pkg/apis/core/v1/helper
|
||||
pkg/apis/core/v1/helper/qos
|
||||
pkg/apis/core/v1/validation
|
||||
pkg/apis/core/validation
|
||||
pkg/apis/events
|
||||
pkg/apis/events/v1beta1
|
||||
pkg/apis/extensions
|
||||
pkg/apis/extensions/validation
|
||||
pkg/apis/imagepolicy
|
||||
@@ -292,6 +294,7 @@ pkg/registry/core/service/portallocator
|
||||
pkg/registry/core/service/portallocator/controller
|
||||
pkg/registry/core/service/storage
|
||||
pkg/registry/core/serviceaccount/storage
|
||||
pkg/registry/events/rest
|
||||
pkg/registry/extensions/controller/storage
|
||||
pkg/registry/extensions/daemonset
|
||||
pkg/registry/extensions/daemonset/storage
|
||||
@@ -449,6 +452,7 @@ staging/src/k8s.io/api/batch/v1beta1
|
||||
staging/src/k8s.io/api/batch/v2alpha1
|
||||
staging/src/k8s.io/api/certificates/v1beta1
|
||||
staging/src/k8s.io/api/core/v1
|
||||
staging/src/k8s.io/api/events/v1beta1
|
||||
staging/src/k8s.io/api/extensions/v1beta1
|
||||
staging/src/k8s.io/api/imagepolicy/v1alpha1
|
||||
staging/src/k8s.io/api/networking/v1
|
||||
@@ -659,6 +663,8 @@ staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1
|
||||
staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake
|
||||
staging/src/k8s.io/client-go/kubernetes/typed/core/v1
|
||||
staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake
|
||||
staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1
|
||||
staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake
|
||||
staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1
|
||||
staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake
|
||||
staging/src/k8s.io/client-go/kubernetes/typed/networking/v1
|
||||
|
@@ -69,6 +69,7 @@ batch/v1beta1 \
|
||||
batch/v2alpha1 \
|
||||
certificates.k8s.io/v1beta1 \
|
||||
extensions/v1beta1 \
|
||||
events.k8s.io/v1beta1 \
|
||||
imagepolicy.k8s.io/v1alpha1 \
|
||||
networking.k8s.io/v1 \
|
||||
policy/v1beta1 \
|
||||
|
@@ -59,10 +59,10 @@ for gv in "${GROUP_VERSIONS[@]}"; do
|
||||
# collect internal groups
|
||||
int_group="${pkg_dir%/*}/"
|
||||
if [[ "${pkg_dir}" = core/* ]]; then
|
||||
int_group="api/"
|
||||
int_group="api/"
|
||||
fi
|
||||
if ! [[ " ${INTERNAL_DIRS[@]:-} " =~ " ${int_group} " ]]; then
|
||||
INTERNAL_DIRS+=("${int_group}")
|
||||
INTERNAL_DIRS+=("${int_group}")
|
||||
fi
|
||||
done
|
||||
# delimit by commas for the command
|
||||
|
@@ -60,6 +60,7 @@ PACKAGES=(
|
||||
k8s.io/api/apps/v1
|
||||
k8s.io/api/authentication/v1
|
||||
k8s.io/api/authentication/v1beta1
|
||||
k8s.io/api/events/v1beta1
|
||||
k8s.io/api/rbac/v1alpha1
|
||||
k8s.io/api/rbac/v1beta1
|
||||
k8s.io/api/rbac/v1
|
||||
|
@@ -40,6 +40,7 @@ filegroup(
|
||||
"//pkg/apis/certificates:all-srcs",
|
||||
"//pkg/apis/componentconfig:all-srcs",
|
||||
"//pkg/apis/core:all-srcs",
|
||||
"//pkg/apis/events:all-srcs",
|
||||
"//pkg/apis/extensions:all-srcs",
|
||||
"//pkg/apis/imagepolicy:all-srcs",
|
||||
"//pkg/apis/networking:all-srcs",
|
||||
|
@@ -30,6 +30,8 @@ go_library(
|
||||
"//pkg/apis/componentconfig/install:go_default_library",
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/core/install:go_default_library",
|
||||
"//pkg/apis/events:go_default_library",
|
||||
"//pkg/apis/events/install:go_default_library",
|
||||
"//pkg/apis/extensions:go_default_library",
|
||||
"//pkg/apis/extensions/install:go_default_library",
|
||||
"//pkg/apis/imagepolicy:go_default_library",
|
||||
|
@@ -43,6 +43,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/apis/batch"
|
||||
"k8s.io/kubernetes/pkg/apis/certificates"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
"k8s.io/kubernetes/pkg/apis/events"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
"k8s.io/kubernetes/pkg/apis/imagepolicy"
|
||||
"k8s.io/kubernetes/pkg/apis/networking"
|
||||
@@ -62,6 +63,7 @@ import (
|
||||
_ "k8s.io/kubernetes/pkg/apis/certificates/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/componentconfig/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/core/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/events/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/extensions/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/imagepolicy/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/networking/install"
|
||||
@@ -79,6 +81,7 @@ var (
|
||||
Autoscaling TestGroup
|
||||
Batch TestGroup
|
||||
Extensions TestGroup
|
||||
Events TestGroup
|
||||
Apps TestGroup
|
||||
Policy TestGroup
|
||||
Rbac TestGroup
|
||||
@@ -314,6 +317,15 @@ func init() {
|
||||
externalTypes: legacyscheme.Scheme.KnownTypes(externalGroupVersion),
|
||||
}
|
||||
}
|
||||
if _, ok := Groups[events.GroupName]; !ok {
|
||||
externalGroupVersion := schema.GroupVersion{Group: events.GroupName, Version: legacyscheme.Registry.GroupOrDie(events.GroupName).GroupVersion.Version}
|
||||
Groups[events.GroupName] = TestGroup{
|
||||
externalGroupVersion: externalGroupVersion,
|
||||
internalGroupVersion: events.SchemeGroupVersion,
|
||||
internalTypes: legacyscheme.Scheme.KnownTypes(events.SchemeGroupVersion),
|
||||
externalTypes: legacyscheme.Scheme.KnownTypes(externalGroupVersion),
|
||||
}
|
||||
}
|
||||
|
||||
Default = Groups[api.GroupName]
|
||||
Autoscaling = Groups[autoscaling.GroupName]
|
||||
@@ -322,6 +334,7 @@ func init() {
|
||||
Policy = Groups[policy.GroupName]
|
||||
Certificates = Groups[certificates.GroupName]
|
||||
Extensions = Groups[extensions.GroupName]
|
||||
Events = Groups[events.GroupName]
|
||||
Rbac = Groups[rbac.GroupName]
|
||||
Scheduling = Groups[scheduling.GroupName]
|
||||
Settings = Groups[settings.GroupName]
|
||||
|
@@ -25,8 +25,8 @@ const (
|
||||
PodStatusField = "status.phase"
|
||||
SecretTypeField = "type"
|
||||
|
||||
EventReasonField = "reason"
|
||||
EventSourceField = "source"
|
||||
EventReasonField = "action"
|
||||
EventSourceField = "reportingComponent"
|
||||
EventTypeField = "type"
|
||||
EventInvolvedKindField = "involvedObject.kind"
|
||||
EventInvolvedNamespaceField = "involvedObject.namespace"
|
||||
|
@@ -13,6 +13,7 @@ go_library(
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//vendor/github.com/google/gofuzz:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
|
@@ -19,10 +19,12 @@ package fuzzer
|
||||
import (
|
||||
"reflect"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
fuzz "github.com/google/gofuzz"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -483,5 +485,12 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
c.FuzzNoCustom(s)
|
||||
s.Allocatable = s.Capacity
|
||||
},
|
||||
func(e *core.Event, c fuzz.Continue) {
|
||||
c.FuzzNoCustom(e)
|
||||
e.EventTime = metav1.MicroTime{Time: time.Unix(1, 1000)}
|
||||
if e.Series != nil {
|
||||
e.Series.LastObservedTime = metav1.MicroTime{Time: time.Unix(3, 3000)}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@@ -3958,7 +3958,7 @@ type Event struct {
|
||||
// +optional
|
||||
metav1.ObjectMeta
|
||||
|
||||
// Required. The object that this event is about.
|
||||
// Required. The object that this event is about. Mapped to events.Event.regarding
|
||||
// +optional
|
||||
InvolvedObject ObjectReference
|
||||
|
||||
@@ -3970,7 +3970,7 @@ type Event struct {
|
||||
Reason string
|
||||
|
||||
// Optional. A human-readable description of the status of this operation.
|
||||
// TODO: decide on maximum length.
|
||||
// TODO: decide on maximum length. Mapped to events.Event.note
|
||||
// +optional
|
||||
Message string
|
||||
|
||||
@@ -3993,8 +3993,49 @@ type Event struct {
|
||||
// Type of this event (Normal, Warning), new types could be added in the future.
|
||||
// +optional
|
||||
Type string
|
||||
|
||||
// Time when this Event was first observed.
|
||||
// +optional
|
||||
EventTime metav1.MicroTime
|
||||
|
||||
// Data about the Event series this event represents or nil if it's a singleton Event.
|
||||
// +optional
|
||||
Series *EventSeries
|
||||
|
||||
// What action was taken/failed regarding to the Regarding object.
|
||||
// +optional
|
||||
Action string
|
||||
|
||||
// Optional secondary object for more complex actions.
|
||||
// +optional
|
||||
Related *ObjectReference
|
||||
|
||||
// Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||
// +optional
|
||||
ReportingController string
|
||||
|
||||
// ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||
// +optional
|
||||
ReportingInstance string
|
||||
}
|
||||
|
||||
type EventSeries struct {
|
||||
// Number of occurrences in this series up to the last heartbeat time
|
||||
Count int32
|
||||
// Time of the last occurence observed
|
||||
LastObservedTime metav1.MicroTime
|
||||
// State of this Series: Ongoing or Finished
|
||||
State EventSeriesState
|
||||
}
|
||||
|
||||
type EventSeriesState string
|
||||
|
||||
const (
|
||||
EventSeriesStateOngoing EventSeriesState = "Ongoing"
|
||||
EventSeriesStateFinished EventSeriesState = "Finished"
|
||||
EventSeriesStateUnknown EventSeriesState = "Unknown"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// EventList is a list of events.
|
||||
|
38
pkg/apis/core/v1/zz_generated.conversion.go
generated
38
pkg/apis/core/v1/zz_generated.conversion.go
generated
@@ -133,6 +133,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
Convert_core_Event_To_v1_Event,
|
||||
Convert_v1_EventList_To_core_EventList,
|
||||
Convert_core_EventList_To_v1_EventList,
|
||||
Convert_v1_EventSeries_To_core_EventSeries,
|
||||
Convert_core_EventSeries_To_v1_EventSeries,
|
||||
Convert_v1_EventSource_To_core_EventSource,
|
||||
Convert_core_EventSource_To_v1_EventSource,
|
||||
Convert_v1_ExecAction_To_core_ExecAction,
|
||||
@@ -1598,6 +1600,12 @@ func autoConvert_v1_Event_To_core_Event(in *v1.Event, out *core.Event, s convers
|
||||
out.LastTimestamp = in.LastTimestamp
|
||||
out.Count = in.Count
|
||||
out.Type = in.Type
|
||||
out.EventTime = in.EventTime
|
||||
out.Series = (*core.EventSeries)(unsafe.Pointer(in.Series))
|
||||
out.Action = in.Action
|
||||
out.Related = (*core.ObjectReference)(unsafe.Pointer(in.Related))
|
||||
out.ReportingController = in.ReportingController
|
||||
out.ReportingInstance = in.ReportingInstance
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1620,6 +1628,12 @@ func autoConvert_core_Event_To_v1_Event(in *core.Event, out *v1.Event, s convers
|
||||
out.LastTimestamp = in.LastTimestamp
|
||||
out.Count = in.Count
|
||||
out.Type = in.Type
|
||||
out.EventTime = in.EventTime
|
||||
out.Series = (*v1.EventSeries)(unsafe.Pointer(in.Series))
|
||||
out.Action = in.Action
|
||||
out.Related = (*v1.ObjectReference)(unsafe.Pointer(in.Related))
|
||||
out.ReportingController = in.ReportingController
|
||||
out.ReportingInstance = in.ReportingInstance
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1650,6 +1664,30 @@ func Convert_core_EventList_To_v1_EventList(in *core.EventList, out *v1.EventLis
|
||||
return autoConvert_core_EventList_To_v1_EventList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_EventSeries_To_core_EventSeries(in *v1.EventSeries, out *core.EventSeries, s conversion.Scope) error {
|
||||
out.Count = in.Count
|
||||
out.LastObservedTime = in.LastObservedTime
|
||||
out.State = core.EventSeriesState(in.State)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_EventSeries_To_core_EventSeries is an autogenerated conversion function.
|
||||
func Convert_v1_EventSeries_To_core_EventSeries(in *v1.EventSeries, out *core.EventSeries, s conversion.Scope) error {
|
||||
return autoConvert_v1_EventSeries_To_core_EventSeries(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_EventSeries_To_v1_EventSeries(in *core.EventSeries, out *v1.EventSeries, s conversion.Scope) error {
|
||||
out.Count = in.Count
|
||||
out.LastObservedTime = in.LastObservedTime
|
||||
out.State = v1.EventSeriesState(in.State)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_EventSeries_To_v1_EventSeries is an autogenerated conversion function.
|
||||
func Convert_core_EventSeries_To_v1_EventSeries(in *core.EventSeries, out *v1.EventSeries, s conversion.Scope) error {
|
||||
return autoConvert_core_EventSeries_To_v1_EventSeries(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_EventSource_To_core_EventSource(in *v1.EventSource, out *core.EventSource, s conversion.Scope) error {
|
||||
out.Component = in.Component
|
||||
out.Host = in.Host
|
||||
|
@@ -18,6 +18,7 @@ package validation
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -28,24 +29,68 @@ import (
|
||||
"k8s.io/kubernetes/pkg/apis/core"
|
||||
)
|
||||
|
||||
const (
|
||||
ReportingInstanceLengthLimit = 128
|
||||
ActionLengthLimit = 128
|
||||
ReasonLengthLimit = 128
|
||||
NoteLengthLimit = 1024
|
||||
)
|
||||
|
||||
// ValidateEvent makes sure that the event makes sense.
|
||||
func ValidateEvent(event *core.Event) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
// Because go
|
||||
zeroTime := time.Time{}
|
||||
|
||||
// Make sure event.Namespace and the involvedObject.Namespace agree
|
||||
if len(event.InvolvedObject.Namespace) == 0 {
|
||||
// event.Namespace must also be empty (or "default", for compatibility with old clients)
|
||||
if event.Namespace != metav1.NamespaceNone && event.Namespace != metav1.NamespaceDefault {
|
||||
// "New" Events need to have EventTime set, so it's validating old object.
|
||||
if event.EventTime.Time == zeroTime {
|
||||
// Make sure event.Namespace and the involvedInvolvedObject.Namespace agree
|
||||
if len(event.InvolvedObject.Namespace) == 0 {
|
||||
// event.Namespace must also be empty (or "default", for compatibility with old clients)
|
||||
if event.Namespace != metav1.NamespaceNone && event.Namespace != metav1.NamespaceDefault {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
|
||||
}
|
||||
} else {
|
||||
// event namespace must match
|
||||
if event.Namespace != event.InvolvedObject.Namespace {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if len(event.InvolvedObject.Namespace) == 0 && event.Namespace != metav1.NamespaceSystem {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
|
||||
}
|
||||
} else {
|
||||
// event namespace must match
|
||||
if event.Namespace != event.InvolvedObject.Namespace {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
|
||||
if len(event.ReportingController) == 0 {
|
||||
allErrs = append(allErrs, field.Required(field.NewPath("reportingController"), ""))
|
||||
}
|
||||
for _, msg := range validation.IsQualifiedName(event.ReportingController) {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("reportingController"), event.ReportingController, msg))
|
||||
}
|
||||
if len(event.ReportingInstance) == 0 {
|
||||
allErrs = append(allErrs, field.Required(field.NewPath("reportingInstance"), ""))
|
||||
}
|
||||
if len(event.ReportingInstance) > ReportingInstanceLengthLimit {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("repotingIntance"), "", fmt.Sprintf("can have at most %v characters", ReportingInstanceLengthLimit)))
|
||||
}
|
||||
if len(event.Action) == 0 {
|
||||
allErrs = append(allErrs, field.Required(field.NewPath("action"), ""))
|
||||
}
|
||||
if len(event.Action) > ActionLengthLimit {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("action"), "", fmt.Sprintf("can have at most %v characters", ActionLengthLimit)))
|
||||
}
|
||||
if len(event.Reason) == 0 {
|
||||
allErrs = append(allErrs, field.Required(field.NewPath("reason"), ""))
|
||||
}
|
||||
if len(event.Reason) > ReasonLengthLimit {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("reason"), "", fmt.Sprintf("can have at most %v characters", ReasonLengthLimit)))
|
||||
}
|
||||
if len(event.Message) > NoteLengthLimit {
|
||||
allErrs = append(allErrs, field.Invalid(field.NewPath("message"), "", fmt.Sprintf("can have at most %v characters", NoteLengthLimit)))
|
||||
}
|
||||
}
|
||||
|
||||
// For kinds we recognize, make sure involvedObject.Namespace is set for namespaced kinds
|
||||
// For kinds we recognize, make sure InvolvedObject.Namespace is set for namespaced kinds
|
||||
if namespaced, err := isNamespacedKind(event.InvolvedObject.Kind, event.InvolvedObject.APIVersion); err == nil {
|
||||
if namespaced && len(event.InvolvedObject.Namespace) == 0 {
|
||||
allErrs = append(allErrs, field.Required(field.NewPath("involvedObject", "namespace"), fmt.Sprintf("required for kind %s", event.InvolvedObject.Kind)))
|
||||
|
@@ -18,6 +18,7 @@ package validation
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/apis/core"
|
||||
@@ -215,7 +216,177 @@ func TestValidateEvent(t *testing.T) {
|
||||
|
||||
for _, item := range table {
|
||||
if e, a := item.valid, len(ValidateEvent(item.Event)) == 0; e != a {
|
||||
t.Errorf("%v: expected %v, got %v", item.Event.Name, e, a)
|
||||
t.Errorf("%v: expected %v, got %v: %v", item.Event.Name, e, a, ValidateEvent(item.Event))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateNewEvent(t *testing.T) {
|
||||
someTime := metav1.MicroTime{Time: time.Unix(1505828956, 0)}
|
||||
table := []struct {
|
||||
*core.Event
|
||||
valid bool
|
||||
msg string
|
||||
}{
|
||||
{
|
||||
Event: &core.Event{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test",
|
||||
Namespace: metav1.NamespaceDefault,
|
||||
},
|
||||
InvolvedObject: core.ObjectReference{
|
||||
APIVersion: "v1",
|
||||
Kind: "Node",
|
||||
},
|
||||
EventTime: someTime,
|
||||
},
|
||||
valid: false,
|
||||
msg: "Old Event with EventTime should trigger new validation and fail",
|
||||
},
|
||||
{
|
||||
Event: &core.Event{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test",
|
||||
Namespace: metav1.NamespaceSystem,
|
||||
},
|
||||
InvolvedObject: core.ObjectReference{
|
||||
APIVersion: "v1",
|
||||
Kind: "Node",
|
||||
},
|
||||
EventTime: someTime,
|
||||
ReportingController: "k8s.io/my-controller",
|
||||
ReportingInstance: "node-xyz",
|
||||
Action: "Do",
|
||||
Reason: "Because",
|
||||
},
|
||||
valid: true,
|
||||
msg: "Valid new Event",
|
||||
},
|
||||
{
|
||||
Event: &core.Event{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test",
|
||||
Namespace: metav1.NamespaceSystem,
|
||||
},
|
||||
InvolvedObject: core.ObjectReference{
|
||||
APIVersion: "v1",
|
||||
Kind: "Node",
|
||||
},
|
||||
EventTime: someTime,
|
||||
ReportingController: "my-contr@ller",
|
||||
ReportingInstance: "node-xyz",
|
||||
Action: "Do",
|
||||
Reason: "Because",
|
||||
},
|
||||
valid: false,
|
||||
msg: "not qualified reportingController",
|
||||
},
|
||||
{
|
||||
Event: &core.Event{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test",
|
||||
Namespace: metav1.NamespaceSystem,
|
||||
},
|
||||
InvolvedObject: core.ObjectReference{
|
||||
APIVersion: "v1",
|
||||
Kind: "Node",
|
||||
},
|
||||
EventTime: someTime,
|
||||
ReportingController: "k8s.io/my-controller",
|
||||
ReportingInstance: "node-xyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
|
||||
Action: "Do",
|
||||
Reason: "Because",
|
||||
},
|
||||
valid: false,
|
||||
msg: "too long reporting instance",
|
||||
},
|
||||
{
|
||||
Event: &core.Event{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test",
|
||||
Namespace: metav1.NamespaceSystem,
|
||||
},
|
||||
InvolvedObject: core.ObjectReference{
|
||||
APIVersion: "v1",
|
||||
Kind: "Node",
|
||||
},
|
||||
EventTime: someTime,
|
||||
ReportingController: "k8s.io/my-controller",
|
||||
ReportingInstance: "node-xyz",
|
||||
Action: "Do",
|
||||
},
|
||||
valid: false,
|
||||
msg: "missing reason",
|
||||
},
|
||||
{
|
||||
Event: &core.Event{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test",
|
||||
Namespace: metav1.NamespaceSystem,
|
||||
},
|
||||
InvolvedObject: core.ObjectReference{
|
||||
APIVersion: "v1",
|
||||
Kind: "Node",
|
||||
},
|
||||
EventTime: someTime,
|
||||
ReportingController: "k8s.io/my-controller",
|
||||
ReportingInstance: "node-xyz",
|
||||
Reason: "Because",
|
||||
},
|
||||
valid: false,
|
||||
msg: "missing action",
|
||||
},
|
||||
{
|
||||
Event: &core.Event{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test",
|
||||
},
|
||||
InvolvedObject: core.ObjectReference{
|
||||
APIVersion: "v1",
|
||||
Kind: "Node",
|
||||
},
|
||||
EventTime: someTime,
|
||||
ReportingController: "k8s.io/my-controller",
|
||||
ReportingInstance: "node-xyz",
|
||||
Reason: "Because",
|
||||
},
|
||||
valid: false,
|
||||
msg: "missing namespace",
|
||||
},
|
||||
{
|
||||
Event: &core.Event{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test",
|
||||
},
|
||||
InvolvedObject: core.ObjectReference{
|
||||
APIVersion: "v1",
|
||||
Kind: "Node",
|
||||
},
|
||||
EventTime: someTime,
|
||||
ReportingController: "k8s.io/my-controller",
|
||||
ReportingInstance: "node-xyz",
|
||||
Action: "Do",
|
||||
Reason: "Because",
|
||||
Message: `zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz`,
|
||||
},
|
||||
valid: false,
|
||||
msg: "too long message",
|
||||
},
|
||||
}
|
||||
|
||||
for _, item := range table {
|
||||
if e, a := item.valid, len(ValidateEvent(item.Event)) == 0; e != a {
|
||||
t.Errorf("%v: expected %v, got %v: %v", item.msg, e, a, ValidateEvent(item.Event))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
36
pkg/apis/core/zz_generated.deepcopy.go
generated
36
pkg/apis/core/zz_generated.deepcopy.go
generated
@@ -1383,6 +1383,25 @@ func (in *Event) DeepCopyInto(out *Event) {
|
||||
out.Source = in.Source
|
||||
in.FirstTimestamp.DeepCopyInto(&out.FirstTimestamp)
|
||||
in.LastTimestamp.DeepCopyInto(&out.LastTimestamp)
|
||||
in.EventTime.DeepCopyInto(&out.EventTime)
|
||||
if in.Series != nil {
|
||||
in, out := &in.Series, &out.Series
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(EventSeries)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.Related != nil {
|
||||
in, out := &in.Related, &out.Related
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1439,6 +1458,23 @@ func (in *EventList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EventSeries) DeepCopyInto(out *EventSeries) {
|
||||
*out = *in
|
||||
in.LastObservedTime.DeepCopyInto(&out.LastObservedTime)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSeries.
|
||||
func (in *EventSeries) DeepCopy() *EventSeries {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EventSeries)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EventSource) DeepCopyInto(out *EventSource) {
|
||||
*out = *in
|
||||
|
34
pkg/apis/events/BUILD
Normal file
34
pkg/apis/events/BUILD
Normal file
@@ -0,0 +1,34 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"register.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/events",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//pkg/apis/events/install:all-srcs",
|
||||
"//pkg/apis/events/v1beta1:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
18
pkg/apis/events/doc.go
Normal file
18
pkg/apis/events/doc.go
Normal 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.
|
||||
*/
|
||||
|
||||
// +groupName=events.k8s.io
|
||||
package events // import "k8s.io/kubernetes/pkg/apis/events"
|
30
pkg/apis/events/install/BUILD
Normal file
30
pkg/apis/events/install/BUILD
Normal file
@@ -0,0 +1,30 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["install.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/events/install",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/events:go_default_library",
|
||||
"//pkg/apis/events/v1beta1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime: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"],
|
||||
)
|
48
pkg/apis/events/install/install.go
Normal file
48
pkg/apis/events/install/install.go
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package install installs the events API group, making it available as
|
||||
// an option to all of the API encoding/decoding machinery.
|
||||
package install
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||
"k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||
"k8s.io/kubernetes/pkg/apis/events"
|
||||
"k8s.io/kubernetes/pkg/apis/events/v1beta1"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Install(legacyscheme.GroupFactoryRegistry, legacyscheme.Registry, legacyscheme.Scheme)
|
||||
}
|
||||
|
||||
// Install registers the API group and adds types to a scheme
|
||||
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
|
||||
if err := announced.NewGroupMetaFactory(
|
||||
&announced.GroupMetaFactoryArgs{
|
||||
GroupName: events.GroupName,
|
||||
VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version},
|
||||
AddInternalObjectsToScheme: events.AddToScheme,
|
||||
},
|
||||
announced.VersionToSchemeFunc{
|
||||
v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
|
||||
},
|
||||
).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
52
pkg/apis/events/register.go
Normal file
52
pkg/apis/events/register.go
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package events
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/apis/core"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
const GroupName = "events.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||
|
||||
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||
func Kind(kind string) schema.GroupKind {
|
||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||
}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&core.Event{},
|
||||
&core.EventList{},
|
||||
)
|
||||
return nil
|
||||
}
|
37
pkg/apis/events/v1beta1/BUILD
Normal file
37
pkg/apis/events/v1beta1/BUILD
Normal file
@@ -0,0 +1,37 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"conversion.go",
|
||||
"doc.go",
|
||||
"register.go",
|
||||
"zz_generated.conversion.go",
|
||||
"zz_generated.defaults.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/events/v1beta1",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/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/apimachinery/pkg/conversion:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema: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"],
|
||||
)
|
58
pkg/apis/events/v1beta1/conversion.go
Normal file
58
pkg/apis/events/v1beta1/conversion.go
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
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"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
k8s_api "k8s.io/kubernetes/pkg/apis/core"
|
||||
k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1"
|
||||
)
|
||||
|
||||
func Convert_v1beta1_Event_To_core_Event(in *v1beta1.Event, out *k8s_api.Event, s conversion.Scope) error {
|
||||
if err := autoConvert_v1beta1_Event_To_core_Event(in, out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := k8s_api_v1.Convert_v1_ObjectReference_To_core_ObjectReference(&in.Regarding, &out.InvolvedObject, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := k8s_api_v1.Convert_v1_EventSource_To_core_EventSource(&in.DeprecatedSource, &out.Source, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Message = in.Note
|
||||
out.FirstTimestamp = in.DeprecatedFirstTimestamp
|
||||
out.LastTimestamp = in.DeprecatedLastTimestamp
|
||||
out.Count = in.DeprecatedCount
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_core_Event_To_v1beta1_Event(in *k8s_api.Event, out *v1beta1.Event, s conversion.Scope) error {
|
||||
if err := autoConvert_core_Event_To_v1beta1_Event(in, out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := k8s_api_v1.Convert_core_ObjectReference_To_v1_ObjectReference(&in.InvolvedObject, &out.Regarding, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := k8s_api_v1.Convert_core_EventSource_To_v1_EventSource(&in.Source, &out.DeprecatedSource, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Note = in.Message
|
||||
out.DeprecatedFirstTimestamp = in.FirstTimestamp
|
||||
out.DeprecatedLastTimestamp = in.LastTimestamp
|
||||
out.DeprecatedCount = in.Count
|
||||
return nil
|
||||
}
|
23
pkg/apis/events/v1beta1/doc.go
Normal file
23
pkg/apis/events/v1beta1/doc.go
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/events
|
||||
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/events/v1beta1
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/events/v1beta1
|
||||
|
||||
// +groupName=events.k8s.io
|
||||
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/events/v1beta1"
|
45
pkg/apis/events/v1beta1/register.go
Normal file
45
pkg/apis/events/v1beta1/register.go
Normal 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.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
const GroupName = "events.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
localSchemeBuilder = &eventsv1beta1.SchemeBuilder
|
||||
AddToScheme = localSchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
func init() {
|
||||
// We only register manually written functions here. The registration of the
|
||||
// generated functions takes place in the generated files. The separation
|
||||
// makes the code compile even when the generated files are missing.
|
||||
localSchemeBuilder.Register(RegisterDefaults)
|
||||
}
|
151
pkg/apis/events/v1beta1/zz_generated.conversion.go
generated
Normal file
151
pkg/apis/events/v1beta1/zz_generated.conversion.go
generated
Normal file
@@ -0,0 +1,151 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
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 autogenerated by conversion-gen. Do not edit it manually!
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
v1beta1 "k8s.io/api/events/v1beta1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
core "k8s.io/kubernetes/pkg/apis/core"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
func init() {
|
||||
localSchemeBuilder.Register(RegisterConversions)
|
||||
}
|
||||
|
||||
// RegisterConversions adds conversion functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedConversionFuncs(
|
||||
Convert_v1beta1_Event_To_core_Event,
|
||||
Convert_core_Event_To_v1beta1_Event,
|
||||
Convert_v1beta1_EventList_To_core_EventList,
|
||||
Convert_core_EventList_To_v1beta1_EventList,
|
||||
Convert_v1beta1_EventSeries_To_core_EventSeries,
|
||||
Convert_core_EventSeries_To_v1beta1_EventSeries,
|
||||
)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_Event_To_core_Event(in *v1beta1.Event, out *core.Event, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.EventTime = in.EventTime
|
||||
out.Series = (*core.EventSeries)(unsafe.Pointer(in.Series))
|
||||
out.ReportingController = in.ReportingController
|
||||
out.ReportingInstance = in.ReportingInstance
|
||||
out.Action = in.Action
|
||||
out.Reason = in.Reason
|
||||
// WARNING: in.Regarding requires manual conversion: does not exist in peer-type
|
||||
out.Related = (*core.ObjectReference)(unsafe.Pointer(in.Related))
|
||||
// WARNING: in.Note requires manual conversion: does not exist in peer-type
|
||||
out.Type = in.Type
|
||||
// WARNING: in.DeprecatedSource requires manual conversion: does not exist in peer-type
|
||||
// WARNING: in.DeprecatedFirstTimestamp requires manual conversion: does not exist in peer-type
|
||||
// WARNING: in.DeprecatedLastTimestamp requires manual conversion: does not exist in peer-type
|
||||
// WARNING: in.DeprecatedCount requires manual conversion: does not exist in peer-type
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_core_Event_To_v1beta1_Event(in *core.Event, out *v1beta1.Event, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
// WARNING: in.InvolvedObject requires manual conversion: does not exist in peer-type
|
||||
out.Reason = in.Reason
|
||||
// WARNING: in.Message requires manual conversion: does not exist in peer-type
|
||||
// WARNING: in.Source requires manual conversion: does not exist in peer-type
|
||||
// WARNING: in.FirstTimestamp requires manual conversion: does not exist in peer-type
|
||||
// WARNING: in.LastTimestamp requires manual conversion: does not exist in peer-type
|
||||
// WARNING: in.Count requires manual conversion: does not exist in peer-type
|
||||
out.Type = in.Type
|
||||
out.EventTime = in.EventTime
|
||||
out.Series = (*v1beta1.EventSeries)(unsafe.Pointer(in.Series))
|
||||
out.Action = in.Action
|
||||
out.Related = (*v1.ObjectReference)(unsafe.Pointer(in.Related))
|
||||
out.ReportingController = in.ReportingController
|
||||
out.ReportingInstance = in.ReportingInstance
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_EventList_To_core_EventList(in *v1beta1.EventList, out *core.EventList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]core.Event, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1beta1_Event_To_core_Event(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_EventList_To_core_EventList is an autogenerated conversion function.
|
||||
func Convert_v1beta1_EventList_To_core_EventList(in *v1beta1.EventList, out *core.EventList, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_EventList_To_core_EventList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_EventList_To_v1beta1_EventList(in *core.EventList, out *v1beta1.EventList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]v1beta1.Event, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_core_Event_To_v1beta1_Event(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_EventList_To_v1beta1_EventList is an autogenerated conversion function.
|
||||
func Convert_core_EventList_To_v1beta1_EventList(in *core.EventList, out *v1beta1.EventList, s conversion.Scope) error {
|
||||
return autoConvert_core_EventList_To_v1beta1_EventList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_EventSeries_To_core_EventSeries(in *v1beta1.EventSeries, out *core.EventSeries, s conversion.Scope) error {
|
||||
out.Count = in.Count
|
||||
out.LastObservedTime = in.LastObservedTime
|
||||
out.State = core.EventSeriesState(in.State)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_EventSeries_To_core_EventSeries is an autogenerated conversion function.
|
||||
func Convert_v1beta1_EventSeries_To_core_EventSeries(in *v1beta1.EventSeries, out *core.EventSeries, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_EventSeries_To_core_EventSeries(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_EventSeries_To_v1beta1_EventSeries(in *core.EventSeries, out *v1beta1.EventSeries, s conversion.Scope) error {
|
||||
out.Count = in.Count
|
||||
out.LastObservedTime = in.LastObservedTime
|
||||
out.State = v1beta1.EventSeriesState(in.State)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_EventSeries_To_v1beta1_EventSeries is an autogenerated conversion function.
|
||||
func Convert_core_EventSeries_To_v1beta1_EventSeries(in *core.EventSeries, out *v1beta1.EventSeries, s conversion.Scope) error {
|
||||
return autoConvert_core_EventSeries_To_v1beta1_EventSeries(in, out, s)
|
||||
}
|
32
pkg/apis/events/v1beta1/zz_generated.defaults.go
generated
Normal file
32
pkg/apis/events/v1beta1/zz_generated.defaults.go
generated
Normal file
@@ -0,0 +1,32 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
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 autogenerated by defaulter-gen. Do not edit it manually!
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// RegisterDefaults adds defaulters functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
// All generated defaulters are covering - they call all nested defaulters.
|
||||
func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||
return nil
|
||||
}
|
@@ -21,6 +21,7 @@ go_library(
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/events/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library",
|
||||
@@ -56,6 +57,7 @@ filegroup(
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:all-srcs",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion:all-srcs",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:all-srcs",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/events/internalversion:all-srcs",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:all-srcs",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion:all-srcs",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:all-srcs",
|
||||
|
@@ -29,6 +29,7 @@ import (
|
||||
batchinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion"
|
||||
certificatesinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion"
|
||||
coreinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion"
|
||||
eventsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion"
|
||||
extensionsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion"
|
||||
networkinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion"
|
||||
policyinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion"
|
||||
@@ -48,6 +49,7 @@ type Interface interface {
|
||||
Autoscaling() autoscalinginternalversion.AutoscalingInterface
|
||||
Batch() batchinternalversion.BatchInterface
|
||||
Certificates() certificatesinternalversion.CertificatesInterface
|
||||
Events() eventsinternalversion.EventsInterface
|
||||
Extensions() extensionsinternalversion.ExtensionsInterface
|
||||
Networking() networkinginternalversion.NetworkingInterface
|
||||
Policy() policyinternalversion.PolicyInterface
|
||||
@@ -69,6 +71,7 @@ type Clientset struct {
|
||||
autoscaling *autoscalinginternalversion.AutoscalingClient
|
||||
batch *batchinternalversion.BatchClient
|
||||
certificates *certificatesinternalversion.CertificatesClient
|
||||
events *eventsinternalversion.EventsClient
|
||||
extensions *extensionsinternalversion.ExtensionsClient
|
||||
networking *networkinginternalversion.NetworkingClient
|
||||
policy *policyinternalversion.PolicyClient
|
||||
@@ -118,6 +121,11 @@ func (c *Clientset) Certificates() certificatesinternalversion.CertificatesInter
|
||||
return c.certificates
|
||||
}
|
||||
|
||||
// Events retrieves the EventsClient
|
||||
func (c *Clientset) Events() eventsinternalversion.EventsInterface {
|
||||
return c.events
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() extensionsinternalversion.ExtensionsInterface {
|
||||
return c.extensions
|
||||
@@ -201,6 +209,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.events, err = eventsinternalversion.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.extensions, err = extensionsinternalversion.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -250,6 +262,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
cs.autoscaling = autoscalinginternalversion.NewForConfigOrDie(c)
|
||||
cs.batch = batchinternalversion.NewForConfigOrDie(c)
|
||||
cs.certificates = certificatesinternalversion.NewForConfigOrDie(c)
|
||||
cs.events = eventsinternalversion.NewForConfigOrDie(c)
|
||||
cs.extensions = extensionsinternalversion.NewForConfigOrDie(c)
|
||||
cs.networking = networkinginternalversion.NewForConfigOrDie(c)
|
||||
cs.policy = policyinternalversion.NewForConfigOrDie(c)
|
||||
@@ -273,6 +286,7 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.autoscaling = autoscalinginternalversion.New(c)
|
||||
cs.batch = batchinternalversion.New(c)
|
||||
cs.certificates = certificatesinternalversion.New(c)
|
||||
cs.events = eventsinternalversion.New(c)
|
||||
cs.extensions = extensionsinternalversion.New(c)
|
||||
cs.networking = networkinginternalversion.New(c)
|
||||
cs.policy = policyinternalversion.New(c)
|
||||
|
@@ -22,6 +22,7 @@ go_library(
|
||||
"//pkg/apis/batch:go_default_library",
|
||||
"//pkg/apis/certificates:go_default_library",
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/events:go_default_library",
|
||||
"//pkg/apis/extensions:go_default_library",
|
||||
"//pkg/apis/networking:go_default_library",
|
||||
"//pkg/apis/policy:go_default_library",
|
||||
@@ -46,6 +47,8 @@ go_library(
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/events/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion:go_default_library",
|
||||
|
@@ -39,6 +39,8 @@ import (
|
||||
fakecertificatesinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake"
|
||||
coreinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion"
|
||||
fakecoreinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake"
|
||||
eventsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion"
|
||||
fakeeventsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake"
|
||||
extensionsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion"
|
||||
fakeextensionsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake"
|
||||
networkinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion"
|
||||
@@ -128,6 +130,11 @@ func (c *Clientset) Certificates() certificatesinternalversion.CertificatesInter
|
||||
return &fakecertificatesinternalversion.FakeCertificates{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Events retrieves the EventsClient
|
||||
func (c *Clientset) Events() eventsinternalversion.EventsInterface {
|
||||
return &fakeeventsinternalversion.FakeEvents{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() extensionsinternalversion.ExtensionsInterface {
|
||||
return &fakeextensionsinternalversion.FakeExtensions{Fake: &c.Fake}
|
||||
|
@@ -29,6 +29,7 @@ import (
|
||||
batchinternalversion "k8s.io/kubernetes/pkg/apis/batch"
|
||||
certificatesinternalversion "k8s.io/kubernetes/pkg/apis/certificates"
|
||||
coreinternalversion "k8s.io/kubernetes/pkg/apis/core"
|
||||
eventsinternalversion "k8s.io/kubernetes/pkg/apis/events"
|
||||
extensionsinternalversion "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
networkinginternalversion "k8s.io/kubernetes/pkg/apis/networking"
|
||||
policyinternalversion "k8s.io/kubernetes/pkg/apis/policy"
|
||||
@@ -70,6 +71,7 @@ func AddToScheme(scheme *runtime.Scheme) {
|
||||
autoscalinginternalversion.AddToScheme(scheme)
|
||||
batchinternalversion.AddToScheme(scheme)
|
||||
certificatesinternalversion.AddToScheme(scheme)
|
||||
eventsinternalversion.AddToScheme(scheme)
|
||||
extensionsinternalversion.AddToScheme(scheme)
|
||||
networkinginternalversion.AddToScheme(scheme)
|
||||
policyinternalversion.AddToScheme(scheme)
|
||||
|
@@ -23,6 +23,7 @@ go_library(
|
||||
"//pkg/apis/certificates/install:go_default_library",
|
||||
"//pkg/apis/componentconfig/install:go_default_library",
|
||||
"//pkg/apis/core/install:go_default_library",
|
||||
"//pkg/apis/events/install:go_default_library",
|
||||
"//pkg/apis/extensions/install:go_default_library",
|
||||
"//pkg/apis/networking/install:go_default_library",
|
||||
"//pkg/apis/policy/install:go_default_library",
|
||||
|
@@ -31,6 +31,7 @@ import (
|
||||
batch "k8s.io/kubernetes/pkg/apis/batch/install"
|
||||
certificates "k8s.io/kubernetes/pkg/apis/certificates/install"
|
||||
core "k8s.io/kubernetes/pkg/apis/core/install"
|
||||
events "k8s.io/kubernetes/pkg/apis/events/install"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions/install"
|
||||
networking "k8s.io/kubernetes/pkg/apis/networking/install"
|
||||
policy "k8s.io/kubernetes/pkg/apis/policy/install"
|
||||
@@ -63,6 +64,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
|
||||
autoscaling.Install(groupFactoryRegistry, registry, scheme)
|
||||
batch.Install(groupFactoryRegistry, registry, scheme)
|
||||
certificates.Install(groupFactoryRegistry, registry, scheme)
|
||||
events.Install(groupFactoryRegistry, registry, scheme)
|
||||
extensions.Install(groupFactoryRegistry, registry, scheme)
|
||||
networking.Install(groupFactoryRegistry, registry, scheme)
|
||||
policy.Install(groupFactoryRegistry, registry, scheme)
|
||||
|
@@ -0,0 +1,33 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"events_client.go",
|
||||
"generated_expansion.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/client/clientset_generated/internalclientset/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",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
@@ -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 internalversion
|
@@ -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.
|
||||
*/
|
||||
|
||||
package internalversion
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme"
|
||||
)
|
||||
|
||||
type EventsInterface interface {
|
||||
RESTClient() rest.Interface
|
||||
}
|
||||
|
||||
// EventsClient is used to interact with features provided by the events.k8s.io group.
|
||||
type EventsClient struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
// NewForConfig creates a new EventsClient for the given config.
|
||||
func NewForConfig(c *rest.Config) (*EventsClient, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &EventsClient{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new EventsClient for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *EventsClient {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new EventsClient for the given RESTClient.
|
||||
func New(c rest.Interface) *EventsClient {
|
||||
return &EventsClient{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
g, err := scheme.Registry.Group("events.k8s.io")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
|
||||
gv := g.GroupVersion
|
||||
config.GroupVersion = &gv
|
||||
}
|
||||
config.NegotiatedSerializer = scheme.Codecs
|
||||
|
||||
if config.QPS == 0 {
|
||||
config.QPS = 5
|
||||
}
|
||||
if config.Burst == 0 {
|
||||
config.Burst = 10
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *EventsClient) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"fake_events_client.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//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"],
|
||||
)
|
@@ -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
|
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
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 (
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeEvents struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeEvents) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
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 internalversion
|
@@ -38,6 +38,7 @@ openapi_library(
|
||||
"k8s.io/api/batch/v2alpha1",
|
||||
"k8s.io/api/certificates/v1beta1",
|
||||
"k8s.io/api/core/v1",
|
||||
"k8s.io/api/events/v1beta1",
|
||||
"k8s.io/api/extensions/v1beta1",
|
||||
"k8s.io/api/imagepolicy/v1alpha1",
|
||||
"k8s.io/api/networking/v1",
|
||||
|
@@ -30,6 +30,7 @@ go_library(
|
||||
"//pkg/apis/componentconfig/install:go_default_library",
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/core/install:go_default_library",
|
||||
"//pkg/apis/events/install:go_default_library",
|
||||
"//pkg/apis/extensions/install:go_default_library",
|
||||
"//pkg/apis/imagepolicy/install:go_default_library",
|
||||
"//pkg/apis/networking/install:go_default_library",
|
||||
@@ -57,6 +58,7 @@ go_library(
|
||||
"//pkg/registry/core/service/ipallocator:go_default_library",
|
||||
"//pkg/registry/core/service/ipallocator/controller:go_default_library",
|
||||
"//pkg/registry/core/service/portallocator/controller:go_default_library",
|
||||
"//pkg/registry/events/rest:go_default_library",
|
||||
"//pkg/registry/extensions/rest:go_default_library",
|
||||
"//pkg/registry/networking/rest:go_default_library",
|
||||
"//pkg/registry/policy/rest:go_default_library",
|
||||
@@ -82,6 +84,7 @@ go_library(
|
||||
"//vendor/k8s.io/api/batch/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/events/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/policy/v1beta1:go_default_library",
|
||||
|
@@ -32,6 +32,7 @@ import (
|
||||
_ "k8s.io/kubernetes/pkg/apis/certificates/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/componentconfig/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/core/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/events/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/extensions/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/imagepolicy/install"
|
||||
_ "k8s.io/kubernetes/pkg/apis/networking/install"
|
||||
|
@@ -37,6 +37,7 @@ import (
|
||||
batchapiv1beta1 "k8s.io/api/batch/v1beta1"
|
||||
certificatesapiv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
apiv1 "k8s.io/api/core/v1"
|
||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||
extensionsapiv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
networkingapiv1 "k8s.io/api/networking/v1"
|
||||
policyapiv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
@@ -77,6 +78,7 @@ import (
|
||||
batchrest "k8s.io/kubernetes/pkg/registry/batch/rest"
|
||||
certificatesrest "k8s.io/kubernetes/pkg/registry/certificates/rest"
|
||||
corerest "k8s.io/kubernetes/pkg/registry/core/rest"
|
||||
eventsrest "k8s.io/kubernetes/pkg/registry/events/rest"
|
||||
extensionsrest "k8s.io/kubernetes/pkg/registry/extensions/rest"
|
||||
networkingrest "k8s.io/kubernetes/pkg/registry/networking/rest"
|
||||
policyrest "k8s.io/kubernetes/pkg/registry/policy/rest"
|
||||
@@ -350,6 +352,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget)
|
||||
// See https://github.com/kubernetes/kubernetes/issues/42392
|
||||
appsrest.RESTStorageProvider{},
|
||||
admissionregistrationrest.RESTStorageProvider{},
|
||||
eventsrest.RESTStorageProvider{TTL: c.ExtraConfig.EventTTL},
|
||||
}
|
||||
m.InstallAPIs(c.ExtraConfig.APIResourceConfigSource, c.GenericConfig.RESTOptionsGetter, restStorageProviders...)
|
||||
|
||||
@@ -479,6 +482,7 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig {
|
||||
authorizationapiv1.SchemeGroupVersion,
|
||||
authorizationapiv1beta1.SchemeGroupVersion,
|
||||
networkingapiv1.SchemeGroupVersion,
|
||||
eventsv1beta1.SchemeGroupVersion,
|
||||
)
|
||||
|
||||
// all extensions resources except these are disabled by default
|
||||
|
@@ -63,6 +63,8 @@ filegroup(
|
||||
"//pkg/registry/core/secret:all-srcs",
|
||||
"//pkg/registry/core/service:all-srcs",
|
||||
"//pkg/registry/core/serviceaccount:all-srcs",
|
||||
"//pkg/registry/events/event:all-srcs",
|
||||
"//pkg/registry/events/rest:all-srcs",
|
||||
"//pkg/registry/extensions/controller/storage:all-srcs",
|
||||
"//pkg/registry/extensions/daemonset:all-srcs",
|
||||
"//pkg/registry/extensions/deployment:all-srcs",
|
||||
|
8
pkg/registry/events/OWNERS
Normal file
8
pkg/registry/events/OWNERS
Normal file
@@ -0,0 +1,8 @@
|
||||
reviewers:
|
||||
- gmarek
|
||||
- deads2k
|
||||
- sttts
|
||||
approvers:
|
||||
- gmarek
|
||||
- deads2k
|
||||
- sttts
|
38
pkg/registry/events/event/BUILD
Normal file
38
pkg/registry/events/event/BUILD
Normal file
@@ -0,0 +1,38 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"strategy.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/registry/events/event",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/core/validation:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/storage:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/storage/names: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"],
|
||||
)
|
17
pkg/registry/events/event/doc.go
Normal file
17
pkg/registry/events/event/doc.go
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
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 event // import "k8s.io/kubernetes/pkg/registry/events/event"
|
104
pkg/registry/events/event/strategy.go
Normal file
104
pkg/registry/events/event/strategy.go
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
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 event
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
|
||||
"k8s.io/apiserver/pkg/registry/generic"
|
||||
apistorage "k8s.io/apiserver/pkg/storage"
|
||||
"k8s.io/apiserver/pkg/storage/names"
|
||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
"k8s.io/kubernetes/pkg/apis/core/validation"
|
||||
)
|
||||
|
||||
// eventStrategy implements verification logic for Pod Presets.
|
||||
type eventStrategy struct {
|
||||
runtime.ObjectTyper
|
||||
names.NameGenerator
|
||||
}
|
||||
|
||||
// Strategy is the default logic that applies when creating and updating Pod Preset objects.
|
||||
var Strategy = eventStrategy{legacyscheme.Scheme, names.SimpleNameGenerator}
|
||||
|
||||
// NamespaceScoped returns true because all Events need to be within a namespace.
|
||||
func (eventStrategy) NamespaceScoped() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// PrepareForCreate clears the status of a Pod Preset before creation.
|
||||
func (eventStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) {
|
||||
}
|
||||
|
||||
// PrepareForUpdate clears fields that are not allowed to be set by end users on update.
|
||||
func (eventStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old runtime.Object) {
|
||||
}
|
||||
|
||||
// Validate validates a new Event.
|
||||
func (eventStrategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList {
|
||||
event := obj.(*api.Event)
|
||||
return validation.ValidateEvent(event)
|
||||
}
|
||||
|
||||
// Canonicalize normalizes the object after validation.
|
||||
// AllowCreateOnUpdate is false for Event; this means POST is needed to create one.
|
||||
func (eventStrategy) AllowCreateOnUpdate() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (eventStrategy) Canonicalize(obj runtime.Object) {}
|
||||
|
||||
// ValidateUpdate is the default update validation for an end user.
|
||||
func (eventStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
|
||||
event := obj.(*api.Event)
|
||||
return validation.ValidateEvent(event)
|
||||
}
|
||||
|
||||
// AllowUnconditionalUpdate is the default update policy for Event objects.
|
||||
func (eventStrategy) AllowUnconditionalUpdate() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// SelectableFields returns a field set that represents the object.
|
||||
func SelectableFields(pip *api.Event) fields.Set {
|
||||
return generic.ObjectMetaFieldsSet(&pip.ObjectMeta, true)
|
||||
}
|
||||
|
||||
// GetAttrs returns labels and fields of a given object for filtering purposes.
|
||||
func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) {
|
||||
pip, ok := obj.(*api.Event)
|
||||
if !ok {
|
||||
return nil, nil, false, fmt.Errorf("given object is not a Event")
|
||||
}
|
||||
return labels.Set(pip.ObjectMeta.Labels), SelectableFields(pip), pip.Initializers != nil, nil
|
||||
}
|
||||
|
||||
// Matcher is the filter used by the generic etcd backend to watch events
|
||||
// from etcd to clients of the apiserver only interested in specific labels/fields.
|
||||
func Matcher(label labels.Selector, field fields.Selector) apistorage.SelectionPredicate {
|
||||
return apistorage.SelectionPredicate{
|
||||
Label: label,
|
||||
Field: field,
|
||||
GetAttrs: GetAttrs,
|
||||
}
|
||||
}
|
32
pkg/registry/events/rest/BUILD
Normal file
32
pkg/registry/events/rest/BUILD
Normal file
@@ -0,0 +1,32 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["storage_events.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/registry/events/rest",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/events:go_default_library",
|
||||
"//pkg/registry/core/event/storage:go_default_library",
|
||||
"//vendor/k8s.io/api/events/v1beta1:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/server:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/server/storage: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"],
|
||||
)
|
62
pkg/registry/events/rest/storage_events.go
Normal file
62
pkg/registry/events/rest/storage_events.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
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 rest
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
eventsapiv1beta1 "k8s.io/api/events/v1beta1"
|
||||
"k8s.io/apiserver/pkg/registry/generic"
|
||||
"k8s.io/apiserver/pkg/registry/rest"
|
||||
genericapiserver "k8s.io/apiserver/pkg/server"
|
||||
serverstorage "k8s.io/apiserver/pkg/server/storage"
|
||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||
"k8s.io/kubernetes/pkg/apis/events"
|
||||
eventstore "k8s.io/kubernetes/pkg/registry/core/event/storage"
|
||||
)
|
||||
|
||||
type RESTStorageProvider struct {
|
||||
TTL time.Duration
|
||||
}
|
||||
|
||||
func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool) {
|
||||
apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(events.GroupName, legacyscheme.Registry, legacyscheme.Scheme, legacyscheme.ParameterCodec, legacyscheme.Codecs)
|
||||
// If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities.
|
||||
// TODO refactor the plumbing to provide the information in the APIGroupInfo
|
||||
|
||||
if apiResourceConfigSource.AnyResourcesForVersionEnabled(eventsapiv1beta1.SchemeGroupVersion) {
|
||||
apiGroupInfo.VersionedResourcesStorageMap[eventsapiv1beta1.SchemeGroupVersion.Version] = p.v1beta1Storage(apiResourceConfigSource, restOptionsGetter)
|
||||
apiGroupInfo.GroupMeta.GroupVersion = eventsapiv1beta1.SchemeGroupVersion
|
||||
}
|
||||
|
||||
return apiGroupInfo, true
|
||||
}
|
||||
|
||||
func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
|
||||
version := eventsapiv1beta1.SchemeGroupVersion
|
||||
|
||||
storage := map[string]rest.Storage{}
|
||||
if apiResourceConfigSource.ResourceEnabled(version.WithResource("events")) {
|
||||
eventsStorage := eventstore.NewREST(restOptionsGetter, uint64(p.TTL.Seconds()))
|
||||
storage["events"] = eventsStorage
|
||||
}
|
||||
return storage
|
||||
}
|
||||
|
||||
func (p RESTStorageProvider) GroupName() string {
|
||||
return events.GroupName
|
||||
}
|
@@ -34,6 +34,7 @@ filegroup(
|
||||
"//staging/src/k8s.io/api/batch/v2alpha1:all-srcs",
|
||||
"//staging/src/k8s.io/api/certificates/v1beta1:all-srcs",
|
||||
"//staging/src/k8s.io/api/core/v1:all-srcs",
|
||||
"//staging/src/k8s.io/api/events/v1beta1:all-srcs",
|
||||
"//staging/src/k8s.io/api/extensions/v1beta1:all-srcs",
|
||||
"//staging/src/k8s.io/api/imagepolicy/v1alpha1:all-srcs",
|
||||
"//staging/src/k8s.io/api/networking/v1:all-srcs",
|
||||
@@ -157,6 +158,7 @@ filegroup(
|
||||
"//staging/src/k8s.io/client-go/listers/batch/v2alpha1:all-srcs",
|
||||
"//staging/src/k8s.io/client-go/listers/certificates/v1beta1:all-srcs",
|
||||
"//staging/src/k8s.io/client-go/listers/core/v1:all-srcs",
|
||||
"//staging/src/k8s.io/client-go/listers/events/v1beta1:all-srcs",
|
||||
"//staging/src/k8s.io/client-go/listers/extensions/v1beta1:all-srcs",
|
||||
"//staging/src/k8s.io/client-go/listers/imagepolicy/v1alpha1:all-srcs",
|
||||
"//staging/src/k8s.io/client-go/listers/networking/v1:all-srcs",
|
||||
|
3166
staging/src/k8s.io/api/core/v1/generated.pb.go
generated
3166
staging/src/k8s.io/api/core/v1/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@@ -1029,7 +1029,6 @@ message EnvVarSource {
|
||||
}
|
||||
|
||||
// Event is a report of an event somewhere in the cluster.
|
||||
// TODO: Decide whether to store these separately or with the object they apply to.
|
||||
message Event {
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
@@ -1068,6 +1067,30 @@ message Event {
|
||||
// Type of this event (Normal, Warning), new types could be added in the future
|
||||
// +optional
|
||||
optional string type = 9;
|
||||
|
||||
// Time when this Event was first observed.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 10;
|
||||
|
||||
// Data about the Event series this event represents or nil if it's a singleton Event.
|
||||
// +optional
|
||||
optional EventSeries series = 11;
|
||||
|
||||
// What action was taken/failed regarding to the Regarding object.
|
||||
// +optional
|
||||
optional string action = 12;
|
||||
|
||||
// Optional secondary object for more complex actions.
|
||||
// +optional
|
||||
optional ObjectReference related = 13;
|
||||
|
||||
// Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||
// +optional
|
||||
optional string reportingComponent = 14;
|
||||
|
||||
// ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||
// +optional
|
||||
optional string reportingInstance = 15;
|
||||
}
|
||||
|
||||
// EventList is a list of events.
|
||||
@@ -1081,6 +1104,19 @@ message EventList {
|
||||
repeated Event items = 2;
|
||||
}
|
||||
|
||||
// EventSeries contain information on series of events, i.e. thing that was/is happening
|
||||
// continously for some time.
|
||||
message EventSeries {
|
||||
// Number of occurrences in this series up to the last heartbeat time
|
||||
optional int32 count = 1;
|
||||
|
||||
// Time of the last occurence observed
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2;
|
||||
|
||||
// State of this Series: Ongoing or Finished
|
||||
optional string state = 3;
|
||||
}
|
||||
|
||||
// EventSource contains information for an event.
|
||||
message EventSource {
|
||||
// Component from which the event is generated.
|
||||
|
@@ -4468,7 +4468,6 @@ const (
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Event is a report of an event somewhere in the cluster.
|
||||
// TODO: Decide whether to store these separately or with the object they apply to.
|
||||
type Event struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
@@ -4508,8 +4507,51 @@ type Event struct {
|
||||
// Type of this event (Normal, Warning), new types could be added in the future
|
||||
// +optional
|
||||
Type string `json:"type,omitempty" protobuf:"bytes,9,opt,name=type"`
|
||||
|
||||
// Time when this Event was first observed.
|
||||
// +optional
|
||||
EventTime metav1.MicroTime `json:"eventTime,omitempty" protobuf:"bytes,10,opt,name=eventTime"`
|
||||
|
||||
// Data about the Event series this event represents or nil if it's a singleton Event.
|
||||
// +optional
|
||||
Series *EventSeries `json:"series,omitempty" protobuf:"bytes,11,opt,name=series"`
|
||||
|
||||
// What action was taken/failed regarding to the Regarding object.
|
||||
// +optional
|
||||
Action string `json:"action,omitempty" protobuf:"bytes,12,opt,name=action"`
|
||||
|
||||
// Optional secondary object for more complex actions.
|
||||
// +optional
|
||||
Related *ObjectReference `json:"related,omitempty" protobuf:"bytes,13,opt,name=related"`
|
||||
|
||||
// Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||
// +optional
|
||||
ReportingController string `json:"reportingComponent" protobuf:"bytes,14,opt,name=reportingComponent"`
|
||||
|
||||
// ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||
// +optional
|
||||
ReportingInstance string `json:"reportingInstance" protobuf:"bytes,15,opt,name=reportingInstance"`
|
||||
}
|
||||
|
||||
// EventSeries contain information on series of events, i.e. thing that was/is happening
|
||||
// continously for some time.
|
||||
type EventSeries struct {
|
||||
// Number of occurrences in this series up to the last heartbeat time
|
||||
Count int32 `json:"count,omitempty" protobuf:"varint,1,name=count"`
|
||||
// Time of the last occurence observed
|
||||
LastObservedTime metav1.MicroTime `json:"lastObservedTime,omitempty" protobuf:"bytes,2,name=lastObservedTime"`
|
||||
// State of this Series: Ongoing or Finished
|
||||
State EventSeriesState `json:"state,omitempty" protobuf:"bytes,3,name=state"`
|
||||
}
|
||||
|
||||
type EventSeriesState string
|
||||
|
||||
const (
|
||||
EventSeriesStateOngoing EventSeriesState = "Ongoing"
|
||||
EventSeriesStateFinished EventSeriesState = "Finished"
|
||||
EventSeriesStateUnknown EventSeriesState = "Unknown"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// EventList is a list of events.
|
||||
|
@@ -541,16 +541,22 @@ func (EnvVarSource) SwaggerDoc() map[string]string {
|
||||
}
|
||||
|
||||
var map_Event = map[string]string{
|
||||
"": "Event is a report of an event somewhere in the cluster.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"involvedObject": "The object that this event is about.",
|
||||
"reason": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.",
|
||||
"message": "A human-readable description of the status of this operation.",
|
||||
"source": "The component reporting this event. Should be a short machine understandable string.",
|
||||
"firstTimestamp": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)",
|
||||
"lastTimestamp": "The time at which the most recent occurrence of this event was recorded.",
|
||||
"count": "The number of times this event has occurred.",
|
||||
"type": "Type of this event (Normal, Warning), new types could be added in the future",
|
||||
"": "Event is a report of an event somewhere in the cluster.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"involvedObject": "The object that this event is about.",
|
||||
"reason": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.",
|
||||
"message": "A human-readable description of the status of this operation.",
|
||||
"source": "The component reporting this event. Should be a short machine understandable string.",
|
||||
"firstTimestamp": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)",
|
||||
"lastTimestamp": "The time at which the most recent occurrence of this event was recorded.",
|
||||
"count": "The number of times this event has occurred.",
|
||||
"type": "Type of this event (Normal, Warning), new types could be added in the future",
|
||||
"eventTime": "Time when this Event was first observed.",
|
||||
"series": "Data about the Event series this event represents or nil if it's a singleton Event.",
|
||||
"action": "What action was taken/failed regarding to the Regarding object.",
|
||||
"related": "Optional secondary object for more complex actions.",
|
||||
"reportingComponent": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.",
|
||||
"reportingInstance": "ID of the controller instance, e.g. `kubelet-xyzf`.",
|
||||
}
|
||||
|
||||
func (Event) SwaggerDoc() map[string]string {
|
||||
@@ -567,6 +573,17 @@ func (EventList) SwaggerDoc() map[string]string {
|
||||
return map_EventList
|
||||
}
|
||||
|
||||
var map_EventSeries = map[string]string{
|
||||
"": "EventSeries contain information on series of events, i.e. thing that was/is happening continously for some time.",
|
||||
"count": "Number of occurrences in this series up to the last heartbeat time",
|
||||
"lastObservedTime": "Time of the last occurence observed",
|
||||
"state": "State of this Series: Ongoing or Finished",
|
||||
}
|
||||
|
||||
func (EventSeries) SwaggerDoc() map[string]string {
|
||||
return map_EventSeries
|
||||
}
|
||||
|
||||
var map_EventSource = map[string]string{
|
||||
"": "EventSource contains information for an event.",
|
||||
"component": "Component from which the event is generated.",
|
||||
|
@@ -1383,6 +1383,25 @@ func (in *Event) DeepCopyInto(out *Event) {
|
||||
out.Source = in.Source
|
||||
in.FirstTimestamp.DeepCopyInto(&out.FirstTimestamp)
|
||||
in.LastTimestamp.DeepCopyInto(&out.LastTimestamp)
|
||||
in.EventTime.DeepCopyInto(&out.EventTime)
|
||||
if in.Series != nil {
|
||||
in, out := &in.Series, &out.Series
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(EventSeries)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.Related != nil {
|
||||
in, out := &in.Related, &out.Related
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1439,6 +1458,23 @@ func (in *EventList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EventSeries) DeepCopyInto(out *EventSeries) {
|
||||
*out = *in
|
||||
in.LastObservedTime.DeepCopyInto(&out.LastObservedTime)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSeries.
|
||||
func (in *EventSeries) DeepCopy() *EventSeries {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EventSeries)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EventSource) DeepCopyInto(out *EventSource) {
|
||||
*out = *in
|
||||
|
8
staging/src/k8s.io/api/events/OWNERS
Normal file
8
staging/src/k8s.io/api/events/OWNERS
Normal file
@@ -0,0 +1,8 @@
|
||||
reviewers:
|
||||
- gmarek
|
||||
- deads2k
|
||||
- sttts
|
||||
approvers:
|
||||
- gmarek
|
||||
- deads2k
|
||||
- sttts
|
42
staging/src/k8s.io/api/events/v1beta1/BUILD
Normal file
42
staging/src/k8s.io/api/events/v1beta1/BUILD
Normal file
@@ -0,0 +1,42 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
filegroup(
|
||||
name = "go_default_library_protos",
|
||||
srcs = ["generated.proto"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"generated.pb.go",
|
||||
"register.go",
|
||||
"types.go",
|
||||
"types_swagger_doc_generated.go",
|
||||
"zz_generated.deepcopy.go",
|
||||
],
|
||||
importpath = "k8s.io/api/events/v1beta1",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
|
||||
"//vendor/k8s.io/api/core/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/runtime/schema: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"],
|
||||
)
|
21
staging/src/k8s.io/api/events/v1beta1/doc.go
Normal file
21
staging/src/k8s.io/api/events/v1beta1/doc.go
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=events.k8s.io
|
||||
package v1beta1 // import "k8s.io/api/events/v1beta1"
|
1306
staging/src/k8s.io/api/events/v1beta1/generated.pb.go
generated
Normal file
1306
staging/src/k8s.io/api/events/v1beta1/generated.pb.go
generated
Normal file
File diff suppressed because it is too large
Load Diff
122
staging/src/k8s.io/api/events/v1beta1/generated.proto
Normal file
122
staging/src/k8s.io/api/events/v1beta1/generated.proto
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
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 autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package k8s.io.api.events.v1beta1;
|
||||
|
||||
import "k8s.io/api/core/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1beta1";
|
||||
|
||||
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
||||
message Event {
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Required. Time when this Event was first observed.
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 2;
|
||||
|
||||
// Data about the Event series this event represents or nil if it's a singleton Event.
|
||||
// +optional
|
||||
optional EventSeries series = 3;
|
||||
|
||||
// Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||
// +optional
|
||||
optional string reportingController = 4;
|
||||
|
||||
// ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||
// +optional
|
||||
optional string reportingInstance = 5;
|
||||
|
||||
// What action was taken/failed regarding to the regarding object.
|
||||
// +optional
|
||||
optional string action = 6;
|
||||
|
||||
// Why the action was taken.
|
||||
optional string reason = 7;
|
||||
|
||||
// The object this Event is about. In most cases it's an Object reporting controller implements.
|
||||
// E.g. ReplicaSetController implements ReplicaSets and this event is emitted because
|
||||
// it acts on some changes in a ReplicaSet object.
|
||||
// +optional
|
||||
optional k8s.io.api.core.v1.ObjectReference regarding = 8;
|
||||
|
||||
// Optional secondary object for more complex actions. E.g. when regarding object triggers
|
||||
// a creation or deletion of related object.
|
||||
// +optional
|
||||
optional k8s.io.api.core.v1.ObjectReference related = 9;
|
||||
|
||||
// Optional. A human-readable description of the status of this operation.
|
||||
// Maximal length of the note is 1kB, but libraries should be prepared to
|
||||
// handle values up to 64kB.
|
||||
// +optional
|
||||
optional string note = 10;
|
||||
|
||||
// Type of this event (Normal, Warning), new types could be added in the
|
||||
// future.
|
||||
// +optional
|
||||
optional string type = 11;
|
||||
|
||||
// Deprecated field assuring backward compatibility with core.v1 Event type
|
||||
// +optional
|
||||
optional k8s.io.api.core.v1.EventSource deprecatedSource = 12;
|
||||
|
||||
// Deprecated field assuring backward compatibility with core.v1 Event type
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedFirstTimestamp = 13;
|
||||
|
||||
// Deprecated field assuring backward compatibility with core.v1 Event type
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedLastTimestamp = 14;
|
||||
|
||||
// Deprecated field assuring backward compatibility with core.v1 Event type
|
||||
// +optional
|
||||
optional int32 deprecatedCount = 15;
|
||||
}
|
||||
|
||||
// EventList is a list of Event objects.
|
||||
message EventList {
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is a list of schema objects.
|
||||
repeated Event items = 2;
|
||||
}
|
||||
|
||||
// EventSeries contain information on series of events, i.e. thing that was/is happening
|
||||
// continously for some time.
|
||||
message EventSeries {
|
||||
// Number of occurrences in this series up to the last heartbeat time
|
||||
optional int32 count = 1;
|
||||
|
||||
// Time when last Event from the series was seen before last heartbeat.
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2;
|
||||
|
||||
// Information whether this series is ongoing or finished.
|
||||
optional string state = 3;
|
||||
}
|
||||
|
53
staging/src/k8s.io/api/events/v1beta1/register.go
Normal file
53
staging/src/k8s.io/api/events/v1beta1/register.go
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
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 (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
const GroupName = "events.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
|
||||
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
localSchemeBuilder = &SchemeBuilder
|
||||
AddToScheme = localSchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&Event{},
|
||||
&EventList{},
|
||||
)
|
||||
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
122
staging/src/k8s.io/api/events/v1beta1/types.go
Normal file
122
staging/src/k8s.io/api/events/v1beta1/types.go
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
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 (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
||||
type Event struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Required. Time when this Event was first observed.
|
||||
EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
|
||||
|
||||
// Data about the Event series this event represents or nil if it's a singleton Event.
|
||||
// +optional
|
||||
Series *EventSeries `json:"series,omitempty" protobuf:"bytes,3,opt,name=series"`
|
||||
|
||||
// Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||
// +optional
|
||||
ReportingController string `json:"reportingController,omitempty" protobuf:"bytes,4,opt,name=reportingController"`
|
||||
|
||||
// ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||
// +optional
|
||||
ReportingInstance string `json:"reportingInstance,omitemtpy" protobuf:"bytes,5,opt,name=reportingInstance"`
|
||||
|
||||
// What action was taken/failed regarding to the regarding object.
|
||||
// +optional
|
||||
Action string `json:"action,omitemtpy" protobuf:"bytes,6,name=action"`
|
||||
|
||||
// Why the action was taken.
|
||||
Reason string `json:"reason,omitempty" protobuf:"bytes,7,name=reason"`
|
||||
|
||||
// The object this Event is about. In most cases it's an Object reporting controller implements.
|
||||
// E.g. ReplicaSetController implements ReplicaSets and this event is emitted because
|
||||
// it acts on some changes in a ReplicaSet object.
|
||||
// +optional
|
||||
Regarding corev1.ObjectReference `json:"regarding,omitempty" protobuf:"bytes,8,opt,name=regarding"`
|
||||
|
||||
// Optional secondary object for more complex actions. E.g. when regarding object triggers
|
||||
// a creation or deletion of related object.
|
||||
// +optional
|
||||
Related *corev1.ObjectReference `json:"related,omitempty" protobuf:"bytes,9,opt,name=related"`
|
||||
|
||||
// Optional. A human-readable description of the status of this operation.
|
||||
// Maximal length of the note is 1kB, but libraries should be prepared to
|
||||
// handle values up to 64kB.
|
||||
// +optional
|
||||
Note string `json:"note,omitempty" protobuf:"bytes,10,opt,name=note"`
|
||||
|
||||
// Type of this event (Normal, Warning), new types could be added in the
|
||||
// future.
|
||||
// +optional
|
||||
Type string `json:"type,omitempty" protobuf:"bytes,11,opt,name=type"`
|
||||
|
||||
// Deprecated field assuring backward compatibility with core.v1 Event type
|
||||
// +optional
|
||||
DeprecatedSource corev1.EventSource `json:"deprecatedSource,omitempty" protobuf:"bytes,12,opt,name=deprecatedSource"`
|
||||
// Deprecated field assuring backward compatibility with core.v1 Event type
|
||||
// +optional
|
||||
DeprecatedFirstTimestamp metav1.Time `json:"deprecatedFirstTimestamp,omitempty" protobuf:"bytes,13,opt,name=deprecatedFirstTimestamp"`
|
||||
// Deprecated field assuring backward compatibility with core.v1 Event type
|
||||
// +optional
|
||||
DeprecatedLastTimestamp metav1.Time `json:"deprecatedLastTimestamp,omitempty" protobuf:"bytes,14,opt,name=deprecatedLastTimestamp"`
|
||||
// Deprecated field assuring backward compatibility with core.v1 Event type
|
||||
// +optional
|
||||
DeprecatedCount int32 `json:"deprecatedCount,omitempty" protobuf:"varint,15,opt,name=deprecatedCount"`
|
||||
}
|
||||
|
||||
// EventSeries contain information on series of events, i.e. thing that was/is happening
|
||||
// continously for some time.
|
||||
type EventSeries struct {
|
||||
// Number of occurrences in this series up to the last heartbeat time
|
||||
Count int32 `json:"count" protobuf:"varint,1,opt,name=count"`
|
||||
// Time when last Event from the series was seen before last heartbeat.
|
||||
LastObservedTime metav1.MicroTime `json:"lastObservedTime" protobuf:"bytes,2,opt,name=lastObservedTime"`
|
||||
// Information whether this series is ongoing or finished.
|
||||
State EventSeriesState `json:"state" protobuf:"bytes,3,opt,name=state"`
|
||||
}
|
||||
|
||||
type EventSeriesState string
|
||||
|
||||
const (
|
||||
EventSeriesStateOngoing EventSeriesState = "Ongoing"
|
||||
EventSeriesStateFinished EventSeriesState = "Finished"
|
||||
EventSeriesStateUnknown EventSeriesState = "Unknown"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// EventList is a list of Event objects.
|
||||
type EventList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of schema objects.
|
||||
Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
73
staging/src/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go
generated
Normal file
73
staging/src/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE
|
||||
var map_Event = map[string]string{
|
||||
"": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.",
|
||||
"eventTime": "Required. Time when this Event was first observed.",
|
||||
"series": "Data about the Event series this event represents or nil if it's a singleton Event.",
|
||||
"reportingController": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.",
|
||||
"reportingInstance": "ID of the controller instance, e.g. `kubelet-xyzf`.",
|
||||
"action": "What action was taken/failed regarding to the regarding object.",
|
||||
"reason": "Why the action was taken.",
|
||||
"regarding": "The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.",
|
||||
"related": "Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.",
|
||||
"note": "Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.",
|
||||
"type": "Type of this event (Normal, Warning), new types could be added in the future.",
|
||||
"deprecatedSource": "Deprecated field assuring backward compatibility with core.v1 Event type",
|
||||
"deprecatedFirstTimestamp": "Deprecated field assuring backward compatibility with core.v1 Event type",
|
||||
"deprecatedLastTimestamp": "Deprecated field assuring backward compatibility with core.v1 Event type",
|
||||
"deprecatedCount": "Deprecated field assuring backward compatibility with core.v1 Event type",
|
||||
}
|
||||
|
||||
func (Event) SwaggerDoc() map[string]string {
|
||||
return map_Event
|
||||
}
|
||||
|
||||
var map_EventList = map[string]string{
|
||||
"": "EventList is a list of Event objects.",
|
||||
"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"items": "Items is a list of schema objects.",
|
||||
}
|
||||
|
||||
func (EventList) SwaggerDoc() map[string]string {
|
||||
return map_EventList
|
||||
}
|
||||
|
||||
var map_EventSeries = map[string]string{
|
||||
"": "EventSeries contain information on series of events, i.e. thing that was/is happening continously for some time.",
|
||||
"count": "Number of occurrences in this series up to the last heartbeat time",
|
||||
"lastObservedTime": "Time when last Event from the series was seen before last heartbeat.",
|
||||
"state": "Information whether this series is ongoing or finished.",
|
||||
}
|
||||
|
||||
func (EventSeries) SwaggerDoc() map[string]string {
|
||||
return map_EventSeries
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
127
staging/src/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go
generated
Normal file
127
staging/src/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go
generated
Normal file
@@ -0,0 +1,127 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
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 autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Event) DeepCopyInto(out *Event) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.EventTime.DeepCopyInto(&out.EventTime)
|
||||
if in.Series != nil {
|
||||
in, out := &in.Series, &out.Series
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(EventSeries)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
out.Regarding = in.Regarding
|
||||
if in.Related != nil {
|
||||
in, out := &in.Related, &out.Related
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(v1.ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
out.DeprecatedSource = in.DeprecatedSource
|
||||
in.DeprecatedFirstTimestamp.DeepCopyInto(&out.DeprecatedFirstTimestamp)
|
||||
in.DeprecatedLastTimestamp.DeepCopyInto(&out.DeprecatedLastTimestamp)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event.
|
||||
func (in *Event) DeepCopy() *Event {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Event)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Event) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EventList) DeepCopyInto(out *EventList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Event, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList.
|
||||
func (in *EventList) DeepCopy() *EventList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EventList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *EventList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EventSeries) DeepCopyInto(out *EventSeries) {
|
||||
*out = *in
|
||||
in.LastObservedTime.DeepCopyInto(&out.LastObservedTime)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSeries.
|
||||
func (in *EventSeries) DeepCopy() *EventSeries {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EventSeries)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
@@ -582,6 +582,10 @@
|
||||
"ImportPath": "k8s.io/api/core/v1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/extensions/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
@@ -1266,6 +1270,14 @@
|
||||
"ImportPath": "k8s.io/client-go/informers/core/v1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers/events",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers/extensions",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
@@ -1414,6 +1426,10 @@
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
@@ -1506,6 +1522,10 @@
|
||||
"ImportPath": "k8s.io/client-go/listers/core/v1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/listers/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/listers/extensions/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
@@ -38,6 +38,7 @@ func AddConversionFuncs(scheme *runtime.Scheme) error {
|
||||
Convert_intstr_IntOrString_To_intstr_IntOrString,
|
||||
|
||||
Convert_unversioned_Time_To_unversioned_Time,
|
||||
Convert_unversioned_MicroTime_To_unversioned_MicroTime,
|
||||
|
||||
Convert_Pointer_v1_Duration_To_v1_Duration,
|
||||
Convert_v1_Duration_To_Pointer_v1_Duration,
|
||||
@@ -199,6 +200,12 @@ func Convert_v1_Duration_To_Pointer_v1_Duration(in *Duration, out **Duration, s
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_unversioned_MicroTime_To_unversioned_MicroTime(in *MicroTime, out *MicroTime, s conversion.Scope) error {
|
||||
// Cannot deep copy these, because time.Time has unexported fields.
|
||||
*out = *in
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_Slice_string_To_unversioned_Time allows converting a URL query parameter value
|
||||
func Convert_Slice_string_To_unversioned_Time(input *[]string, out *Time, s conversion.Scope) error {
|
||||
str := ""
|
||||
|
24
staging/src/k8s.io/apiserver/Godeps/Godeps.json
generated
24
staging/src/k8s.io/apiserver/Godeps/Godeps.json
generated
@@ -830,6 +830,10 @@
|
||||
"ImportPath": "k8s.io/api/core/v1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/extensions/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
@@ -1186,6 +1190,14 @@
|
||||
"ImportPath": "k8s.io/client-go/informers/core/v1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers/events",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers/extensions",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
@@ -1398,6 +1410,14 @@
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1/fake",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
@@ -1534,6 +1554,10 @@
|
||||
"ImportPath": "k8s.io/client-go/listers/core/v1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/listers/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/listers/extensions/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
4
staging/src/k8s.io/client-go/Godeps/Godeps.json
generated
4
staging/src/k8s.io/client-go/Godeps/Godeps.json
generated
@@ -434,6 +434,10 @@
|
||||
"ImportPath": "k8s.io/api/core/v1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/events/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/extensions/v1beta1",
|
||||
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
@@ -25,6 +25,7 @@ go_library(
|
||||
"//vendor/k8s.io/api/batch/v2alpha1: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/events/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/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/certificates: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/internalinterfaces: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/certificates: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/internalinterfaces:all-srcs",
|
||||
"//staging/src/k8s.io/client-go/informers/networking:all-srcs",
|
||||
|
29
staging/src/k8s.io/client-go/informers/events/BUILD
Normal file
29
staging/src/k8s.io/client-go/informers/events/BUILD
Normal 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"],
|
||||
)
|
46
staging/src/k8s.io/client-go/informers/events/interface.go
Normal file
46
staging/src/k8s.io/client-go/informers/events/interface.go
Normal 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)
|
||||
}
|
35
staging/src/k8s.io/client-go/informers/events/v1beta1/BUILD
Normal file
35
staging/src/k8s.io/client-go/informers/events/v1beta1/BUILD
Normal 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"],
|
||||
)
|
@@ -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())
|
||||
}
|
@@ -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}
|
||||
}
|
@@ -28,6 +28,7 @@ import (
|
||||
batch "k8s.io/client-go/informers/batch"
|
||||
certificates "k8s.io/client-go/informers/certificates"
|
||||
core "k8s.io/client-go/informers/core"
|
||||
events "k8s.io/client-go/informers/events"
|
||||
extensions "k8s.io/client-go/informers/extensions"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
networking "k8s.io/client-go/informers/networking"
|
||||
@@ -140,6 +141,7 @@ type SharedInformerFactory interface {
|
||||
Batch() batch.Interface
|
||||
Certificates() certificates.Interface
|
||||
Core() core.Interface
|
||||
Events() events.Interface
|
||||
Extensions() extensions.Interface
|
||||
Networking() networking.Interface
|
||||
Policy() policy.Interface
|
||||
@@ -173,6 +175,10 @@ func (f *sharedInformerFactory) Core() core.Interface {
|
||||
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 {
|
||||
return extensions.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@ import (
|
||||
v2alpha1 "k8s.io/api/batch/v2alpha1"
|
||||
certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
events_v1beta1 "k8s.io/api/events/v1beta1"
|
||||
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
networking_v1 "k8s.io/api/networking/v1"
|
||||
policy_v1beta1 "k8s.io/api/policy/v1beta1"
|
||||
@@ -173,6 +174,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
case core_v1.SchemeGroupVersion.WithResource("serviceaccounts"):
|
||||
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
|
||||
case extensions_v1beta1.SchemeGroupVersion.WithResource("daemonsets"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().DaemonSets().Informer()}, nil
|
||||
|
@@ -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/certificates/v1beta1: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/networking/v1: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/certificates/v1beta1: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/networking/v1:all-srcs",
|
||||
"//staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1:all-srcs",
|
||||
|
@@ -35,6 +35,7 @@ import (
|
||||
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
||||
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
||||
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"
|
||||
networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
|
||||
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
|
||||
@@ -84,6 +85,9 @@ type Interface interface {
|
||||
CoreV1() corev1.CoreV1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Core() corev1.CoreV1Interface
|
||||
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Events() eventsv1beta1.EventsV1beta1Interface
|
||||
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Extensions() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||
@@ -131,6 +135,7 @@ type Clientset struct {
|
||||
batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client
|
||||
certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
|
||||
coreV1 *corev1.CoreV1Client
|
||||
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
|
||||
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
||||
networkingV1 *networkingv1.NetworkingV1Client
|
||||
policyV1beta1 *policyv1beta1.PolicyV1beta1Client
|
||||
@@ -272,6 +277,17 @@ func (c *Clientset) Core() corev1.CoreV1Interface {
|
||||
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
|
||||
func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
|
||||
return c.extensionsV1beta1
|
||||
@@ -449,6 +465,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.extensionsV1beta1, err = extensionsv1beta1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -522,6 +542,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
|
||||
cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
|
||||
cs.coreV1 = corev1.NewForConfigOrDie(c)
|
||||
cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c)
|
||||
cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
|
||||
cs.networkingV1 = networkingv1.NewForConfigOrDie(c)
|
||||
cs.policyV1beta1 = policyv1beta1.NewForConfigOrDie(c)
|
||||
@@ -557,6 +578,7 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.batchV2alpha1 = batchv2alpha1.New(c)
|
||||
cs.certificatesV1beta1 = certificatesv1beta1.New(c)
|
||||
cs.coreV1 = corev1.New(c)
|
||||
cs.eventsV1beta1 = eventsv1beta1.New(c)
|
||||
cs.extensionsV1beta1 = extensionsv1beta1.New(c)
|
||||
cs.networkingV1 = networkingv1.New(c)
|
||||
cs.policyV1beta1 = policyv1beta1.New(c)
|
||||
|
@@ -30,6 +30,7 @@ go_library(
|
||||
"//vendor/k8s.io/api/batch/v2alpha1: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/events/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/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/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/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/fake:go_default_library",
|
||||
"//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library",
|
||||
|
@@ -54,6 +54,8 @@ import (
|
||||
fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake"
|
||||
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||
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"
|
||||
fakeextensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake"
|
||||
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}
|
||||
}
|
||||
|
||||
// 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
|
||||
func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
|
||||
return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
|
||||
|
@@ -33,6 +33,7 @@ import (
|
||||
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
|
||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
networkingv1 "k8s.io/api/networking/v1"
|
||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
@@ -90,6 +91,7 @@ func AddToScheme(scheme *runtime.Scheme) {
|
||||
batchv2alpha1.AddToScheme(scheme)
|
||||
certificatesv1beta1.AddToScheme(scheme)
|
||||
corev1.AddToScheme(scheme)
|
||||
eventsv1beta1.AddToScheme(scheme)
|
||||
extensionsv1beta1.AddToScheme(scheme)
|
||||
networkingv1.AddToScheme(scheme)
|
||||
policyv1beta1.AddToScheme(scheme)
|
||||
|
@@ -29,6 +29,7 @@ go_library(
|
||||
"//vendor/k8s.io/api/batch/v2alpha1: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/events/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/policy/v1beta1:go_default_library",
|
||||
|
@@ -33,6 +33,7 @@ import (
|
||||
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
|
||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
networkingv1 "k8s.io/api/networking/v1"
|
||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
@@ -90,6 +91,7 @@ func AddToScheme(scheme *runtime.Scheme) {
|
||||
batchv2alpha1.AddToScheme(scheme)
|
||||
certificatesv1beta1.AddToScheme(scheme)
|
||||
corev1.AddToScheme(scheme)
|
||||
eventsv1beta1.AddToScheme(scheme)
|
||||
extensionsv1beta1.AddToScheme(scheme)
|
||||
networkingv1.AddToScheme(scheme)
|
||||
policyv1beta1.AddToScheme(scheme)
|
||||
|
@@ -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"],
|
||||
)
|
@@ -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
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user