blob: 36bda1fe5918a7fee456dac243ca7a81c1c5e0e8 [file] [log] [blame]
sslobodrd046be82019-01-16 10:02:22 -05001/*
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;
Stephane Barbarie260a5632019-02-26 16:12:49 -050095
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;
sslobodrd046be82019-01-16 10:02:22 -0500105}
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.
120//
121// +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;
William Kurkiandaa6bb22019-03-07 12:26:28 -0500146
147 // 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;
sslobodrd046be82019-01-16 10:02:22 -0500153}
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.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500204// Deprecated. Planned for removal in 1.18.
sslobodrd046be82019-01-16 10:02:22 -0500205message ExportOptions {
206 // Should this value be exported. Export strips fields that a user can not specify.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500207 // Deprecated. Planned for removal in 1.18.
sslobodrd046be82019-01-16 10:02:22 -0500208 optional bool export = 1;
209
210 // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500211 // Deprecated. Planned for removal in 1.18.
sslobodrd046be82019-01-16 10:02:22 -0500212 optional bool exact = 2;
213}
214
Stephane Barbarie260a5632019-02-26 16:12:49 -0500215// 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
sslobodrd046be82019-01-16 10:02:22 -0500232// 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;
sslobodrd046be82019-01-16 10:02:22 -0500239}
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
243//
244// +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
253//
254// +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.
262//
263// +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
283//
284// +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
295//
296// +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;
398}
399
400// ListOptions is the query options to a standard REST list call.
401message ListOptions {
402 // A selector to restrict the list of returned objects by their labels.
403 // Defaults to everything.
404 // +optional
405 optional string labelSelector = 1;
406
407 // A selector to restrict the list of returned objects by their fields.
408 // Defaults to everything.
409 // +optional
410 optional string fieldSelector = 2;
411
sslobodrd046be82019-01-16 10:02:22 -0500412 // Watch for changes to the described resources and return them as a stream of
413 // add, update, and remove notifications. Specify resourceVersion.
414 // +optional
415 optional bool watch = 3;
416
417 // When specified with a watch call, shows changes that occur after that particular version of a resource.
418 // Defaults to changes from the beginning of history.
419 // When specified for list:
420 // - if unset, then the result is returned from remote storage based on quorum-read flag;
421 // - if it's 0, then we simply return what we currently have in cache, no guarantee;
422 // - if set to non zero, then the result is at least as fresh as given rv.
423 // +optional
424 optional string resourceVersion = 4;
425
426 // Timeout for the list/watch call.
427 // This limits the duration of the call, regardless of any activity or inactivity.
428 // +optional
429 optional int64 timeoutSeconds = 5;
430
431 // limit is a maximum number of responses to return for a list call. If more items exist, the
432 // server will set the `continue` field on the list metadata to a value that can be used with the
433 // same initial query to retrieve the next set of results. Setting a limit may return fewer than
434 // the requested amount of items (up to zero items) in the event all requested objects are
435 // filtered out and clients should only use the presence of the continue field to determine whether
436 // more results are available. Servers may choose not to support the limit argument and will return
437 // all of the available results. If limit is specified and the continue field is empty, clients may
438 // assume that no more results are available. This field is not supported if watch is true.
439 //
440 // The server guarantees that the objects returned when using continue will be identical to issuing
441 // a single list call without a limit - that is, no objects created, modified, or deleted after the
442 // first request is issued will be included in any subsequent continued requests. This is sometimes
443 // referred to as a consistent snapshot, and ensures that a client that is using limit to receive
444 // smaller chunks of a very large result can ensure they see all possible objects. If objects are
445 // updated during a chunked list the version of the object that was present at the time the first list
446 // result was calculated is returned.
447 optional int64 limit = 7;
448
449 // The continue option should be set when retrieving more results from the server. Since this value is
450 // server defined, clients may only use the continue value from a previous query result with identical
451 // query parameters (except for the value of continue) and the server may reject a continue value it
452 // does not recognize. If the specified continue value is no longer valid whether due to expiration
453 // (generally five to fifteen minutes) or a configuration change on the server, the server will
454 // respond with a 410 ResourceExpired error together with a continue token. If the client needs a
455 // consistent list, it must restart their list without the continue field. Otherwise, the client may
456 // send another list request with the token received with the 410 error, the server will respond with
457 // a list starting from the next key, but from the latest snapshot, which is inconsistent from the
458 // previous list results - objects that are created, modified, or deleted after the first list request
459 // will be included in the response, as long as their keys are after the "next key".
460 //
461 // This field is not supported when watch is true. Clients may start a watch from the last
462 // resourceVersion value returned by the server and not miss any modifications.
463 optional string continue = 8;
464}
465
Stephane Barbarie260a5632019-02-26 16:12:49 -0500466// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource
467// that the fieldset applies to.
468message ManagedFieldsEntry {
469 // Manager is an identifier of the workflow managing these fields.
470 optional string manager = 1;
471
472 // Operation is the type of operation which lead to this ManagedFieldsEntry being created.
473 // The only valid values for this field are 'Apply' and 'Update'.
474 optional string operation = 2;
475
476 // APIVersion defines the version of this resource that this field set
477 // applies to. The format is "group/version" just like the top-level
478 // APIVersion field. It is necessary to track the version of a field
479 // set because it cannot be automatically converted.
480 optional string apiVersion = 3;
481
482 // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'
483 // +optional
484 optional Time time = 4;
485
486 // Fields identifies a set of fields.
487 // +optional
488 optional Fields fields = 5;
489}
490
sslobodrd046be82019-01-16 10:02:22 -0500491// MicroTime is version of Time with microsecond level precision.
492//
493// +protobuf.options.marshal=false
494// +protobuf.as=Timestamp
495// +protobuf.options.(gogoproto.goproto_stringer)=false
496message MicroTime {
497 // Represents seconds of UTC time since Unix epoch
498 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
499 // 9999-12-31T23:59:59Z inclusive.
500 optional int64 seconds = 1;
501
502 // Non-negative fractions of a second at nanosecond resolution. Negative
503 // second values with fractions must still have non-negative nanos values
504 // that count forward in time. Must be from 0 to 999,999,999
505 // inclusive. This field may be limited in precision depending on context.
506 optional int32 nanos = 2;
507}
508
509// ObjectMeta is metadata that all persisted resources must have, which includes all objects
510// users must create.
511message ObjectMeta {
512 // Name must be unique within a namespace. Is required when creating resources, although
513 // some resources may allow a client to request the generation of an appropriate name
514 // automatically. Name is primarily intended for creation idempotence and configuration
515 // definition.
516 // Cannot be updated.
517 // More info: http://kubernetes.io/docs/user-guide/identifiers#names
518 // +optional
519 optional string name = 1;
520
521 // GenerateName is an optional prefix, used by the server, to generate a unique
522 // name ONLY IF the Name field has not been provided.
523 // If this field is used, the name returned to the client will be different
524 // than the name passed. This value will also be combined with a unique suffix.
525 // The provided value has the same validation rules as the Name field,
526 // and may be truncated by the length of the suffix required to make the value
527 // unique on the server.
528 //
529 // If this field is specified and the generated name exists, the server will
530 // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
531 // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
532 // should retry (optionally after the time indicated in the Retry-After header).
533 //
534 // Applied only if Name is not specified.
535 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
536 // +optional
537 optional string generateName = 2;
538
539 // Namespace defines the space within each name must be unique. An empty namespace is
540 // equivalent to the "default" namespace, but "default" is the canonical representation.
541 // Not all objects are required to be scoped to a namespace - the value of this field for
542 // those objects will be empty.
543 //
544 // Must be a DNS_LABEL.
545 // Cannot be updated.
546 // More info: http://kubernetes.io/docs/user-guide/namespaces
547 // +optional
548 optional string namespace = 3;
549
550 // SelfLink is a URL representing this object.
551 // Populated by the system.
552 // Read-only.
553 // +optional
554 optional string selfLink = 4;
555
556 // UID is the unique in time and space value for this object. It is typically generated by
557 // the server on successful creation of a resource and is not allowed to change on PUT
558 // operations.
559 //
560 // Populated by the system.
561 // Read-only.
562 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
563 // +optional
564 optional string uid = 5;
565
566 // An opaque value that represents the internal version of this object that can
567 // be used by clients to determine when objects have changed. May be used for optimistic
568 // concurrency, change detection, and the watch operation on a resource or set of resources.
569 // Clients must treat these values as opaque and passed unmodified back to the server.
570 // They may only be valid for a particular resource or set of resources.
571 //
572 // Populated by the system.
573 // Read-only.
574 // Value must be treated as opaque by clients and .
575 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
576 // +optional
577 optional string resourceVersion = 6;
578
579 // A sequence number representing a specific generation of the desired state.
580 // Populated by the system. Read-only.
581 // +optional
582 optional int64 generation = 7;
583
584 // CreationTimestamp is a timestamp representing the server time when this object was
585 // created. It is not guaranteed to be set in happens-before order across separate operations.
586 // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
587 //
588 // Populated by the system.
589 // Read-only.
590 // Null for lists.
591 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
592 // +optional
593 optional Time creationTimestamp = 8;
594
595 // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
596 // field is set by the server when a graceful deletion is requested by the user, and is not
597 // directly settable by a client. The resource is expected to be deleted (no longer visible
598 // from resource lists, and not reachable by name) after the time in this field, once the
599 // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked.
600 // Once the deletionTimestamp is set, this value may not be unset or be set further into the
601 // future, although it may be shortened or the resource may be deleted prior to this time.
602 // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react
603 // by sending a graceful termination signal to the containers in the pod. After that 30 seconds,
604 // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,
605 // remove the pod from the API. In the presence of network partitions, this object may still
606 // exist after this timestamp, until an administrator or automated process can determine the
607 // resource is fully terminated.
608 // If not set, graceful deletion of the object has not been requested.
609 //
610 // Populated by the system when a graceful deletion is requested.
611 // Read-only.
612 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
613 // +optional
614 optional Time deletionTimestamp = 9;
615
616 // Number of seconds allowed for this object to gracefully terminate before
617 // it will be removed from the system. Only set when deletionTimestamp is also set.
618 // May only be shortened.
619 // Read-only.
620 // +optional
621 optional int64 deletionGracePeriodSeconds = 10;
622
623 // Map of string keys and values that can be used to organize and categorize
624 // (scope and select) objects. May match selectors of replication controllers
625 // and services.
626 // More info: http://kubernetes.io/docs/user-guide/labels
627 // +optional
628 map<string, string> labels = 11;
629
630 // Annotations is an unstructured key value map stored with a resource that may be
631 // set by external tools to store and retrieve arbitrary metadata. They are not
632 // queryable and should be preserved when modifying objects.
633 // More info: http://kubernetes.io/docs/user-guide/annotations
634 // +optional
635 map<string, string> annotations = 12;
636
637 // List of objects depended by this object. If ALL objects in the list have
638 // been deleted, this object will be garbage collected. If this object is managed by a controller,
639 // then an entry in this list will point to this controller, with the controller field set to true.
640 // There cannot be more than one managing controller.
641 // +optional
642 // +patchMergeKey=uid
643 // +patchStrategy=merge
644 repeated OwnerReference ownerReferences = 13;
645
646 // An initializer is a controller which enforces some system invariant at object creation time.
647 // This field is a list of initializers that have not yet acted on this object. If nil or empty,
648 // this object has been completely initialized. Otherwise, the object is considered uninitialized
649 // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
650 // observe uninitialized objects.
651 //
652 // When an object is created, the system will populate this list with the current set of initializers.
653 // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
654 // by any user.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500655 //
656 // DEPRECATED - initializers are an alpha field and will be removed in v1.15.
sslobodrd046be82019-01-16 10:02:22 -0500657 optional Initializers initializers = 16;
658
659 // Must be empty before the object is deleted from the registry. Each entry
660 // is an identifier for the responsible component that will remove the entry
661 // from the list. If the deletionTimestamp of the object is non-nil, entries
662 // in this list can only be removed.
663 // +optional
664 // +patchStrategy=merge
665 repeated string finalizers = 14;
666
667 // The name of the cluster which the object belongs to.
668 // This is used to distinguish resources with same name and namespace in different clusters.
669 // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
670 // +optional
671 optional string clusterName = 15;
Stephane Barbarie260a5632019-02-26 16:12:49 -0500672
673 // ManagedFields maps workflow-id and version to the set of fields
674 // that are managed by that workflow. This is mostly for internal
675 // housekeeping, and users typically shouldn't need to set or
676 // understand this field. A workflow can be the user's name, a
677 // controller's name, or the name of a specific apply path like
678 // "ci-cd". The set of fields is always in the version that the
679 // workflow used when modifying the object.
680 //
681 // This field is alpha and can be changed or removed without notice.
682 //
683 // +optional
684 repeated ManagedFieldsEntry managedFields = 17;
sslobodrd046be82019-01-16 10:02:22 -0500685}
686
687// OwnerReference contains enough information to let you identify an owning
688// object. An owning object must be in the same namespace as the dependent, or
689// be cluster-scoped, so there is no namespace field.
690message OwnerReference {
691 // API version of the referent.
692 optional string apiVersion = 5;
693
694 // Kind of the referent.
695 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
696 optional string kind = 1;
697
698 // Name of the referent.
699 // More info: http://kubernetes.io/docs/user-guide/identifiers#names
700 optional string name = 3;
701
702 // UID of the referent.
703 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
704 optional string uid = 4;
705
706 // If true, this reference points to the managing controller.
707 // +optional
708 optional bool controller = 6;
709
710 // If true, AND if the owner has the "foregroundDeletion" finalizer, then
711 // the owner cannot be deleted from the key-value store until this
712 // reference is removed.
713 // Defaults to false.
714 // To set this field, a user needs "delete" permission of the owner,
715 // otherwise 422 (Unprocessable Entity) will be returned.
716 // +optional
717 optional bool blockOwnerDeletion = 7;
718}
719
720// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
721message Patch {
722}
723
Stephane Barbarie260a5632019-02-26 16:12:49 -0500724// PatchOptions may be provided when patching an API object.
725// PatchOptions is meant to be a superset of UpdateOptions.
726message PatchOptions {
727 // When present, indicates that modifications should not be
728 // persisted. An invalid or unrecognized dryRun directive will
729 // result in an error response and no further processing of the
730 // request. Valid values are:
731 // - All: all dry run stages will be processed
732 // +optional
733 repeated string dryRun = 1;
734
735 // Force is going to "force" Apply requests. It means user will
736 // re-acquire conflicting fields owned by other people. Force
737 // flag must be unset for non-apply patch requests.
738 // +optional
739 optional bool force = 2;
William Kurkiandaa6bb22019-03-07 12:26:28 -0500740
741 // fieldManager is a name associated with the actor or entity
742 // that is making these changes. The value must be less than or
743 // 128 characters long, and only contain printable characters,
744 // as defined by https://golang.org/pkg/unicode/#IsPrint. This
745 // field is required for apply requests
746 // (application/apply-patch) but optional for non-apply patch
747 // types (JsonPatch, MergePatch, StrategicMergePatch).
748 // +optional
749 optional string fieldManager = 3;
Stephane Barbarie260a5632019-02-26 16:12:49 -0500750}
751
sslobodrd046be82019-01-16 10:02:22 -0500752// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
753message Preconditions {
754 // Specifies the target UID.
755 // +optional
756 optional string uid = 1;
William Kurkiandaa6bb22019-03-07 12:26:28 -0500757
758 // Specifies the target ResourceVersion
759 // +optional
760 optional string resourceVersion = 2;
sslobodrd046be82019-01-16 10:02:22 -0500761}
762
763// RootPaths lists the paths available at root.
764// For example: "/healthz", "/apis".
765message RootPaths {
766 // paths are the paths available at root.
767 repeated string paths = 1;
768}
769
770// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
771message ServerAddressByClientCIDR {
772 // The CIDR with which clients can match their IP to figure out the server address that they should use.
773 optional string clientCIDR = 1;
774
775 // Address of this server, suitable for a client that matches the above CIDR.
776 // This can be a hostname, hostname:port, IP or IP:port.
777 optional string serverAddress = 2;
778}
779
780// Status is a return value for calls that don't return other objects.
781message Status {
782 // Standard list metadata.
783 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
784 // +optional
785 optional ListMeta metadata = 1;
786
787 // Status of the operation.
788 // One of: "Success" or "Failure".
789 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
790 // +optional
791 optional string status = 2;
792
793 // A human-readable description of the status of this operation.
794 // +optional
795 optional string message = 3;
796
797 // A machine-readable description of why this operation is in the
798 // "Failure" status. If this value is empty there
799 // is no information available. A Reason clarifies an HTTP status
800 // code but does not override it.
801 // +optional
802 optional string reason = 4;
803
804 // Extended data associated with the reason. Each reason may define its
805 // own extended details. This field is optional and the data returned
806 // is not guaranteed to conform to any schema except that defined by
807 // the reason type.
808 // +optional
809 optional StatusDetails details = 5;
810
811 // Suggested HTTP return code for this status, 0 if not set.
812 // +optional
813 optional int32 code = 6;
814}
815
816// StatusCause provides more information about an api.Status failure, including
817// cases when multiple errors are encountered.
818message StatusCause {
819 // A machine-readable description of the cause of the error. If this value is
820 // empty there is no information available.
821 // +optional
822 optional string reason = 1;
823
824 // A human-readable description of the cause of the error. This field may be
825 // presented as-is to a reader.
826 // +optional
827 optional string message = 2;
828
829 // The field of the resource that has caused this error, as named by its JSON
830 // serialization. May include dot and postfix notation for nested attributes.
831 // Arrays are zero-indexed. Fields may appear more than once in an array of
832 // causes due to fields having multiple errors.
833 // Optional.
834 //
835 // Examples:
836 // "name" - the field "name" on the current resource
837 // "items[0].name" - the field "name" on the first array entry in "items"
838 // +optional
839 optional string field = 3;
840}
841
842// StatusDetails is a set of additional properties that MAY be set by the
843// server to provide additional information about a response. The Reason
844// field of a Status object defines what attributes will be set. Clients
845// must ignore fields that do not match the defined type of each attribute,
846// and should assume that any attribute may be empty, invalid, or under
847// defined.
848message StatusDetails {
849 // The name attribute of the resource associated with the status StatusReason
850 // (when there is a single name which can be described).
851 // +optional
852 optional string name = 1;
853
854 // The group attribute of the resource associated with the status StatusReason.
855 // +optional
856 optional string group = 2;
857
858 // The kind attribute of the resource associated with the status StatusReason.
859 // On some operations may differ from the requested resource Kind.
860 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
861 // +optional
862 optional string kind = 3;
863
864 // UID of the resource.
865 // (when there is a single resource which can be described).
866 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
867 // +optional
868 optional string uid = 6;
869
870 // The Causes array includes more details associated with the StatusReason
871 // failure. Not all StatusReasons may provide detailed causes.
872 // +optional
873 repeated StatusCause causes = 4;
874
875 // If specified, the time in seconds before the operation should be retried. Some errors may indicate
876 // the client must take an alternate action - for those errors this field may indicate how long to wait
877 // before taking the alternate action.
878 // +optional
879 optional int32 retryAfterSeconds = 5;
880}
881
882// Time is a wrapper around time.Time which supports correct
883// marshaling to YAML and JSON. Wrappers are provided for many
884// of the factory methods that the time package offers.
885//
886// +protobuf.options.marshal=false
887// +protobuf.as=Timestamp
888// +protobuf.options.(gogoproto.goproto_stringer)=false
889message Time {
890 // Represents seconds of UTC time since Unix epoch
891 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
892 // 9999-12-31T23:59:59Z inclusive.
893 optional int64 seconds = 1;
894
895 // Non-negative fractions of a second at nanosecond resolution. Negative
896 // second values with fractions must still have non-negative nanos values
897 // that count forward in time. Must be from 0 to 999,999,999
898 // inclusive. This field may be limited in precision depending on context.
899 optional int32 nanos = 2;
900}
901
902// Timestamp is a struct that is equivalent to Time, but intended for
903// protobuf marshalling/unmarshalling. It is generated into a serialization
904// that matches Time. Do not use in Go structs.
905message Timestamp {
906 // Represents seconds of UTC time since Unix epoch
907 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
908 // 9999-12-31T23:59:59Z inclusive.
909 optional int64 seconds = 1;
910
911 // Non-negative fractions of a second at nanosecond resolution. Negative
912 // second values with fractions must still have non-negative nanos values
913 // that count forward in time. Must be from 0 to 999,999,999
914 // inclusive. This field may be limited in precision depending on context.
915 optional int32 nanos = 2;
916}
917
918// TypeMeta describes an individual object in an API response or request
919// with strings representing the type of the object and its API schema version.
920// Structures that are versioned or persisted should inline TypeMeta.
921//
922// +k8s:deepcopy-gen=false
923message TypeMeta {
924 // Kind is a string value representing the REST resource this object represents.
925 // Servers may infer this from the endpoint the client submits requests to.
926 // Cannot be updated.
927 // In CamelCase.
928 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
929 // +optional
930 optional string kind = 1;
931
932 // APIVersion defines the versioned schema of this representation of an object.
933 // Servers should convert recognized schemas to the latest internal value, and
934 // may reject unrecognized values.
935 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
936 // +optional
937 optional string apiVersion = 2;
938}
939
940// UpdateOptions may be provided when updating an API object.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500941// All fields in UpdateOptions should also be present in PatchOptions.
sslobodrd046be82019-01-16 10:02:22 -0500942message UpdateOptions {
943 // When present, indicates that modifications should not be
944 // persisted. An invalid or unrecognized dryRun directive will
945 // result in an error response and no further processing of the
946 // request. Valid values are:
947 // - All: all dry run stages will be processed
948 // +optional
949 repeated string dryRun = 1;
William Kurkiandaa6bb22019-03-07 12:26:28 -0500950
951 // fieldManager is a name associated with the actor or entity
952 // that is making these changes. The value must be less than or
953 // 128 characters long, and only contain printable characters,
954 // as defined by https://golang.org/pkg/unicode/#IsPrint.
955 // +optional
956 optional string fieldManager = 2;
sslobodrd046be82019-01-16 10:02:22 -0500957}
958
959// Verbs masks the value so protobuf can generate
960//
961// +protobuf.nullable=true
962// +protobuf.options.(gogoproto.goproto_stringer)=false
963message Verbs {
964 // items, if empty, will result in an empty slice
965
966 repeated string items = 1;
967}
968
969// Event represents a single event to a watched resource.
970//
971// +protobuf=true
972// +k8s:deepcopy-gen=true
973// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
974message WatchEvent {
975 optional string type = 1;
976
977 // Object is:
978 // * If Type is Added or Modified: the new state of the object.
979 // * If Type is Deleted: the state of the object immediately before deletion.
980 // * If Type is Error: *Status is recommended; other types may make sense
981 // depending on context.
982 optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2;
983}
984