blob: cc9099a6570c4ac9829d07b8f667b80617d9d25e [file] [log] [blame]
Zack Williamse940c7a2019-08-21 14:25:39 -07001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17
18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20syntax = 'proto2';
21
22package k8s.io.apimachinery.pkg.apis.meta.v1;
23
24import "k8s.io/apimachinery/pkg/runtime/generated.proto";
25import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
26
27// Package-wide variables from generator "generated".
28option go_package = "v1";
29
30// APIGroup contains the name, the supported versions, and the preferred version
31// of a group.
32message APIGroup {
33 // name is the name of the group.
34 optional string name = 1;
35
36 // versions are the versions supported in this group.
37 repeated GroupVersionForDiscovery versions = 2;
38
39 // preferredVersion is the version preferred by the API server, which
40 // probably is the storage version.
41 // +optional
42 optional GroupVersionForDiscovery preferredVersion = 3;
43
44 // a map of client CIDR to server address that is serving this group.
45 // This is to help clients reach servers in the most network-efficient way possible.
46 // Clients can use the appropriate server address as per the CIDR that they match.
47 // In case of multiple matches, clients should use the longest matching CIDR.
48 // The server returns only those CIDRs that it thinks that the client can match.
49 // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP.
50 // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
51 // +optional
52 repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4;
53}
54
55// APIGroupList is a list of APIGroup, to allow clients to discover the API at
56// /apis.
57message APIGroupList {
58 // groups is a list of APIGroup.
59 repeated APIGroup groups = 1;
60}
61
62// APIResource specifies the name of a resource and whether it is namespaced.
63message APIResource {
64 // name is the plural name of the resource.
65 optional string name = 1;
66
67 // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely.
68 // The singularName is more correct for reporting status on a single item and both singular and plural are allowed
69 // from the kubectl CLI interface.
70 optional string singularName = 6;
71
72 // namespaced indicates if a resource is namespaced or not.
73 optional bool namespaced = 2;
74
75 // group is the preferred group of the resource. Empty implies the group of the containing resource list.
76 // For subresources, this may have a different value, for example: Scale".
77 optional string group = 8;
78
79 // version is the preferred version of the resource. Empty implies the version of the containing resource list
80 // For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)".
81 optional string version = 9;
82
83 // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')
84 optional string kind = 3;
85
86 // verbs is a list of supported kube verbs (this includes get, list, watch, create,
87 // update, patch, delete, deletecollection, and proxy)
88 optional Verbs verbs = 4;
89
90 // shortNames is a list of suggested short names of the resource.
91 repeated string shortNames = 5;
92
93 // categories is a list of the grouped resources this resource belongs to (e.g. 'all')
94 repeated string categories = 7;
David Bainbridge86971522019-09-26 22:09:39 +000095
96 // The hash value of the storage version, the version this resource is
97 // converted to when written to the data store. Value must be treated
98 // as opaque by clients. Only equality comparison on the value is valid.
99 // This is an alpha feature and may change or be removed in the future.
100 // The field is populated by the apiserver only if the
101 // StorageVersionHash feature gate is enabled.
102 // This field will remain optional even if it graduates.
103 // +optional
104 optional string storageVersionHash = 10;
Zack Williamse940c7a2019-08-21 14:25:39 -0700105}
106
107// APIResourceList is a list of APIResource, it is used to expose the name of the
108// resources supported in a specific group and version, and if the resource
109// is namespaced.
110message APIResourceList {
111 // groupVersion is the group and version this APIResourceList is for.
112 optional string groupVersion = 1;
113
114 // resources contains the name of the resources and if they are namespaced.
115 repeated APIResource resources = 2;
116}
117
118// APIVersions lists the versions that are available, to allow clients to
119// discover the API at /api, which is the root path of the legacy v1 API.
David Bainbridge86971522019-09-26 22:09:39 +0000120//
Zack Williamse940c7a2019-08-21 14:25:39 -0700121// +protobuf.options.(gogoproto.goproto_stringer)=false
122// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
123message APIVersions {
124 // versions are the api versions that are available.
125 repeated string versions = 1;
126
127 // a map of client CIDR to server address that is serving this group.
128 // This is to help clients reach servers in the most network-efficient way possible.
129 // Clients can use the appropriate server address as per the CIDR that they match.
130 // In case of multiple matches, clients should use the longest matching CIDR.
131 // The server returns only those CIDRs that it thinks that the client can match.
132 // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP.
133 // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
134 repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2;
135}
136
137// CreateOptions may be provided when creating an API object.
138message CreateOptions {
139 // When present, indicates that modifications should not be
140 // persisted. An invalid or unrecognized dryRun directive will
141 // result in an error response and no further processing of the
142 // request. Valid values are:
143 // - All: all dry run stages will be processed
144 // +optional
145 repeated string dryRun = 1;
146
David Bainbridge86971522019-09-26 22:09:39 +0000147 // fieldManager is a name associated with the actor or entity
148 // that is making these changes. The value must be less than or
149 // 128 characters long, and only contain printable characters,
150 // as defined by https://golang.org/pkg/unicode/#IsPrint.
151 // +optional
152 optional string fieldManager = 3;
Zack Williamse940c7a2019-08-21 14:25:39 -0700153}
154
155// DeleteOptions may be provided when deleting an API object.
156message DeleteOptions {
157 // The duration in seconds before the object should be deleted. Value must be non-negative integer.
158 // The value zero indicates delete immediately. If this value is nil, the default grace period for the
159 // specified type will be used.
160 // Defaults to a per object value if not specified. zero means delete immediately.
161 // +optional
162 optional int64 gracePeriodSeconds = 1;
163
164 // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
165 // returned.
166 // +optional
167 optional Preconditions preconditions = 2;
168
169 // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
170 // Should the dependent objects be orphaned. If true/false, the "orphan"
171 // finalizer will be added to/removed from the object's finalizers list.
172 // Either this field or PropagationPolicy may be set, but not both.
173 // +optional
174 optional bool orphanDependents = 3;
175
176 // Whether and how garbage collection will be performed.
177 // Either this field or OrphanDependents may be set, but not both.
178 // The default policy is decided by the existing finalizer set in the
179 // metadata.finalizers and the resource-specific default policy.
180 // Acceptable values are: 'Orphan' - orphan the dependents; 'Background' -
181 // allow the garbage collector to delete the dependents in the background;
182 // 'Foreground' - a cascading policy that deletes all dependents in the
183 // foreground.
184 // +optional
185 optional string propagationPolicy = 4;
186
187 // When present, indicates that modifications should not be
188 // persisted. An invalid or unrecognized dryRun directive will
189 // result in an error response and no further processing of the
190 // request. Valid values are:
191 // - All: all dry run stages will be processed
192 // +optional
193 repeated string dryRun = 5;
194}
195
196// Duration is a wrapper around time.Duration which supports correct
197// marshaling to YAML and JSON. In particular, it marshals into strings, which
198// can be used as map keys in json.
199message Duration {
200 optional int64 duration = 1;
201}
202
203// ExportOptions is the query options to the standard REST get call.
David Bainbridge86971522019-09-26 22:09:39 +0000204// Deprecated. Planned for removal in 1.18.
Zack Williamse940c7a2019-08-21 14:25:39 -0700205message ExportOptions {
206 // Should this value be exported. Export strips fields that a user can not specify.
David Bainbridge86971522019-09-26 22:09:39 +0000207 // Deprecated. Planned for removal in 1.18.
Zack Williamse940c7a2019-08-21 14:25:39 -0700208 optional bool export = 1;
209
210 // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
David Bainbridge86971522019-09-26 22:09:39 +0000211 // Deprecated. Planned for removal in 1.18.
Zack Williamse940c7a2019-08-21 14:25:39 -0700212 optional bool exact = 2;
213}
214
David Bainbridge86971522019-09-26 22:09:39 +0000215// Fields stores a set of fields in a data structure like a Trie.
216// To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff
217message Fields {
218 // Map stores a set of fields in a data structure like a Trie.
219 //
220 // Each key is either a '.' representing the field itself, and will always map to an empty set,
221 // or a string representing a sub-field or item. The string will follow one of these four formats:
222 // 'f:<name>', where <name> is the name of a field in a struct, or key in a map
223 // 'v:<value>', where <value> is the exact json formatted value of a list item
224 // 'i:<index>', where <index> is position of a item in a list
225 // 'k:<keys>', where <keys> is a map of a list item's key fields to their unique values
226 // If a key maps to an empty Fields value, the field that key represents is part of the set.
227 //
228 // The exact format is defined in k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal
229 map<string, Fields> map = 1;
230}
231
Zack Williamse940c7a2019-08-21 14:25:39 -0700232// GetOptions is the standard query options to the standard REST get call.
233message GetOptions {
234 // When specified:
235 // - if unset, then the result is returned from remote storage based on quorum-read flag;
236 // - if it's 0, then we simply return what we currently have in cache, no guarantee;
237 // - if set to non zero, then the result is at least as fresh as given rv.
238 optional string resourceVersion = 1;
Zack Williamse940c7a2019-08-21 14:25:39 -0700239}
240
241// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
242// concepts during lookup stages without having partially valid types
David Bainbridge86971522019-09-26 22:09:39 +0000243//
Zack Williamse940c7a2019-08-21 14:25:39 -0700244// +protobuf.options.(gogoproto.goproto_stringer)=false
245message GroupKind {
246 optional string group = 1;
247
248 optional string kind = 2;
249}
250
251// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying
252// concepts during lookup stages without having partially valid types
David Bainbridge86971522019-09-26 22:09:39 +0000253//
Zack Williamse940c7a2019-08-21 14:25:39 -0700254// +protobuf.options.(gogoproto.goproto_stringer)=false
255message GroupResource {
256 optional string group = 1;
257
258 optional string resource = 2;
259}
260
261// GroupVersion contains the "group" and the "version", which uniquely identifies the API.
David Bainbridge86971522019-09-26 22:09:39 +0000262//
Zack Williamse940c7a2019-08-21 14:25:39 -0700263// +protobuf.options.(gogoproto.goproto_stringer)=false
264message GroupVersion {
265 optional string group = 1;
266
267 optional string version = 2;
268}
269
270// GroupVersion contains the "group/version" and "version" string of a version.
271// It is made a struct to keep extensibility.
272message GroupVersionForDiscovery {
273 // groupVersion specifies the API group and version in the form "group/version"
274 optional string groupVersion = 1;
275
276 // version specifies the version in the form of "version". This is to save
277 // the clients the trouble of splitting the GroupVersion.
278 optional string version = 2;
279}
280
281// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion
282// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling
David Bainbridge86971522019-09-26 22:09:39 +0000283//
Zack Williamse940c7a2019-08-21 14:25:39 -0700284// +protobuf.options.(gogoproto.goproto_stringer)=false
285message GroupVersionKind {
286 optional string group = 1;
287
288 optional string version = 2;
289
290 optional string kind = 3;
291}
292
293// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion
294// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling
David Bainbridge86971522019-09-26 22:09:39 +0000295//
Zack Williamse940c7a2019-08-21 14:25:39 -0700296// +protobuf.options.(gogoproto.goproto_stringer)=false
297message GroupVersionResource {
298 optional string group = 1;
299
300 optional string version = 2;
301
302 optional string resource = 3;
303}
304
305// Initializer is information about an initializer that has not yet completed.
306message Initializer {
307 // name of the process that is responsible for initializing this object.
308 optional string name = 1;
309}
310
311// Initializers tracks the progress of initialization.
312message Initializers {
313 // Pending is a list of initializers that must execute in order before this object is visible.
314 // When the last pending initializer is removed, and no failing result is set, the initializers
315 // struct will be set to nil and the object is considered as initialized and visible to all
316 // clients.
317 // +patchMergeKey=name
318 // +patchStrategy=merge
319 repeated Initializer pending = 1;
320
321 // If result is set with the Failure field, the object will be persisted to storage and then deleted,
322 // ensuring that other clients can observe the deletion.
323 optional Status result = 2;
324}
325
326// A label selector is a label query over a set of resources. The result of matchLabels and
327// matchExpressions are ANDed. An empty label selector matches all objects. A null
328// label selector matches no objects.
329message LabelSelector {
330 // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
331 // map is equivalent to an element of matchExpressions, whose key field is "key", the
332 // operator is "In", and the values array contains only "value". The requirements are ANDed.
333 // +optional
334 map<string, string> matchLabels = 1;
335
336 // matchExpressions is a list of label selector requirements. The requirements are ANDed.
337 // +optional
338 repeated LabelSelectorRequirement matchExpressions = 2;
339}
340
341// A label selector requirement is a selector that contains values, a key, and an operator that
342// relates the key and values.
343message LabelSelectorRequirement {
344 // key is the label key that the selector applies to.
345 // +patchMergeKey=key
346 // +patchStrategy=merge
347 optional string key = 1;
348
349 // operator represents a key's relationship to a set of values.
350 // Valid operators are In, NotIn, Exists and DoesNotExist.
351 optional string operator = 2;
352
353 // values is an array of string values. If the operator is In or NotIn,
354 // the values array must be non-empty. If the operator is Exists or DoesNotExist,
355 // the values array must be empty. This array is replaced during a strategic
356 // merge patch.
357 // +optional
358 repeated string values = 3;
359}
360
361// List holds a list of objects, which may not be known by the server.
362message List {
363 // Standard list metadata.
364 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
365 // +optional
366 optional ListMeta metadata = 1;
367
368 // List of objects
369 repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2;
370}
371
372// ListMeta describes metadata that synthetic resources must have, including lists and
373// various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
374message ListMeta {
375 // selfLink is a URL representing this object.
376 // Populated by the system.
377 // Read-only.
378 // +optional
379 optional string selfLink = 1;
380
381 // String that identifies the server's internal version of this object that
382 // can be used by clients to determine when objects have changed.
383 // Value must be treated as opaque by clients and passed unmodified back to the server.
384 // Populated by the system.
385 // Read-only.
386 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
387 // +optional
388 optional string resourceVersion = 2;
389
390 // continue may be set if the user set a limit on the number of items returned, and indicates that
391 // the server has more data available. The value is opaque and may be used to issue another request
392 // to the endpoint that served this list to retrieve the next set of available objects. Continuing a
393 // consistent list may not be possible if the server configuration has changed or more than a few
394 // minutes have passed. The resourceVersion field returned when using this continue value will be
395 // identical to the value in the first response, unless you have received this token from an error
396 // message.
397 optional string continue = 3;
David Bainbridge86971522019-09-26 22:09:39 +0000398
399 // remainingItemCount is the number of subsequent items in the list which are not included in this
400 // list response. If the list request contained label or field selectors, then the number of
401 // remaining items is unknown and the field will be left unset and omitted during serialization.
402 // If the list is complete (either because it is not chunking or because this is the last chunk),
403 // then there are no more remaining items and this field will be left unset and omitted during
404 // serialization.
405 // Servers older than v1.15 do not set this field.
406 // The intended use of the remainingItemCount is *estimating* the size of a collection. Clients
407 // should not rely on the remainingItemCount to be set or to be exact.
408 //
409 // This field is alpha and can be changed or removed without notice.
410 //
411 // +optional
412 optional int64 remainingItemCount = 4;
Zack Williamse940c7a2019-08-21 14:25:39 -0700413}
414
415// ListOptions is the query options to a standard REST list call.
416message ListOptions {
417 // A selector to restrict the list of returned objects by their labels.
418 // Defaults to everything.
419 // +optional
420 optional string labelSelector = 1;
421
422 // A selector to restrict the list of returned objects by their fields.
423 // Defaults to everything.
424 // +optional
425 optional string fieldSelector = 2;
426
Zack Williamse940c7a2019-08-21 14:25:39 -0700427 // Watch for changes to the described resources and return them as a stream of
428 // add, update, and remove notifications. Specify resourceVersion.
429 // +optional
430 optional bool watch = 3;
431
David Bainbridge86971522019-09-26 22:09:39 +0000432 // allowWatchBookmarks requests watch events with type "BOOKMARK".
433 // Servers that do not implement bookmarks may ignore this flag and
434 // bookmarks are sent at the server's discretion. Clients should not
435 // assume bookmarks are returned at any specific interval, nor may they
436 // assume the server will send any BOOKMARK event during a session.
437 // If this is not a watch, this field is ignored.
438 // If the feature gate WatchBookmarks is not enabled in apiserver,
439 // this field is ignored.
440 //
441 // This field is alpha and can be changed or removed without notice.
442 //
443 // +optional
444 optional bool allowWatchBookmarks = 9;
445
Zack Williamse940c7a2019-08-21 14:25:39 -0700446 // When specified with a watch call, shows changes that occur after that particular version of a resource.
447 // Defaults to changes from the beginning of history.
448 // When specified for list:
449 // - if unset, then the result is returned from remote storage based on quorum-read flag;
450 // - if it's 0, then we simply return what we currently have in cache, no guarantee;
451 // - if set to non zero, then the result is at least as fresh as given rv.
452 // +optional
453 optional string resourceVersion = 4;
454
455 // Timeout for the list/watch call.
456 // This limits the duration of the call, regardless of any activity or inactivity.
457 // +optional
458 optional int64 timeoutSeconds = 5;
459
460 // limit is a maximum number of responses to return for a list call. If more items exist, the
461 // server will set the `continue` field on the list metadata to a value that can be used with the
462 // same initial query to retrieve the next set of results. Setting a limit may return fewer than
463 // the requested amount of items (up to zero items) in the event all requested objects are
464 // filtered out and clients should only use the presence of the continue field to determine whether
465 // more results are available. Servers may choose not to support the limit argument and will return
466 // all of the available results. If limit is specified and the continue field is empty, clients may
467 // assume that no more results are available. This field is not supported if watch is true.
David Bainbridge86971522019-09-26 22:09:39 +0000468 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700469 // The server guarantees that the objects returned when using continue will be identical to issuing
470 // a single list call without a limit - that is, no objects created, modified, or deleted after the
471 // first request is issued will be included in any subsequent continued requests. This is sometimes
472 // referred to as a consistent snapshot, and ensures that a client that is using limit to receive
473 // smaller chunks of a very large result can ensure they see all possible objects. If objects are
474 // updated during a chunked list the version of the object that was present at the time the first list
475 // result was calculated is returned.
476 optional int64 limit = 7;
477
478 // The continue option should be set when retrieving more results from the server. Since this value is
479 // server defined, clients may only use the continue value from a previous query result with identical
480 // query parameters (except for the value of continue) and the server may reject a continue value it
481 // does not recognize. If the specified continue value is no longer valid whether due to expiration
482 // (generally five to fifteen minutes) or a configuration change on the server, the server will
483 // respond with a 410 ResourceExpired error together with a continue token. If the client needs a
484 // consistent list, it must restart their list without the continue field. Otherwise, the client may
485 // send another list request with the token received with the 410 error, the server will respond with
486 // a list starting from the next key, but from the latest snapshot, which is inconsistent from the
487 // previous list results - objects that are created, modified, or deleted after the first list request
488 // will be included in the response, as long as their keys are after the "next key".
David Bainbridge86971522019-09-26 22:09:39 +0000489 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700490 // This field is not supported when watch is true. Clients may start a watch from the last
491 // resourceVersion value returned by the server and not miss any modifications.
492 optional string continue = 8;
493}
494
David Bainbridge86971522019-09-26 22:09:39 +0000495// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource
496// that the fieldset applies to.
497message ManagedFieldsEntry {
498 // Manager is an identifier of the workflow managing these fields.
499 optional string manager = 1;
500
501 // Operation is the type of operation which lead to this ManagedFieldsEntry being created.
502 // The only valid values for this field are 'Apply' and 'Update'.
503 optional string operation = 2;
504
505 // APIVersion defines the version of this resource that this field set
506 // applies to. The format is "group/version" just like the top-level
507 // APIVersion field. It is necessary to track the version of a field
508 // set because it cannot be automatically converted.
509 optional string apiVersion = 3;
510
511 // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'
512 // +optional
513 optional Time time = 4;
514
515 // Fields identifies a set of fields.
516 // +optional
517 optional Fields fields = 5;
518}
519
Zack Williamse940c7a2019-08-21 14:25:39 -0700520// MicroTime is version of Time with microsecond level precision.
David Bainbridge86971522019-09-26 22:09:39 +0000521//
Zack Williamse940c7a2019-08-21 14:25:39 -0700522// +protobuf.options.marshal=false
523// +protobuf.as=Timestamp
524// +protobuf.options.(gogoproto.goproto_stringer)=false
525message MicroTime {
526 // Represents seconds of UTC time since Unix epoch
527 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
528 // 9999-12-31T23:59:59Z inclusive.
529 optional int64 seconds = 1;
530
531 // Non-negative fractions of a second at nanosecond resolution. Negative
532 // second values with fractions must still have non-negative nanos values
533 // that count forward in time. Must be from 0 to 999,999,999
534 // inclusive. This field may be limited in precision depending on context.
535 optional int32 nanos = 2;
536}
537
538// ObjectMeta is metadata that all persisted resources must have, which includes all objects
539// users must create.
540message ObjectMeta {
541 // Name must be unique within a namespace. Is required when creating resources, although
542 // some resources may allow a client to request the generation of an appropriate name
543 // automatically. Name is primarily intended for creation idempotence and configuration
544 // definition.
545 // Cannot be updated.
546 // More info: http://kubernetes.io/docs/user-guide/identifiers#names
547 // +optional
548 optional string name = 1;
549
550 // GenerateName is an optional prefix, used by the server, to generate a unique
551 // name ONLY IF the Name field has not been provided.
552 // If this field is used, the name returned to the client will be different
553 // than the name passed. This value will also be combined with a unique suffix.
554 // The provided value has the same validation rules as the Name field,
555 // and may be truncated by the length of the suffix required to make the value
556 // unique on the server.
David Bainbridge86971522019-09-26 22:09:39 +0000557 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700558 // If this field is specified and the generated name exists, the server will
559 // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
560 // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
561 // should retry (optionally after the time indicated in the Retry-After header).
David Bainbridge86971522019-09-26 22:09:39 +0000562 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700563 // Applied only if Name is not specified.
564 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
565 // +optional
566 optional string generateName = 2;
567
568 // Namespace defines the space within each name must be unique. An empty namespace is
569 // equivalent to the "default" namespace, but "default" is the canonical representation.
570 // Not all objects are required to be scoped to a namespace - the value of this field for
571 // those objects will be empty.
David Bainbridge86971522019-09-26 22:09:39 +0000572 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700573 // Must be a DNS_LABEL.
574 // Cannot be updated.
575 // More info: http://kubernetes.io/docs/user-guide/namespaces
576 // +optional
577 optional string namespace = 3;
578
579 // SelfLink is a URL representing this object.
580 // Populated by the system.
581 // Read-only.
582 // +optional
583 optional string selfLink = 4;
584
585 // UID is the unique in time and space value for this object. It is typically generated by
586 // the server on successful creation of a resource and is not allowed to change on PUT
587 // operations.
David Bainbridge86971522019-09-26 22:09:39 +0000588 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700589 // Populated by the system.
590 // Read-only.
591 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
592 // +optional
593 optional string uid = 5;
594
595 // An opaque value that represents the internal version of this object that can
596 // be used by clients to determine when objects have changed. May be used for optimistic
597 // concurrency, change detection, and the watch operation on a resource or set of resources.
598 // Clients must treat these values as opaque and passed unmodified back to the server.
599 // They may only be valid for a particular resource or set of resources.
David Bainbridge86971522019-09-26 22:09:39 +0000600 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700601 // Populated by the system.
602 // Read-only.
603 // Value must be treated as opaque by clients and .
604 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
605 // +optional
606 optional string resourceVersion = 6;
607
608 // A sequence number representing a specific generation of the desired state.
609 // Populated by the system. Read-only.
610 // +optional
611 optional int64 generation = 7;
612
613 // CreationTimestamp is a timestamp representing the server time when this object was
614 // created. It is not guaranteed to be set in happens-before order across separate operations.
615 // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
David Bainbridge86971522019-09-26 22:09:39 +0000616 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700617 // Populated by the system.
618 // Read-only.
619 // Null for lists.
620 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
621 // +optional
622 optional Time creationTimestamp = 8;
623
624 // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
625 // field is set by the server when a graceful deletion is requested by the user, and is not
626 // directly settable by a client. The resource is expected to be deleted (no longer visible
627 // from resource lists, and not reachable by name) after the time in this field, once the
628 // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked.
629 // Once the deletionTimestamp is set, this value may not be unset or be set further into the
630 // future, although it may be shortened or the resource may be deleted prior to this time.
631 // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react
632 // by sending a graceful termination signal to the containers in the pod. After that 30 seconds,
633 // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,
634 // remove the pod from the API. In the presence of network partitions, this object may still
635 // exist after this timestamp, until an administrator or automated process can determine the
636 // resource is fully terminated.
637 // If not set, graceful deletion of the object has not been requested.
David Bainbridge86971522019-09-26 22:09:39 +0000638 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700639 // Populated by the system when a graceful deletion is requested.
640 // Read-only.
641 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
642 // +optional
643 optional Time deletionTimestamp = 9;
644
645 // Number of seconds allowed for this object to gracefully terminate before
646 // it will be removed from the system. Only set when deletionTimestamp is also set.
647 // May only be shortened.
648 // Read-only.
649 // +optional
650 optional int64 deletionGracePeriodSeconds = 10;
651
652 // Map of string keys and values that can be used to organize and categorize
653 // (scope and select) objects. May match selectors of replication controllers
654 // and services.
655 // More info: http://kubernetes.io/docs/user-guide/labels
656 // +optional
657 map<string, string> labels = 11;
658
659 // Annotations is an unstructured key value map stored with a resource that may be
660 // set by external tools to store and retrieve arbitrary metadata. They are not
661 // queryable and should be preserved when modifying objects.
662 // More info: http://kubernetes.io/docs/user-guide/annotations
663 // +optional
664 map<string, string> annotations = 12;
665
666 // List of objects depended by this object. If ALL objects in the list have
667 // been deleted, this object will be garbage collected. If this object is managed by a controller,
668 // then an entry in this list will point to this controller, with the controller field set to true.
669 // There cannot be more than one managing controller.
670 // +optional
671 // +patchMergeKey=uid
672 // +patchStrategy=merge
673 repeated OwnerReference ownerReferences = 13;
674
675 // An initializer is a controller which enforces some system invariant at object creation time.
676 // This field is a list of initializers that have not yet acted on this object. If nil or empty,
677 // this object has been completely initialized. Otherwise, the object is considered uninitialized
678 // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
679 // observe uninitialized objects.
David Bainbridge86971522019-09-26 22:09:39 +0000680 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700681 // When an object is created, the system will populate this list with the current set of initializers.
682 // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
683 // by any user.
David Bainbridge86971522019-09-26 22:09:39 +0000684 //
685 // DEPRECATED - initializers are an alpha field and will be removed in v1.15.
Zack Williamse940c7a2019-08-21 14:25:39 -0700686 optional Initializers initializers = 16;
687
688 // Must be empty before the object is deleted from the registry. Each entry
689 // is an identifier for the responsible component that will remove the entry
690 // from the list. If the deletionTimestamp of the object is non-nil, entries
691 // in this list can only be removed.
692 // +optional
693 // +patchStrategy=merge
694 repeated string finalizers = 14;
695
696 // The name of the cluster which the object belongs to.
697 // This is used to distinguish resources with same name and namespace in different clusters.
698 // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
699 // +optional
700 optional string clusterName = 15;
David Bainbridge86971522019-09-26 22:09:39 +0000701
702 // ManagedFields maps workflow-id and version to the set of fields
703 // that are managed by that workflow. This is mostly for internal
704 // housekeeping, and users typically shouldn't need to set or
705 // understand this field. A workflow can be the user's name, a
706 // controller's name, or the name of a specific apply path like
707 // "ci-cd". The set of fields is always in the version that the
708 // workflow used when modifying the object.
709 //
710 // This field is alpha and can be changed or removed without notice.
711 //
712 // +optional
713 repeated ManagedFieldsEntry managedFields = 17;
Zack Williamse940c7a2019-08-21 14:25:39 -0700714}
715
716// OwnerReference contains enough information to let you identify an owning
David Bainbridge86971522019-09-26 22:09:39 +0000717// object. An owning object must be in the same namespace as the dependent, or
718// be cluster-scoped, so there is no namespace field.
Zack Williamse940c7a2019-08-21 14:25:39 -0700719message OwnerReference {
720 // API version of the referent.
721 optional string apiVersion = 5;
722
723 // Kind of the referent.
724 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
725 optional string kind = 1;
726
727 // Name of the referent.
728 // More info: http://kubernetes.io/docs/user-guide/identifiers#names
729 optional string name = 3;
730
731 // UID of the referent.
732 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
733 optional string uid = 4;
734
735 // If true, this reference points to the managing controller.
736 // +optional
737 optional bool controller = 6;
738
739 // If true, AND if the owner has the "foregroundDeletion" finalizer, then
740 // the owner cannot be deleted from the key-value store until this
741 // reference is removed.
742 // Defaults to false.
743 // To set this field, a user needs "delete" permission of the owner,
744 // otherwise 422 (Unprocessable Entity) will be returned.
745 // +optional
746 optional bool blockOwnerDeletion = 7;
747}
748
David Bainbridge86971522019-09-26 22:09:39 +0000749// PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients
750// to get access to a particular ObjectMeta schema without knowing the details of the version.
751// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
752message PartialObjectMetadata {
753 // Standard object's metadata.
754 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
755 // +optional
756 optional ObjectMeta metadata = 1;
757}
758
759// PartialObjectMetadataList contains a list of objects containing only their metadata
760// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
761message PartialObjectMetadataList {
762 // Standard list metadata.
763 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
764 // +optional
765 optional ListMeta metadata = 1;
766
767 // items contains each of the included items.
768 repeated PartialObjectMetadata items = 2;
769}
770
Zack Williamse940c7a2019-08-21 14:25:39 -0700771// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
772message Patch {
773}
774
David Bainbridge86971522019-09-26 22:09:39 +0000775// PatchOptions may be provided when patching an API object.
776// PatchOptions is meant to be a superset of UpdateOptions.
777message PatchOptions {
778 // When present, indicates that modifications should not be
779 // persisted. An invalid or unrecognized dryRun directive will
780 // result in an error response and no further processing of the
781 // request. Valid values are:
782 // - All: all dry run stages will be processed
783 // +optional
784 repeated string dryRun = 1;
785
786 // Force is going to "force" Apply requests. It means user will
787 // re-acquire conflicting fields owned by other people. Force
788 // flag must be unset for non-apply patch requests.
789 // +optional
790 optional bool force = 2;
791
792 // fieldManager is a name associated with the actor or entity
793 // that is making these changes. The value must be less than or
794 // 128 characters long, and only contain printable characters,
795 // as defined by https://golang.org/pkg/unicode/#IsPrint. This
796 // field is required for apply requests
797 // (application/apply-patch) but optional for non-apply patch
798 // types (JsonPatch, MergePatch, StrategicMergePatch).
799 // +optional
800 optional string fieldManager = 3;
801}
802
Zack Williamse940c7a2019-08-21 14:25:39 -0700803// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
804message Preconditions {
805 // Specifies the target UID.
806 // +optional
807 optional string uid = 1;
David Bainbridge86971522019-09-26 22:09:39 +0000808
809 // Specifies the target ResourceVersion
810 // +optional
811 optional string resourceVersion = 2;
Zack Williamse940c7a2019-08-21 14:25:39 -0700812}
813
814// RootPaths lists the paths available at root.
815// For example: "/healthz", "/apis".
816message RootPaths {
817 // paths are the paths available at root.
818 repeated string paths = 1;
819}
820
821// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
822message ServerAddressByClientCIDR {
823 // The CIDR with which clients can match their IP to figure out the server address that they should use.
824 optional string clientCIDR = 1;
825
826 // Address of this server, suitable for a client that matches the above CIDR.
827 // This can be a hostname, hostname:port, IP or IP:port.
828 optional string serverAddress = 2;
829}
830
831// Status is a return value for calls that don't return other objects.
832message Status {
833 // Standard list metadata.
834 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
835 // +optional
836 optional ListMeta metadata = 1;
837
838 // Status of the operation.
839 // One of: "Success" or "Failure".
840 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
841 // +optional
842 optional string status = 2;
843
844 // A human-readable description of the status of this operation.
845 // +optional
846 optional string message = 3;
847
848 // A machine-readable description of why this operation is in the
849 // "Failure" status. If this value is empty there
850 // is no information available. A Reason clarifies an HTTP status
851 // code but does not override it.
852 // +optional
853 optional string reason = 4;
854
855 // Extended data associated with the reason. Each reason may define its
856 // own extended details. This field is optional and the data returned
857 // is not guaranteed to conform to any schema except that defined by
858 // the reason type.
859 // +optional
860 optional StatusDetails details = 5;
861
862 // Suggested HTTP return code for this status, 0 if not set.
863 // +optional
864 optional int32 code = 6;
865}
866
867// StatusCause provides more information about an api.Status failure, including
868// cases when multiple errors are encountered.
869message StatusCause {
870 // A machine-readable description of the cause of the error. If this value is
871 // empty there is no information available.
872 // +optional
873 optional string reason = 1;
874
875 // A human-readable description of the cause of the error. This field may be
876 // presented as-is to a reader.
877 // +optional
878 optional string message = 2;
879
880 // The field of the resource that has caused this error, as named by its JSON
881 // serialization. May include dot and postfix notation for nested attributes.
882 // Arrays are zero-indexed. Fields may appear more than once in an array of
883 // causes due to fields having multiple errors.
884 // Optional.
David Bainbridge86971522019-09-26 22:09:39 +0000885 //
Zack Williamse940c7a2019-08-21 14:25:39 -0700886 // Examples:
887 // "name" - the field "name" on the current resource
888 // "items[0].name" - the field "name" on the first array entry in "items"
889 // +optional
890 optional string field = 3;
891}
892
893// StatusDetails is a set of additional properties that MAY be set by the
894// server to provide additional information about a response. The Reason
895// field of a Status object defines what attributes will be set. Clients
896// must ignore fields that do not match the defined type of each attribute,
897// and should assume that any attribute may be empty, invalid, or under
898// defined.
899message StatusDetails {
900 // The name attribute of the resource associated with the status StatusReason
901 // (when there is a single name which can be described).
902 // +optional
903 optional string name = 1;
904
905 // The group attribute of the resource associated with the status StatusReason.
906 // +optional
907 optional string group = 2;
908
909 // The kind attribute of the resource associated with the status StatusReason.
910 // On some operations may differ from the requested resource Kind.
911 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
912 // +optional
913 optional string kind = 3;
914
915 // UID of the resource.
916 // (when there is a single resource which can be described).
917 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
918 // +optional
919 optional string uid = 6;
920
921 // The Causes array includes more details associated with the StatusReason
922 // failure. Not all StatusReasons may provide detailed causes.
923 // +optional
924 repeated StatusCause causes = 4;
925
926 // If specified, the time in seconds before the operation should be retried. Some errors may indicate
927 // the client must take an alternate action - for those errors this field may indicate how long to wait
928 // before taking the alternate action.
929 // +optional
930 optional int32 retryAfterSeconds = 5;
931}
932
David Bainbridge86971522019-09-26 22:09:39 +0000933// TableOptions are used when a Table is requested by the caller.
934// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
935message TableOptions {
936 // includeObject decides whether to include each object along with its columnar information.
937 // Specifying "None" will return no object, specifying "Object" will return the full object contents, and
938 // specifying "Metadata" (the default) will return the object's metadata in the PartialObjectMetadata kind
939 // in version v1beta1 of the meta.k8s.io API group.
940 optional string includeObject = 1;
941}
942
Zack Williamse940c7a2019-08-21 14:25:39 -0700943// Time is a wrapper around time.Time which supports correct
944// marshaling to YAML and JSON. Wrappers are provided for many
945// of the factory methods that the time package offers.
David Bainbridge86971522019-09-26 22:09:39 +0000946//
Zack Williamse940c7a2019-08-21 14:25:39 -0700947// +protobuf.options.marshal=false
948// +protobuf.as=Timestamp
949// +protobuf.options.(gogoproto.goproto_stringer)=false
950message Time {
951 // Represents seconds of UTC time since Unix epoch
952 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
953 // 9999-12-31T23:59:59Z inclusive.
954 optional int64 seconds = 1;
955
956 // Non-negative fractions of a second at nanosecond resolution. Negative
957 // second values with fractions must still have non-negative nanos values
958 // that count forward in time. Must be from 0 to 999,999,999
959 // inclusive. This field may be limited in precision depending on context.
960 optional int32 nanos = 2;
961}
962
963// Timestamp is a struct that is equivalent to Time, but intended for
964// protobuf marshalling/unmarshalling. It is generated into a serialization
965// that matches Time. Do not use in Go structs.
966message Timestamp {
967 // Represents seconds of UTC time since Unix epoch
968 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
969 // 9999-12-31T23:59:59Z inclusive.
970 optional int64 seconds = 1;
971
972 // Non-negative fractions of a second at nanosecond resolution. Negative
973 // second values with fractions must still have non-negative nanos values
974 // that count forward in time. Must be from 0 to 999,999,999
975 // inclusive. This field may be limited in precision depending on context.
976 optional int32 nanos = 2;
977}
978
979// TypeMeta describes an individual object in an API response or request
980// with strings representing the type of the object and its API schema version.
981// Structures that are versioned or persisted should inline TypeMeta.
David Bainbridge86971522019-09-26 22:09:39 +0000982//
Zack Williamse940c7a2019-08-21 14:25:39 -0700983// +k8s:deepcopy-gen=false
984message TypeMeta {
985 // Kind is a string value representing the REST resource this object represents.
986 // Servers may infer this from the endpoint the client submits requests to.
987 // Cannot be updated.
988 // In CamelCase.
989 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
990 // +optional
991 optional string kind = 1;
992
993 // APIVersion defines the versioned schema of this representation of an object.
994 // Servers should convert recognized schemas to the latest internal value, and
995 // may reject unrecognized values.
996 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
997 // +optional
998 optional string apiVersion = 2;
999}
1000
1001// UpdateOptions may be provided when updating an API object.
David Bainbridge86971522019-09-26 22:09:39 +00001002// All fields in UpdateOptions should also be present in PatchOptions.
Zack Williamse940c7a2019-08-21 14:25:39 -07001003message UpdateOptions {
1004 // When present, indicates that modifications should not be
1005 // persisted. An invalid or unrecognized dryRun directive will
1006 // result in an error response and no further processing of the
1007 // request. Valid values are:
1008 // - All: all dry run stages will be processed
1009 // +optional
1010 repeated string dryRun = 1;
David Bainbridge86971522019-09-26 22:09:39 +00001011
1012 // fieldManager is a name associated with the actor or entity
1013 // that is making these changes. The value must be less than or
1014 // 128 characters long, and only contain printable characters,
1015 // as defined by https://golang.org/pkg/unicode/#IsPrint.
1016 // +optional
1017 optional string fieldManager = 2;
Zack Williamse940c7a2019-08-21 14:25:39 -07001018}
1019
1020// Verbs masks the value so protobuf can generate
David Bainbridge86971522019-09-26 22:09:39 +00001021//
Zack Williamse940c7a2019-08-21 14:25:39 -07001022// +protobuf.nullable=true
1023// +protobuf.options.(gogoproto.goproto_stringer)=false
1024message Verbs {
1025 // items, if empty, will result in an empty slice
1026
1027 repeated string items = 1;
1028}
1029
1030// Event represents a single event to a watched resource.
David Bainbridge86971522019-09-26 22:09:39 +00001031//
Zack Williamse940c7a2019-08-21 14:25:39 -07001032// +protobuf=true
1033// +k8s:deepcopy-gen=true
1034// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
1035message WatchEvent {
1036 optional string type = 1;
1037
1038 // Object is:
1039 // * If Type is Added or Modified: the new state of the object.
1040 // * If Type is Deleted: the state of the object immediately before deletion.
1041 // * If Type is Error: *Status is recommended; other types may make sense
1042 // depending on context.
1043 optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2;
1044}
1045