1package v1
2
3import (
4 "time"
5 "cue.dev/x/k8s.io/apimachinery/pkg/runtime"
6)
7
8// APIGroup contains the name, the supported versions, and the
9// preferred version of a group.
10#APIGroup: {
11 // APIVersion defines the versioned schema of this representation
12 // of an object. Servers should convert recognized schemas to the
13 // latest internal value, and may reject unrecognized values.
14 // More info:
15 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
16 "apiVersion": "v1"
17
18 // Kind is a string value representing the REST resource this
19 // object represents. Servers may infer this from the endpoint
20 // the client submits requests to. Cannot be updated. In
21 // CamelCase. More info:
22 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
23 "kind": "APIGroup"
24
25 // name is the name of the group.
26 "name"!: string
27
28 // preferredVersion is the version preferred by the API server,
29 // which probably is the storage version.
30 "preferredVersion"?: #GroupVersionForDiscovery
31
32 // a map of client CIDR to server address that is serving this
33 // group. This is to help clients reach servers in the most
34 // network-efficient way possible. Clients can use the
35 // appropriate server address as per the CIDR that they match. In
36 // case of multiple matches, clients should use the longest
37 // matching CIDR. The server returns only those CIDRs that it
38 // thinks that the client can match. For example: the master will
39 // return an internal IP CIDR only, if the client reaches the
40 // server using an internal IP. Server looks at X-Forwarded-For
41 // header or X-Real-Ip header or request.RemoteAddr (in that
42 // order) to get the client IP.
43 "serverAddressByClientCIDRs"?: [...#ServerAddressByClientCIDR]
44
45 // versions are the versions supported in this group.
46 "versions"!: [...#GroupVersionForDiscovery]
47}
48
49// APIGroupList is a list of APIGroup, to allow clients to
50// discover the API at /apis.
51#APIGroupList: {
52 // APIVersion defines the versioned schema of this representation
53 // of an object. Servers should convert recognized schemas to the
54 // latest internal value, and may reject unrecognized values.
55 // More info:
56 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
57 "apiVersion": "v1"
58
59 // groups is a list of APIGroup.
60 "groups"!: [...#APIGroup]
61
62 // Kind is a string value representing the REST resource this
63 // object represents. Servers may infer this from the endpoint
64 // the client submits requests to. Cannot be updated. In
65 // CamelCase. More info:
66 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
67 "kind": "APIGroupList"
68}
69
70// APIResource specifies the name of a resource and whether it is
71// namespaced.
72#APIResource: {
73 // categories is a list of the grouped resources this resource
74 // belongs to (e.g. 'all')
75 "categories"?: [...string]
76
77 // group is the preferred group of the resource. Empty implies the
78 // group of the containing resource list. For subresources, this
79 // may have a different value, for example: Scale".
80 "group"?: string
81
82 // kind is the kind for the resource (e.g. 'Foo' is the kind for a
83 // resource 'foo')
84 "kind"!: string
85
86 // name is the plural name of the resource.
87 "name"!: string
88
89 // namespaced indicates if a resource is namespaced or not.
90 "namespaced"!: bool
91
92 // shortNames is a list of suggested short names of the resource.
93 "shortNames"?: [...string]
94
95 // singularName is the singular name of the resource. This allows
96 // clients to handle plural and singular opaquely. The
97 // singularName is more correct for reporting status on a single
98 // item and both singular and plural are allowed from the kubectl
99 // CLI interface.
100 "singularName"!: string
101
102 // The hash value of the storage version, the version this
103 // resource is converted to when written to the data store. Value
104 // must be treated as opaque by clients. Only equality comparison
105 // on the value is valid. This is an alpha feature and may change
106 // or be removed in the future. The field is populated by the
107 // apiserver only if the StorageVersionHash feature gate is
108 // enabled. This field will remain optional even if it graduates.
109 "storageVersionHash"?: string
110
111 // verbs is a list of supported kube verbs (this includes get,
112 // list, watch, create, update, patch, delete, deletecollection,
113 // and proxy)
114 "verbs"!: [...string]
115
116 // version is the preferred version of the resource. Empty implies
117 // the version of the containing resource list For subresources,
118 // this may have a different value, for example: v1 (while inside
119 // a v1beta1 version of the core resource's group)".
120 "version"?: string
121}
122
123// APIResourceList is a list of APIResource, it is used to expose
124// the name of the resources supported in a specific group and
125// version, and if the resource is namespaced.
126#APIResourceList: {
127 // APIVersion defines the versioned schema of this representation
128 // of an object. Servers should convert recognized schemas to the
129 // latest internal value, and may reject unrecognized values.
130 // More info:
131 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
132 "apiVersion": "v1"
133
134 // groupVersion is the group and version this APIResourceList is
135 // for.
136 "groupVersion"!: string
137
138 // Kind is a string value representing the REST resource this
139 // object represents. Servers may infer this from the endpoint
140 // the client submits requests to. Cannot be updated. In
141 // CamelCase. More info:
142 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
143 "kind": "APIResourceList"
144
145 // resources contains the name of the resources and if they are
146 // namespaced.
147 "resources"!: [...#APIResource]
148}
149
150// APIVersions lists the versions that are available, to allow
151// clients to discover the API at /api, which is the root path of
152// the legacy v1 API.
153#APIVersions: {
154 // APIVersion defines the versioned schema of this representation
155 // of an object. Servers should convert recognized schemas to the
156 // latest internal value, and may reject unrecognized values.
157 // More info:
158 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
159 "apiVersion": "v1"
160
161 // Kind is a string value representing the REST resource this
162 // object represents. Servers may infer this from the endpoint
163 // the client submits requests to. Cannot be updated. In
164 // CamelCase. More info:
165 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
166 "kind": "APIVersions"
167
168 // a map of client CIDR to server address that is serving this
169 // group. This is to help clients reach servers in the most
170 // network-efficient way possible. Clients can use the
171 // appropriate server address as per the CIDR that they match. In
172 // case of multiple matches, clients should use the longest
173 // matching CIDR. The server returns only those CIDRs that it
174 // thinks that the client can match. For example: the master will
175 // return an internal IP CIDR only, if the client reaches the
176 // server using an internal IP. Server looks at X-Forwarded-For
177 // header or X-Real-Ip header or request.RemoteAddr (in that
178 // order) to get the client IP.
179 "serverAddressByClientCIDRs"!: [...#ServerAddressByClientCIDR]
180
181 // versions are the api versions that are available.
182 "versions"!: [...string]
183}
184
185// Condition contains details for one aspect of the current state
186// of this API Resource.
187#Condition: {
188 // lastTransitionTime is the last time the condition transitioned
189 // from one status to another. This should be when the underlying
190 // condition changed. If that is not known, then using the time
191 // when the API field changed is acceptable.
192 "lastTransitionTime"!: #Time
193
194 // message is a human readable message indicating details about
195 // the transition. This may be an empty string.
196 "message"!: string
197
198 // observedGeneration represents the .metadata.generation that the
199 // condition was set based upon. For instance, if
200 // .metadata.generation is currently 12, but the
201 // .status.conditions[x].observedGeneration is 9, the condition
202 // is out of date with respect to the current state of the
203 // instance.
204 "observedGeneration"?: int64 & int
205
206 // reason contains a programmatic identifier indicating the reason
207 // for the condition's last transition. Producers of specific
208 // condition types may define expected values and meanings for
209 // this field, and whether the values are considered a guaranteed
210 // API. The value should be a CamelCase string. This field may
211 // not be empty.
212 "reason"!: string
213
214 // status of the condition, one of True, False, Unknown.
215 "status"!: string
216
217 // type of condition in CamelCase or in foo.example.com/CamelCase.
218 "type"!: string
219}
220
221// DeleteOptions may be provided when deleting an API object.
222#DeleteOptions: {
223 // APIVersion defines the versioned schema of this representation
224 // of an object. Servers should convert recognized schemas to the
225 // latest internal value, and may reject unrecognized values.
226 // More info:
227 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
228 "apiVersion"?: string
229
230 // When present, indicates that modifications should not be
231 // persisted. An invalid or unrecognized dryRun directive will
232 // result in an error response and no further processing of the
233 // request. Valid values are: - All: all dry run stages will be
234 // processed
235 "dryRun"?: [...string]
236
237 // The duration in seconds before the object should be deleted.
238 // Value must be non-negative integer. The value zero indicates
239 // delete immediately. If this value is nil, the default grace
240 // period for the specified type will be used. Defaults to a per
241 // object value if not specified. zero means delete immediately.
242 "gracePeriodSeconds"?: int64 & int
243
244 // if set to true, it will trigger an unsafe deletion of the
245 // resource in case the normal deletion flow fails with a corrupt
246 // object error. A resource is considered corrupt if it can not
247 // be retrieved from the underlying storage successfully because
248 // of a) its data can not be transformed e.g. decryption failure,
249 // or b) it fails to decode into an object. NOTE: unsafe deletion
250 // ignores finalizer constraints, skips precondition checks, and
251 // removes the object from the storage. WARNING: This may
252 // potentially break the cluster if the workload associated with
253 // the resource being unsafe-deleted relies on normal deletion
254 // flow. Use only if you REALLY know what you are doing. The
255 // default value is false, and the user must opt in to enable it
256 "ignoreStoreReadErrorWithClusterBreakingPotential"?: bool
257
258 // Kind is a string value representing the REST resource this
259 // object represents. Servers may infer this from the endpoint
260 // the client submits requests to. Cannot be updated. In
261 // CamelCase. More info:
262 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
263 "kind"?: string
264
265 // Deprecated: please use the PropagationPolicy, this field will
266 // be deprecated in 1.7. Should the dependent objects be
267 // orphaned. If true/false, the "orphan" finalizer will be added
268 // to/removed from the object's finalizers list. Either this
269 // field or PropagationPolicy may be set, but not both.
270 "orphanDependents"?: bool
271
272 // Must be fulfilled before a deletion is carried out. If not
273 // possible, a 409 Conflict status will be returned.
274 "preconditions"?: #Preconditions
275
276 // Whether and how garbage collection will be performed. Either
277 // this field or OrphanDependents may be set, but not both. The
278 // default policy is decided by the existing finalizer set in the
279 // metadata.finalizers and the resource-specific default policy.
280 // Acceptable values are: 'Orphan' - orphan the dependents;
281 // 'Background' - allow the garbage collector to delete the
282 // dependents in the background; 'Foreground' - a cascading
283 // policy that deletes all dependents in the foreground.
284 "propagationPolicy"?: string
285}
286
287// FieldSelectorRequirement is a selector that contains values, a
288// key, and an operator that relates the key and values.
289#FieldSelectorRequirement: {
290 // key is the field selector key that the requirement applies to.
291 "key"!: string
292
293 // operator represents a key's relationship to a set of values.
294 // Valid operators are In, NotIn, Exists, DoesNotExist. The list
295 // of operators may grow in the future.
296 "operator"!: string
297
298 // values is an array of string values. If the operator is In or
299 // NotIn, the values array must be non-empty. If the operator is
300 // Exists or DoesNotExist, the values array must be empty.
301 "values"?: [...string]
302}
303
304// FieldsV1 stores a set of fields in a data structure like a
305// Trie, in JSON format.
306//
307// Each key is either a '.' representing the field itself, and
308// will always map to an empty set, or a string representing a
309// sub-field or item. The string will follow one of these four
310// formats: 'f:<name>', where <name> is the name of a field in a
311// struct, or key in a map 'v:<value>', where <value> is the
312// exact json formatted value of a list item 'i:<index>', where
313// <index> is position of a item in a list 'k:<keys>', where
314// <keys> is a map of a list item's key fields to their unique
315// values If a key maps to an empty Fields value, the field that
316// key represents is part of the set.
317//
318// The exact format is defined in
319// sigs.k8s.io/structured-merge-diff
320#FieldsV1: {}
321
322// GroupResource specifies a Group and a Resource, but does not
323// force a version. This is useful for identifying concepts
324// during lookup stages without having partially valid types
325#GroupResource: {
326 "group"!: string
327 "resource"!: string
328}
329
330// GroupVersion contains the "group/version" and "version" string
331// of a version. It is made a struct to keep extensibility.
332#GroupVersionForDiscovery: {
333 // groupVersion specifies the API group and version in the form
334 // "group/version"
335 "groupVersion"!: string
336
337 // version specifies the version in the form of "version". This is
338 // to save the clients the trouble of splitting the GroupVersion.
339 "version"!: string
340}
341
342// A label selector is a label query over a set of resources. The
343// result of matchLabels and matchExpressions are ANDed. An empty
344// label selector matches all objects. A null label selector
345// matches no objects.
346#LabelSelector: {
347 // matchExpressions is a list of label selector requirements. The
348 // requirements are ANDed.
349 "matchExpressions"?: [...#LabelSelectorRequirement]
350
351 // matchLabels is a map of {key,value} pairs. A single {key,value}
352 // in the matchLabels map is equivalent to an element of
353 // matchExpressions, whose key field is "key", the operator is
354 // "In", and the values array contains only "value". The
355 // requirements are ANDed.
356 "matchLabels"?: {
357 [string]: string
358 }
359}
360
361// A label selector requirement is a selector that contains
362// values, a key, and an operator that relates the key and
363// values.
364#LabelSelectorRequirement: {
365 // key is the label key that the selector applies to.
366 "key"!: string
367
368 // operator represents a key's relationship to a set of values.
369 // Valid operators are In, NotIn, Exists and DoesNotExist.
370 "operator"!: string
371
372 // values is an array of string values. If the operator is In or
373 // NotIn, the values array must be non-empty. If the operator is
374 // Exists or DoesNotExist, the values array must be empty. This
375 // array is replaced during a strategic merge patch.
376 "values"?: [...string]
377}
378
379// ListMeta describes metadata that synthetic resources must have,
380// including lists and various status objects. A resource may
381// have only one of {ObjectMeta, ListMeta}.
382#ListMeta: {
383 // continue may be set if the user set a limit on the number of
384 // items returned, and indicates that the server has more data
385 // available. The value is opaque and may be used to issue
386 // another request to the endpoint that served this list to
387 // retrieve the next set of available objects. Continuing a
388 // consistent list may not be possible if the server
389 // configuration has changed or more than a few minutes have
390 // passed. The resourceVersion field returned when using this
391 // continue value will be identical to the value in the first
392 // response, unless you have received this token from an error
393 // message.
394 "continue"?: string
395
396 // remainingItemCount is the number of subsequent items in the
397 // list which are not included in this list response. If the list
398 // request contained label or field selectors, then the number of
399 // remaining items is unknown and the field will be left unset
400 // and omitted during serialization. If the list is complete
401 // (either because it is not chunking or because this is the last
402 // chunk), then there are no more remaining items and this field
403 // will be left unset and omitted during serialization. Servers
404 // older than v1.15 do not set this field. The intended use of
405 // the remainingItemCount is *estimating* the size of a
406 // collection. Clients should not rely on the remainingItemCount
407 // to be set or to be exact.
408 "remainingItemCount"?: int64 & int
409
410 // String that identifies the server's internal version of this
411 // object that can be used by clients to determine when objects
412 // have changed. Value must be treated as opaque by clients and
413 // passed unmodified back to the server. Populated by the system.
414 // Read-only. More info:
415 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
416 "resourceVersion"?: string
417
418 // Deprecated: selfLink is a legacy read-only field that is no
419 // longer populated by the system.
420 "selfLink"?: string
421
422 // shardInfo is set when the list is a filtered subset of the full
423 // collection, as selected by a shard selector on the request. It
424 // echoes back the selector so clients can verify which shard
425 // they received and merge sharded responses. Clients should not
426 // cache sharded list responses as a full representation of the
427 // collection.
428 //
429 // This is an alpha field and requires enabling the
430 // ShardedListAndWatch feature gate.
431 "shardInfo"?: #ShardInfo
432}
433
434// ManagedFieldsEntry is a workflow-id, a FieldSet and the group
435// version of the resource that the fieldset applies to.
436#ManagedFieldsEntry: {
437 // APIVersion defines the version of this resource that this field
438 // set applies to. The format is "group/version" just like the
439 // top-level APIVersion field. It is necessary to track the
440 // version of a field set because it cannot be automatically
441 // converted.
442 "apiVersion"?: string
443
444 // FieldsType is the discriminator for the different fields format
445 // and version. There is currently only one possible value:
446 // "FieldsV1"
447 "fieldsType"?: string
448
449 // FieldsV1 holds the first JSON version format as described in
450 // the "FieldsV1" type.
451 "fieldsV1"?: #FieldsV1
452
453 // Manager is an identifier of the workflow managing these fields.
454 "manager"?: string
455
456 // Operation is the type of operation which lead to this
457 // ManagedFieldsEntry being created. The only valid values for
458 // this field are 'Apply' and 'Update'.
459 "operation"?: string
460
461 // Subresource is the name of the subresource used to update that
462 // object, or empty string if the object was updated through the
463 // main resource. The value of this field is used to distinguish
464 // between managers, even if they share the same name. For
465 // example, a status update will be distinct from a regular
466 // update using the same manager name. Note that the APIVersion
467 // field is not related to the Subresource field and it always
468 // corresponds to the version of the main resource.
469 "subresource"?: string
470
471 // Time is the timestamp of when the ManagedFields entry was
472 // added. The timestamp will also be updated if a field is added,
473 // the manager changes any of the owned fields value or removes a
474 // field. The timestamp does not update when a field is removed
475 // from the entry because another manager took it over.
476 "time"?: #Time
477}
478
479// MicroTime is version of Time with microsecond level precision.
480#MicroTime: time.Time
481
482// ObjectMeta is metadata that all persisted resources must have,
483// which includes all objects users must create.
484#ObjectMeta: {
485 // Annotations is an unstructured key value map stored with a
486 // resource that may be set by external tools to store and
487 // retrieve arbitrary metadata. They are not queryable and should
488 // be preserved when modifying objects. More info:
489 // https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
490 "annotations"?: [string]: string
491
492 // CreationTimestamp is a timestamp representing the server time
493 // when this object was created. It is not guaranteed to be set
494 // in happens-before order across separate operations. Clients
495 // may not set this value. It is represented in RFC3339 form and
496 // is in UTC.
497 //
498 // Populated by the system. Read-only. Null for lists. More info:
499 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
500 "creationTimestamp"?: #Time
501
502 // Number of seconds allowed for this object to gracefully
503 // terminate before it will be removed from the system. Only set
504 // when deletionTimestamp is also set. May only be shortened.
505 // Read-only.
506 "deletionGracePeriodSeconds"?: int64 & int
507
508 // DeletionTimestamp is RFC 3339 date and time at which this
509 // resource will be deleted. This field is set by the server when
510 // a graceful deletion is requested by the user, and is not
511 // directly settable by a client. The resource is expected to be
512 // deleted (no longer visible from resource lists, and not
513 // reachable by name) after the time in this field, once the
514 // finalizers list is empty. As long as the finalizers list
515 // contains items, deletion is blocked. Once the
516 // deletionTimestamp is set, this value may not be unset or be
517 // set further into the future, although it may be shortened or
518 // the resource may be deleted prior to this time. For example, a
519 // user may request that a pod is deleted in 30 seconds. The
520 // Kubelet will react by sending a graceful termination signal to
521 // the containers in the pod. After that 30 seconds, the Kubelet
522 // will send a hard termination signal (SIGKILL) to the container
523 // and after cleanup, remove the pod from the API. In the
524 // presence of network partitions, this object may still exist
525 // after this timestamp, until an administrator or automated
526 // process can determine the resource is fully terminated. If not
527 // set, graceful deletion of the object has not been requested.
528 //
529 // Populated by the system when a graceful deletion is requested.
530 // Read-only. More info:
531 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
532 "deletionTimestamp"?: #Time
533
534 // Must be empty before the object is deleted from the registry.
535 // Each entry is an identifier for the responsible component that
536 // will remove the entry from the list. If the deletionTimestamp
537 // of the object is non-nil, entries in this list can only be
538 // removed. Finalizers may be processed and removed in any order.
539 // Order is NOT enforced because it introduces significant risk
540 // of stuck finalizers. finalizers is a shared field, any actor
541 // with permission can reorder it. If the finalizer list is
542 // processed in order, then this can lead to a situation in which
543 // the component responsible for the first finalizer in the list
544 // is waiting for a signal (field value, external system, or
545 // other) produced by a component responsible for a finalizer
546 // later in the list, resulting in a deadlock. Without enforced
547 // ordering finalizers are free to order amongst themselves and
548 // are not vulnerable to ordering changes in the list.
549 "finalizers"?: [...string]
550
551 // GenerateName is an optional prefix, used by the server, to
552 // generate a unique name ONLY IF the Name field has not been
553 // provided. If this field is used, the name returned to the
554 // client will be different than the name passed. This value will
555 // also be combined with a unique suffix. The provided value has
556 // the same validation rules as the Name field, and may be
557 // truncated by the length of the suffix required to make the
558 // value unique on the server.
559 //
560 // If this field is specified and the generated name exists, the
561 // server will return a 409.
562 //
563 // Applied only if Name is not specified. More info:
564 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
565 "generateName"?: string
566
567 // A sequence number representing a specific generation of the
568 // desired state. Populated by the system. Read-only.
569 "generation"?: int64 & int
570
571 // Map of string keys and values that can be used to organize and
572 // categorize (scope and select) objects. May match selectors of
573 // replication controllers and services. More info:
574 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
575 "labels"?: {
576 [string]: string
577 }
578
579 // ManagedFields maps workflow-id and version to the set of fields
580 // that are managed by that workflow. This is mostly for internal
581 // housekeeping, and users typically shouldn't need to set or
582 // understand this field. A workflow can be the user's name, a
583 // controller's name, or the name of a specific apply path like
584 // "ci-cd". The set of fields is always in the version that the
585 // workflow used when modifying the object.
586 "managedFields"?: [...#ManagedFieldsEntry]
587
588 // Name must be unique within a namespace. Is required when
589 // creating resources, although some resources may allow a client
590 // to request the generation of an appropriate name
591 // automatically. Name is primarily intended for creation
592 // idempotence and configuration definition. Cannot be updated.
593 // More info:
594 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
595 "name"?: string
596
597 // Namespace defines the space within which each name must be
598 // unique. An empty namespace is equivalent to the "default"
599 // namespace, but "default" is the canonical representation. Not
600 // all objects are required to be scoped to a namespace - the
601 // value of this field for those objects will be empty.
602 //
603 // Must be a DNS_LABEL. Cannot be updated. More info:
604 // https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces
605 "namespace"?: string
606
607 // List of objects depended by this object. If ALL objects in the
608 // list have been deleted, this object will be garbage collected.
609 // If this object is managed by a controller, then an entry in
610 // this list will point to this controller, with the controller
611 // field set to true. There cannot be more than one managing
612 // controller.
613 "ownerReferences"?: [...#OwnerReference]
614
615 // An opaque value that represents the internal version of this
616 // object that can be used by clients to determine when objects
617 // have changed. May be used for optimistic concurrency, change
618 // detection, and the watch operation on a resource or set of
619 // resources. Clients must treat these values as opaque and
620 // passed unmodified back to the server. They may only be valid
621 // for a particular resource or set of resources.
622 //
623 // Populated by the system. Read-only. Value must be treated as
624 // opaque by clients and . More info:
625 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
626 "resourceVersion"?: string
627
628 // Deprecated: selfLink is a legacy read-only field that is no
629 // longer populated by the system.
630 "selfLink"?: string
631
632 // UID is the unique in time and space value for this object. It
633 // is typically generated by the server on successful creation of
634 // a resource and is not allowed to change on PUT operations.
635 //
636 // Populated by the system. Read-only. More info:
637 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
638 "uid"?: string
639}
640
641// OwnerReference contains enough information to let you identify
642// an owning object. An owning object must be in the same
643// namespace as the dependent, or be cluster-scoped, so there is
644// no namespace field.
645#OwnerReference: {
646 // API version of the referent.
647 "apiVersion"!: string
648
649 // If true, AND if the owner has the "foregroundDeletion"
650 // finalizer, then the owner cannot be deleted from the key-value
651 // store until this reference is removed. See
652 // https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion
653 // for how the garbage collector interacts with this field and
654 // enforces the foreground deletion. Defaults to false. To set
655 // this field, a user needs "delete" permission of the owner,
656 // otherwise 422 (Unprocessable Entity) will be returned.
657 "blockOwnerDeletion"?: bool
658
659 // If true, this reference points to the managing controller.
660 "controller"?: bool
661
662 // Kind of the referent. More info:
663 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
664 "kind"!: string
665
666 // Name of the referent. More info:
667 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
668 "name"!: string
669
670 // UID of the referent. More info:
671 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
672 "uid"!: string
673}
674
675// Patch is provided to give a concrete name and type to the
676// Kubernetes PATCH request body.
677#Patch: {}
678
679// Preconditions must be fulfilled before an operation (update,
680// delete, etc.) is carried out.
681#Preconditions: {
682 // Specifies the target ResourceVersion
683 "resourceVersion"?: string
684
685 // Specifies the target UID.
686 "uid"?: string
687}
688
689// ServerAddressByClientCIDR helps the client to determine the
690// server address that they should use, depending on the
691// clientCIDR that they match.
692#ServerAddressByClientCIDR: {
693 // The CIDR with which clients can match their IP to figure out
694 // the server address that they should use.
695 "clientCIDR"!: string
696
697 // Address of this server, suitable for a client that matches the
698 // above CIDR. This can be a hostname, hostname:port, IP or
699 // IP:port.
700 "serverAddress"!: string
701}
702
703// ShardInfo describes the shard selector that was applied to
704// produce a list response. Its presence on a list response
705// indicates the list is a filtered subset.
706#ShardInfo: {
707 // selector is the shard selector string from the request, echoed
708 // back so clients can verify which shard they received and merge
709 // responses from multiple shards.
710 "selector"!: string
711}
712
713// Status is a return value for calls that don't return other
714// objects.
715#Status: {
716 // APIVersion defines the versioned schema of this representation
717 // of an object. Servers should convert recognized schemas to the
718 // latest internal value, and may reject unrecognized values.
719 // More info:
720 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
721 "apiVersion": "v1"
722
723 // Suggested HTTP return code for this status, 0 if not set.
724 "code"?: int32 & int
725
726 // Extended data associated with the reason. Each reason may
727 // define its own extended details. This field is optional and
728 // the data returned is not guaranteed to conform to any schema
729 // except that defined by the reason type.
730 "details"?: #StatusDetails
731
732 // Kind is a string value representing the REST resource this
733 // object represents. Servers may infer this from the endpoint
734 // the client submits requests to. Cannot be updated. In
735 // CamelCase. More info:
736 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
737 "kind": "Status"
738
739 // A human-readable description of the status of this operation.
740 "message"?: string
741
742 // Standard list metadata. More info:
743 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
744 "metadata"?: #ListMeta
745
746 // A machine-readable description of why this operation is in the
747 // "Failure" status. If this value is empty there is no
748 // information available. A Reason clarifies an HTTP status code
749 // but does not override it.
750 "reason"?: string
751
752 // Status of the operation. One of: "Success" or "Failure". More
753 // info:
754 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
755 "status"?: string
756}
757
758// StatusCause provides more information about an api.Status
759// failure, including cases when multiple errors are encountered.
760#StatusCause: {
761 // The field of the resource that has caused this error, as named
762 // by its JSON serialization. May include dot and postfix
763 // notation for nested attributes. Arrays are zero-indexed.
764 // Fields may appear more than once in an array of causes due to
765 // fields having multiple errors. Optional.
766 //
767 // Examples:
768 // "name" - the field "name" on the current resource
769 // "items[0].name" - the field "name" on the first array entry in
770 // "items"
771 "field"?: string
772
773 // A human-readable description of the cause of the error. This
774 // field may be presented as-is to a reader.
775 "message"?: string
776
777 // A machine-readable description of the cause of the error. If
778 // this value is empty there is no information available.
779 "reason"?: string
780}
781
782// StatusDetails is a set of additional properties that MAY be set
783// by the server to provide additional information about a
784// response. The Reason field of a Status object defines what
785// attributes will be set. Clients must ignore fields that do not
786// match the defined type of each attribute, and should assume
787// that any attribute may be empty, invalid, or under defined.
788#StatusDetails: {
789 // The Causes array includes more details associated with the
790 // StatusReason failure. Not all StatusReasons may provide
791 // detailed causes.
792 "causes"?: [...#StatusCause]
793
794 // The group attribute of the resource associated with the status
795 // StatusReason.
796 "group"?: string
797
798 // The kind attribute of the resource associated with the status
799 // StatusReason. On some operations may differ from the requested
800 // resource Kind. More info:
801 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
802 "kind"?: string
803
804 // The name attribute of the resource associated with the status
805 // StatusReason (when there is a single name which can be
806 // described).
807 "name"?: string
808
809 // If specified, the time in seconds before the operation should
810 // be retried. Some errors may indicate the client must take an
811 // alternate action - for those errors this field may indicate
812 // how long to wait before taking the alternate action.
813 "retryAfterSeconds"?: int32 & int
814
815 // UID of the resource. (when there is a single resource which can
816 // be described). More info:
817 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
818 "uid"?: string
819}
820
821// Time is a wrapper around time.Time which supports correct
822// marshaling to YAML and JSON. Wrappers are provided for many of
823// the factory methods that the time package offers.
824#Time: time.Time
825
826// Event represents a single event to a watched resource.
827#WatchEvent: {
828 // Object is:
829 // * If Type is Added or Modified: the new state of the object.
830 // * If Type is Deleted: the state of the object immediately
831 // before deletion.
832 // * If Type is Error: *Status is recommended; other types may
833 // make sense
834 // depending on context.
835 "object"!: runtime.#RawExtension
836 "type"!: string
837}