blob: 9e564f302af1b1e9a54e490029f135c02f3b58cf [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;
sslobodrd046be82019-01-16 10:02:22 -0500146}
147
148// DeleteOptions may be provided when deleting an API object.
149message DeleteOptions {
150 // The duration in seconds before the object should be deleted. Value must be non-negative integer.
151 // The value zero indicates delete immediately. If this value is nil, the default grace period for the
152 // specified type will be used.
153 // Defaults to a per object value if not specified. zero means delete immediately.
154 // +optional
155 optional int64 gracePeriodSeconds = 1;
156
157 // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
158 // returned.
159 // +optional
160 optional Preconditions preconditions = 2;
161
162 // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
163 // Should the dependent objects be orphaned. If true/false, the "orphan"
164 // finalizer will be added to/removed from the object's finalizers list.
165 // Either this field or PropagationPolicy may be set, but not both.
166 // +optional
167 optional bool orphanDependents = 3;
168
169 // Whether and how garbage collection will be performed.
170 // Either this field or OrphanDependents may be set, but not both.
171 // The default policy is decided by the existing finalizer set in the
172 // metadata.finalizers and the resource-specific default policy.
173 // Acceptable values are: 'Orphan' - orphan the dependents; 'Background' -
174 // allow the garbage collector to delete the dependents in the background;
175 // 'Foreground' - a cascading policy that deletes all dependents in the
176 // foreground.
177 // +optional
178 optional string propagationPolicy = 4;
179
180 // When present, indicates that modifications should not be
181 // persisted. An invalid or unrecognized dryRun directive will
182 // result in an error response and no further processing of the
183 // request. Valid values are:
184 // - All: all dry run stages will be processed
185 // +optional
186 repeated string dryRun = 5;
187}
188
189// Duration is a wrapper around time.Duration which supports correct
190// marshaling to YAML and JSON. In particular, it marshals into strings, which
191// can be used as map keys in json.
192message Duration {
193 optional int64 duration = 1;
194}
195
196// ExportOptions is the query options to the standard REST get call.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500197// Deprecated. Planned for removal in 1.18.
sslobodrd046be82019-01-16 10:02:22 -0500198message ExportOptions {
199 // Should this value be exported. Export strips fields that a user can not specify.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500200 // Deprecated. Planned for removal in 1.18.
sslobodrd046be82019-01-16 10:02:22 -0500201 optional bool export = 1;
202
203 // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500204 // Deprecated. Planned for removal in 1.18.
sslobodrd046be82019-01-16 10:02:22 -0500205 optional bool exact = 2;
206}
207
Stephane Barbarie260a5632019-02-26 16:12:49 -0500208// Fields stores a set of fields in a data structure like a Trie.
209// To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff
210message Fields {
211 // Map stores a set of fields in a data structure like a Trie.
212 //
213 // Each key is either a '.' representing the field itself, and will always map to an empty set,
214 // or a string representing a sub-field or item. The string will follow one of these four formats:
215 // 'f:<name>', where <name> is the name of a field in a struct, or key in a map
216 // 'v:<value>', where <value> is the exact json formatted value of a list item
217 // 'i:<index>', where <index> is position of a item in a list
218 // 'k:<keys>', where <keys> is a map of a list item's key fields to their unique values
219 // If a key maps to an empty Fields value, the field that key represents is part of the set.
220 //
221 // The exact format is defined in k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal
222 map<string, Fields> map = 1;
223}
224
sslobodrd046be82019-01-16 10:02:22 -0500225// GetOptions is the standard query options to the standard REST get call.
226message GetOptions {
227 // When specified:
228 // - if unset, then the result is returned from remote storage based on quorum-read flag;
229 // - if it's 0, then we simply return what we currently have in cache, no guarantee;
230 // - if set to non zero, then the result is at least as fresh as given rv.
231 optional string resourceVersion = 1;
sslobodrd046be82019-01-16 10:02:22 -0500232}
233
234// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
235// concepts during lookup stages without having partially valid types
236//
237// +protobuf.options.(gogoproto.goproto_stringer)=false
238message GroupKind {
239 optional string group = 1;
240
241 optional string kind = 2;
242}
243
244// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying
245// concepts during lookup stages without having partially valid types
246//
247// +protobuf.options.(gogoproto.goproto_stringer)=false
248message GroupResource {
249 optional string group = 1;
250
251 optional string resource = 2;
252}
253
254// GroupVersion contains the "group" and the "version", which uniquely identifies the API.
255//
256// +protobuf.options.(gogoproto.goproto_stringer)=false
257message GroupVersion {
258 optional string group = 1;
259
260 optional string version = 2;
261}
262
263// GroupVersion contains the "group/version" and "version" string of a version.
264// It is made a struct to keep extensibility.
265message GroupVersionForDiscovery {
266 // groupVersion specifies the API group and version in the form "group/version"
267 optional string groupVersion = 1;
268
269 // version specifies the version in the form of "version". This is to save
270 // the clients the trouble of splitting the GroupVersion.
271 optional string version = 2;
272}
273
274// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion
275// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling
276//
277// +protobuf.options.(gogoproto.goproto_stringer)=false
278message GroupVersionKind {
279 optional string group = 1;
280
281 optional string version = 2;
282
283 optional string kind = 3;
284}
285
286// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion
287// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling
288//
289// +protobuf.options.(gogoproto.goproto_stringer)=false
290message GroupVersionResource {
291 optional string group = 1;
292
293 optional string version = 2;
294
295 optional string resource = 3;
296}
297
298// Initializer is information about an initializer that has not yet completed.
299message Initializer {
300 // name of the process that is responsible for initializing this object.
301 optional string name = 1;
302}
303
304// Initializers tracks the progress of initialization.
305message Initializers {
306 // Pending is a list of initializers that must execute in order before this object is visible.
307 // When the last pending initializer is removed, and no failing result is set, the initializers
308 // struct will be set to nil and the object is considered as initialized and visible to all
309 // clients.
310 // +patchMergeKey=name
311 // +patchStrategy=merge
312 repeated Initializer pending = 1;
313
314 // If result is set with the Failure field, the object will be persisted to storage and then deleted,
315 // ensuring that other clients can observe the deletion.
316 optional Status result = 2;
317}
318
319// A label selector is a label query over a set of resources. The result of matchLabels and
320// matchExpressions are ANDed. An empty label selector matches all objects. A null
321// label selector matches no objects.
322message LabelSelector {
323 // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
324 // map is equivalent to an element of matchExpressions, whose key field is "key", the
325 // operator is "In", and the values array contains only "value". The requirements are ANDed.
326 // +optional
327 map<string, string> matchLabels = 1;
328
329 // matchExpressions is a list of label selector requirements. The requirements are ANDed.
330 // +optional
331 repeated LabelSelectorRequirement matchExpressions = 2;
332}
333
334// A label selector requirement is a selector that contains values, a key, and an operator that
335// relates the key and values.
336message LabelSelectorRequirement {
337 // key is the label key that the selector applies to.
338 // +patchMergeKey=key
339 // +patchStrategy=merge
340 optional string key = 1;
341
342 // operator represents a key's relationship to a set of values.
343 // Valid operators are In, NotIn, Exists and DoesNotExist.
344 optional string operator = 2;
345
346 // values is an array of string values. If the operator is In or NotIn,
347 // the values array must be non-empty. If the operator is Exists or DoesNotExist,
348 // the values array must be empty. This array is replaced during a strategic
349 // merge patch.
350 // +optional
351 repeated string values = 3;
352}
353
354// List holds a list of objects, which may not be known by the server.
355message List {
356 // Standard list metadata.
357 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
358 // +optional
359 optional ListMeta metadata = 1;
360
361 // List of objects
362 repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2;
363}
364
365// ListMeta describes metadata that synthetic resources must have, including lists and
366// various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
367message ListMeta {
368 // selfLink is a URL representing this object.
369 // Populated by the system.
370 // Read-only.
371 // +optional
372 optional string selfLink = 1;
373
374 // String that identifies the server's internal version of this object that
375 // can be used by clients to determine when objects have changed.
376 // Value must be treated as opaque by clients and passed unmodified back to the server.
377 // Populated by the system.
378 // Read-only.
379 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
380 // +optional
381 optional string resourceVersion = 2;
382
383 // continue may be set if the user set a limit on the number of items returned, and indicates that
384 // the server has more data available. The value is opaque and may be used to issue another request
385 // to the endpoint that served this list to retrieve the next set of available objects. Continuing a
386 // consistent list may not be possible if the server configuration has changed or more than a few
387 // minutes have passed. The resourceVersion field returned when using this continue value will be
388 // identical to the value in the first response, unless you have received this token from an error
389 // message.
390 optional string continue = 3;
391}
392
393// ListOptions is the query options to a standard REST list call.
394message ListOptions {
395 // A selector to restrict the list of returned objects by their labels.
396 // Defaults to everything.
397 // +optional
398 optional string labelSelector = 1;
399
400 // A selector to restrict the list of returned objects by their fields.
401 // Defaults to everything.
402 // +optional
403 optional string fieldSelector = 2;
404
sslobodrd046be82019-01-16 10:02:22 -0500405 // Watch for changes to the described resources and return them as a stream of
406 // add, update, and remove notifications. Specify resourceVersion.
407 // +optional
408 optional bool watch = 3;
409
410 // When specified with a watch call, shows changes that occur after that particular version of a resource.
411 // Defaults to changes from the beginning of history.
412 // When specified for list:
413 // - if unset, then the result is returned from remote storage based on quorum-read flag;
414 // - if it's 0, then we simply return what we currently have in cache, no guarantee;
415 // - if set to non zero, then the result is at least as fresh as given rv.
416 // +optional
417 optional string resourceVersion = 4;
418
419 // Timeout for the list/watch call.
420 // This limits the duration of the call, regardless of any activity or inactivity.
421 // +optional
422 optional int64 timeoutSeconds = 5;
423
424 // limit is a maximum number of responses to return for a list call. If more items exist, the
425 // server will set the `continue` field on the list metadata to a value that can be used with the
426 // same initial query to retrieve the next set of results. Setting a limit may return fewer than
427 // the requested amount of items (up to zero items) in the event all requested objects are
428 // filtered out and clients should only use the presence of the continue field to determine whether
429 // more results are available. Servers may choose not to support the limit argument and will return
430 // all of the available results. If limit is specified and the continue field is empty, clients may
431 // assume that no more results are available. This field is not supported if watch is true.
432 //
433 // The server guarantees that the objects returned when using continue will be identical to issuing
434 // a single list call without a limit - that is, no objects created, modified, or deleted after the
435 // first request is issued will be included in any subsequent continued requests. This is sometimes
436 // referred to as a consistent snapshot, and ensures that a client that is using limit to receive
437 // smaller chunks of a very large result can ensure they see all possible objects. If objects are
438 // updated during a chunked list the version of the object that was present at the time the first list
439 // result was calculated is returned.
440 optional int64 limit = 7;
441
442 // The continue option should be set when retrieving more results from the server. Since this value is
443 // server defined, clients may only use the continue value from a previous query result with identical
444 // query parameters (except for the value of continue) and the server may reject a continue value it
445 // does not recognize. If the specified continue value is no longer valid whether due to expiration
446 // (generally five to fifteen minutes) or a configuration change on the server, the server will
447 // respond with a 410 ResourceExpired error together with a continue token. If the client needs a
448 // consistent list, it must restart their list without the continue field. Otherwise, the client may
449 // send another list request with the token received with the 410 error, the server will respond with
450 // a list starting from the next key, but from the latest snapshot, which is inconsistent from the
451 // previous list results - objects that are created, modified, or deleted after the first list request
452 // will be included in the response, as long as their keys are after the "next key".
453 //
454 // This field is not supported when watch is true. Clients may start a watch from the last
455 // resourceVersion value returned by the server and not miss any modifications.
456 optional string continue = 8;
457}
458
Stephane Barbarie260a5632019-02-26 16:12:49 -0500459// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource
460// that the fieldset applies to.
461message ManagedFieldsEntry {
462 // Manager is an identifier of the workflow managing these fields.
463 optional string manager = 1;
464
465 // Operation is the type of operation which lead to this ManagedFieldsEntry being created.
466 // The only valid values for this field are 'Apply' and 'Update'.
467 optional string operation = 2;
468
469 // APIVersion defines the version of this resource that this field set
470 // applies to. The format is "group/version" just like the top-level
471 // APIVersion field. It is necessary to track the version of a field
472 // set because it cannot be automatically converted.
473 optional string apiVersion = 3;
474
475 // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'
476 // +optional
477 optional Time time = 4;
478
479 // Fields identifies a set of fields.
480 // +optional
481 optional Fields fields = 5;
482}
483
sslobodrd046be82019-01-16 10:02:22 -0500484// MicroTime is version of Time with microsecond level precision.
485//
486// +protobuf.options.marshal=false
487// +protobuf.as=Timestamp
488// +protobuf.options.(gogoproto.goproto_stringer)=false
489message MicroTime {
490 // Represents seconds of UTC time since Unix epoch
491 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
492 // 9999-12-31T23:59:59Z inclusive.
493 optional int64 seconds = 1;
494
495 // Non-negative fractions of a second at nanosecond resolution. Negative
496 // second values with fractions must still have non-negative nanos values
497 // that count forward in time. Must be from 0 to 999,999,999
498 // inclusive. This field may be limited in precision depending on context.
499 optional int32 nanos = 2;
500}
501
502// ObjectMeta is metadata that all persisted resources must have, which includes all objects
503// users must create.
504message ObjectMeta {
505 // Name must be unique within a namespace. Is required when creating resources, although
506 // some resources may allow a client to request the generation of an appropriate name
507 // automatically. Name is primarily intended for creation idempotence and configuration
508 // definition.
509 // Cannot be updated.
510 // More info: http://kubernetes.io/docs/user-guide/identifiers#names
511 // +optional
512 optional string name = 1;
513
514 // GenerateName is an optional prefix, used by the server, to generate a unique
515 // name ONLY IF the Name field has not been provided.
516 // If this field is used, the name returned to the client will be different
517 // than the name passed. This value will also be combined with a unique suffix.
518 // The provided value has the same validation rules as the Name field,
519 // and may be truncated by the length of the suffix required to make the value
520 // unique on the server.
521 //
522 // If this field is specified and the generated name exists, the server will
523 // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
524 // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
525 // should retry (optionally after the time indicated in the Retry-After header).
526 //
527 // Applied only if Name is not specified.
528 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
529 // +optional
530 optional string generateName = 2;
531
532 // Namespace defines the space within each name must be unique. An empty namespace is
533 // equivalent to the "default" namespace, but "default" is the canonical representation.
534 // Not all objects are required to be scoped to a namespace - the value of this field for
535 // those objects will be empty.
536 //
537 // Must be a DNS_LABEL.
538 // Cannot be updated.
539 // More info: http://kubernetes.io/docs/user-guide/namespaces
540 // +optional
541 optional string namespace = 3;
542
543 // SelfLink is a URL representing this object.
544 // Populated by the system.
545 // Read-only.
546 // +optional
547 optional string selfLink = 4;
548
549 // UID is the unique in time and space value for this object. It is typically generated by
550 // the server on successful creation of a resource and is not allowed to change on PUT
551 // operations.
552 //
553 // Populated by the system.
554 // Read-only.
555 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
556 // +optional
557 optional string uid = 5;
558
559 // An opaque value that represents the internal version of this object that can
560 // be used by clients to determine when objects have changed. May be used for optimistic
561 // concurrency, change detection, and the watch operation on a resource or set of resources.
562 // Clients must treat these values as opaque and passed unmodified back to the server.
563 // They may only be valid for a particular resource or set of resources.
564 //
565 // Populated by the system.
566 // Read-only.
567 // Value must be treated as opaque by clients and .
568 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
569 // +optional
570 optional string resourceVersion = 6;
571
572 // A sequence number representing a specific generation of the desired state.
573 // Populated by the system. Read-only.
574 // +optional
575 optional int64 generation = 7;
576
577 // CreationTimestamp is a timestamp representing the server time when this object was
578 // created. It is not guaranteed to be set in happens-before order across separate operations.
579 // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
580 //
581 // Populated by the system.
582 // Read-only.
583 // Null for lists.
584 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
585 // +optional
586 optional Time creationTimestamp = 8;
587
588 // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
589 // field is set by the server when a graceful deletion is requested by the user, and is not
590 // directly settable by a client. The resource is expected to be deleted (no longer visible
591 // from resource lists, and not reachable by name) after the time in this field, once the
592 // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked.
593 // Once the deletionTimestamp is set, this value may not be unset or be set further into the
594 // future, although it may be shortened or the resource may be deleted prior to this time.
595 // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react
596 // by sending a graceful termination signal to the containers in the pod. After that 30 seconds,
597 // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,
598 // remove the pod from the API. In the presence of network partitions, this object may still
599 // exist after this timestamp, until an administrator or automated process can determine the
600 // resource is fully terminated.
601 // If not set, graceful deletion of the object has not been requested.
602 //
603 // Populated by the system when a graceful deletion is requested.
604 // Read-only.
605 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
606 // +optional
607 optional Time deletionTimestamp = 9;
608
609 // Number of seconds allowed for this object to gracefully terminate before
610 // it will be removed from the system. Only set when deletionTimestamp is also set.
611 // May only be shortened.
612 // Read-only.
613 // +optional
614 optional int64 deletionGracePeriodSeconds = 10;
615
616 // Map of string keys and values that can be used to organize and categorize
617 // (scope and select) objects. May match selectors of replication controllers
618 // and services.
619 // More info: http://kubernetes.io/docs/user-guide/labels
620 // +optional
621 map<string, string> labels = 11;
622
623 // Annotations is an unstructured key value map stored with a resource that may be
624 // set by external tools to store and retrieve arbitrary metadata. They are not
625 // queryable and should be preserved when modifying objects.
626 // More info: http://kubernetes.io/docs/user-guide/annotations
627 // +optional
628 map<string, string> annotations = 12;
629
630 // List of objects depended by this object. If ALL objects in the list have
631 // been deleted, this object will be garbage collected. If this object is managed by a controller,
632 // then an entry in this list will point to this controller, with the controller field set to true.
633 // There cannot be more than one managing controller.
634 // +optional
635 // +patchMergeKey=uid
636 // +patchStrategy=merge
637 repeated OwnerReference ownerReferences = 13;
638
639 // An initializer is a controller which enforces some system invariant at object creation time.
640 // This field is a list of initializers that have not yet acted on this object. If nil or empty,
641 // this object has been completely initialized. Otherwise, the object is considered uninitialized
642 // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
643 // observe uninitialized objects.
644 //
645 // When an object is created, the system will populate this list with the current set of initializers.
646 // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
647 // by any user.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500648 //
649 // DEPRECATED - initializers are an alpha field and will be removed in v1.15.
sslobodrd046be82019-01-16 10:02:22 -0500650 optional Initializers initializers = 16;
651
652 // Must be empty before the object is deleted from the registry. Each entry
653 // is an identifier for the responsible component that will remove the entry
654 // from the list. If the deletionTimestamp of the object is non-nil, entries
655 // in this list can only be removed.
656 // +optional
657 // +patchStrategy=merge
658 repeated string finalizers = 14;
659
660 // The name of the cluster which the object belongs to.
661 // This is used to distinguish resources with same name and namespace in different clusters.
662 // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
663 // +optional
664 optional string clusterName = 15;
Stephane Barbarie260a5632019-02-26 16:12:49 -0500665
666 // ManagedFields maps workflow-id and version to the set of fields
667 // that are managed by that workflow. This is mostly for internal
668 // housekeeping, and users typically shouldn't need to set or
669 // understand this field. A workflow can be the user's name, a
670 // controller's name, or the name of a specific apply path like
671 // "ci-cd". The set of fields is always in the version that the
672 // workflow used when modifying the object.
673 //
674 // This field is alpha and can be changed or removed without notice.
675 //
676 // +optional
677 repeated ManagedFieldsEntry managedFields = 17;
sslobodrd046be82019-01-16 10:02:22 -0500678}
679
680// OwnerReference contains enough information to let you identify an owning
681// object. An owning object must be in the same namespace as the dependent, or
682// be cluster-scoped, so there is no namespace field.
683message OwnerReference {
684 // API version of the referent.
685 optional string apiVersion = 5;
686
687 // Kind of the referent.
688 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
689 optional string kind = 1;
690
691 // Name of the referent.
692 // More info: http://kubernetes.io/docs/user-guide/identifiers#names
693 optional string name = 3;
694
695 // UID of the referent.
696 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
697 optional string uid = 4;
698
699 // If true, this reference points to the managing controller.
700 // +optional
701 optional bool controller = 6;
702
703 // If true, AND if the owner has the "foregroundDeletion" finalizer, then
704 // the owner cannot be deleted from the key-value store until this
705 // reference is removed.
706 // Defaults to false.
707 // To set this field, a user needs "delete" permission of the owner,
708 // otherwise 422 (Unprocessable Entity) will be returned.
709 // +optional
710 optional bool blockOwnerDeletion = 7;
711}
712
713// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
714message Patch {
715}
716
Stephane Barbarie260a5632019-02-26 16:12:49 -0500717// PatchOptions may be provided when patching an API object.
718// PatchOptions is meant to be a superset of UpdateOptions.
719message PatchOptions {
720 // When present, indicates that modifications should not be
721 // persisted. An invalid or unrecognized dryRun directive will
722 // result in an error response and no further processing of the
723 // request. Valid values are:
724 // - All: all dry run stages will be processed
725 // +optional
726 repeated string dryRun = 1;
727
728 // Force is going to "force" Apply requests. It means user will
729 // re-acquire conflicting fields owned by other people. Force
730 // flag must be unset for non-apply patch requests.
731 // +optional
732 optional bool force = 2;
733}
734
sslobodrd046be82019-01-16 10:02:22 -0500735// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
736message Preconditions {
737 // Specifies the target UID.
738 // +optional
739 optional string uid = 1;
740}
741
742// RootPaths lists the paths available at root.
743// For example: "/healthz", "/apis".
744message RootPaths {
745 // paths are the paths available at root.
746 repeated string paths = 1;
747}
748
749// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
750message ServerAddressByClientCIDR {
751 // The CIDR with which clients can match their IP to figure out the server address that they should use.
752 optional string clientCIDR = 1;
753
754 // Address of this server, suitable for a client that matches the above CIDR.
755 // This can be a hostname, hostname:port, IP or IP:port.
756 optional string serverAddress = 2;
757}
758
759// Status is a return value for calls that don't return other objects.
760message Status {
761 // Standard list metadata.
762 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
763 // +optional
764 optional ListMeta metadata = 1;
765
766 // Status of the operation.
767 // One of: "Success" or "Failure".
768 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
769 // +optional
770 optional string status = 2;
771
772 // A human-readable description of the status of this operation.
773 // +optional
774 optional string message = 3;
775
776 // A machine-readable description of why this operation is in the
777 // "Failure" status. If this value is empty there
778 // is no information available. A Reason clarifies an HTTP status
779 // code but does not override it.
780 // +optional
781 optional string reason = 4;
782
783 // Extended data associated with the reason. Each reason may define its
784 // own extended details. This field is optional and the data returned
785 // is not guaranteed to conform to any schema except that defined by
786 // the reason type.
787 // +optional
788 optional StatusDetails details = 5;
789
790 // Suggested HTTP return code for this status, 0 if not set.
791 // +optional
792 optional int32 code = 6;
793}
794
795// StatusCause provides more information about an api.Status failure, including
796// cases when multiple errors are encountered.
797message StatusCause {
798 // A machine-readable description of the cause of the error. If this value is
799 // empty there is no information available.
800 // +optional
801 optional string reason = 1;
802
803 // A human-readable description of the cause of the error. This field may be
804 // presented as-is to a reader.
805 // +optional
806 optional string message = 2;
807
808 // The field of the resource that has caused this error, as named by its JSON
809 // serialization. May include dot and postfix notation for nested attributes.
810 // Arrays are zero-indexed. Fields may appear more than once in an array of
811 // causes due to fields having multiple errors.
812 // Optional.
813 //
814 // Examples:
815 // "name" - the field "name" on the current resource
816 // "items[0].name" - the field "name" on the first array entry in "items"
817 // +optional
818 optional string field = 3;
819}
820
821// StatusDetails is a set of additional properties that MAY be set by the
822// server to provide additional information about a response. The Reason
823// field of a Status object defines what attributes will be set. Clients
824// must ignore fields that do not match the defined type of each attribute,
825// and should assume that any attribute may be empty, invalid, or under
826// defined.
827message StatusDetails {
828 // The name attribute of the resource associated with the status StatusReason
829 // (when there is a single name which can be described).
830 // +optional
831 optional string name = 1;
832
833 // The group attribute of the resource associated with the status StatusReason.
834 // +optional
835 optional string group = 2;
836
837 // The kind attribute of the resource associated with the status StatusReason.
838 // On some operations may differ from the requested resource Kind.
839 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
840 // +optional
841 optional string kind = 3;
842
843 // UID of the resource.
844 // (when there is a single resource which can be described).
845 // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
846 // +optional
847 optional string uid = 6;
848
849 // The Causes array includes more details associated with the StatusReason
850 // failure. Not all StatusReasons may provide detailed causes.
851 // +optional
852 repeated StatusCause causes = 4;
853
854 // If specified, the time in seconds before the operation should be retried. Some errors may indicate
855 // the client must take an alternate action - for those errors this field may indicate how long to wait
856 // before taking the alternate action.
857 // +optional
858 optional int32 retryAfterSeconds = 5;
859}
860
861// Time is a wrapper around time.Time which supports correct
862// marshaling to YAML and JSON. Wrappers are provided for many
863// of the factory methods that the time package offers.
864//
865// +protobuf.options.marshal=false
866// +protobuf.as=Timestamp
867// +protobuf.options.(gogoproto.goproto_stringer)=false
868message Time {
869 // Represents seconds of UTC time since Unix epoch
870 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
871 // 9999-12-31T23:59:59Z inclusive.
872 optional int64 seconds = 1;
873
874 // Non-negative fractions of a second at nanosecond resolution. Negative
875 // second values with fractions must still have non-negative nanos values
876 // that count forward in time. Must be from 0 to 999,999,999
877 // inclusive. This field may be limited in precision depending on context.
878 optional int32 nanos = 2;
879}
880
881// Timestamp is a struct that is equivalent to Time, but intended for
882// protobuf marshalling/unmarshalling. It is generated into a serialization
883// that matches Time. Do not use in Go structs.
884message Timestamp {
885 // Represents seconds of UTC time since Unix epoch
886 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
887 // 9999-12-31T23:59:59Z inclusive.
888 optional int64 seconds = 1;
889
890 // Non-negative fractions of a second at nanosecond resolution. Negative
891 // second values with fractions must still have non-negative nanos values
892 // that count forward in time. Must be from 0 to 999,999,999
893 // inclusive. This field may be limited in precision depending on context.
894 optional int32 nanos = 2;
895}
896
897// TypeMeta describes an individual object in an API response or request
898// with strings representing the type of the object and its API schema version.
899// Structures that are versioned or persisted should inline TypeMeta.
900//
901// +k8s:deepcopy-gen=false
902message TypeMeta {
903 // Kind is a string value representing the REST resource this object represents.
904 // Servers may infer this from the endpoint the client submits requests to.
905 // Cannot be updated.
906 // In CamelCase.
907 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
908 // +optional
909 optional string kind = 1;
910
911 // APIVersion defines the versioned schema of this representation of an object.
912 // Servers should convert recognized schemas to the latest internal value, and
913 // may reject unrecognized values.
914 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
915 // +optional
916 optional string apiVersion = 2;
917}
918
919// UpdateOptions may be provided when updating an API object.
Stephane Barbarie260a5632019-02-26 16:12:49 -0500920// All fields in UpdateOptions should also be present in PatchOptions.
sslobodrd046be82019-01-16 10:02:22 -0500921message UpdateOptions {
922 // When present, indicates that modifications should not be
923 // persisted. An invalid or unrecognized dryRun directive will
924 // result in an error response and no further processing of the
925 // request. Valid values are:
926 // - All: all dry run stages will be processed
927 // +optional
928 repeated string dryRun = 1;
929}
930
931// Verbs masks the value so protobuf can generate
932//
933// +protobuf.nullable=true
934// +protobuf.options.(gogoproto.goproto_stringer)=false
935message Verbs {
936 // items, if empty, will result in an empty slice
937
938 repeated string items = 1;
939}
940
941// Event represents a single event to a watched resource.
942//
943// +protobuf=true
944// +k8s:deepcopy-gen=true
945// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
946message WatchEvent {
947 optional string type = 1;
948
949 // Object is:
950 // * If Type is Added or Modified: the new state of the object.
951 // * If Type is Deleted: the state of the object immediately before deletion.
952 // * If Type is Error: *Status is recommended; other types may make sense
953 // depending on context.
954 optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2;
955}
956