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
423// ManagedFieldsEntry is a workflow-id, a FieldSet and the group
424// version of the resource that the fieldset applies to.
425#ManagedFieldsEntry: {
426 // APIVersion defines the version of this resource that this field
427 // set applies to. The format is "group/version" just like the
428 // top-level APIVersion field. It is necessary to track the
429 // version of a field set because it cannot be automatically
430 // converted.
431 "apiVersion"?: string
432
433 // FieldsType is the discriminator for the different fields format
434 // and version. There is currently only one possible value:
435 // "FieldsV1"
436 "fieldsType"?: string
437
438 // FieldsV1 holds the first JSON version format as described in
439 // the "FieldsV1" type.
440 "fieldsV1"?: #FieldsV1
441
442 // Manager is an identifier of the workflow managing these fields.
443 "manager"?: string
444
445 // Operation is the type of operation which lead to this
446 // ManagedFieldsEntry being created. The only valid values for
447 // this field are 'Apply' and 'Update'.
448 "operation"?: string
449
450 // Subresource is the name of the subresource used to update that
451 // object, or empty string if the object was updated through the
452 // main resource. The value of this field is used to distinguish
453 // between managers, even if they share the same name. For
454 // example, a status update will be distinct from a regular
455 // update using the same manager name. Note that the APIVersion
456 // field is not related to the Subresource field and it always
457 // corresponds to the version of the main resource.
458 "subresource"?: string
459
460 // Time is the timestamp of when the ManagedFields entry was
461 // added. The timestamp will also be updated if a field is added,
462 // the manager changes any of the owned fields value or removes a
463 // field. The timestamp does not update when a field is removed
464 // from the entry because another manager took it over.
465 "time"?: #Time
466}
467
468// MicroTime is version of Time with microsecond level precision.
469#MicroTime: time.Time
470
471// ObjectMeta is metadata that all persisted resources must have,
472// which includes all objects users must create.
473#ObjectMeta: {
474 // Annotations is an unstructured key value map stored with a
475 // resource that may be set by external tools to store and
476 // retrieve arbitrary metadata. They are not queryable and should
477 // be preserved when modifying objects. More info:
478 // https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
479 "annotations"?: [string]: string
480
481 // CreationTimestamp is a timestamp representing the server time
482 // when this object was created. It is not guaranteed to be set
483 // in happens-before order across separate operations. Clients
484 // may not set this value. It is represented in RFC3339 form and
485 // is in UTC.
486 //
487 // Populated by the system. Read-only. Null for lists. More info:
488 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
489 "creationTimestamp"?: #Time
490
491 // Number of seconds allowed for this object to gracefully
492 // terminate before it will be removed from the system. Only set
493 // when deletionTimestamp is also set. May only be shortened.
494 // Read-only.
495 "deletionGracePeriodSeconds"?: int64 & int
496
497 // DeletionTimestamp is RFC 3339 date and time at which this
498 // resource will be deleted. This field is set by the server when
499 // a graceful deletion is requested by the user, and is not
500 // directly settable by a client. The resource is expected to be
501 // deleted (no longer visible from resource lists, and not
502 // reachable by name) after the time in this field, once the
503 // finalizers list is empty. As long as the finalizers list
504 // contains items, deletion is blocked. Once the
505 // deletionTimestamp is set, this value may not be unset or be
506 // set further into the future, although it may be shortened or
507 // the resource may be deleted prior to this time. For example, a
508 // user may request that a pod is deleted in 30 seconds. The
509 // Kubelet will react by sending a graceful termination signal to
510 // the containers in the pod. After that 30 seconds, the Kubelet
511 // will send a hard termination signal (SIGKILL) to the container
512 // and after cleanup, remove the pod from the API. In the
513 // presence of network partitions, this object may still exist
514 // after this timestamp, until an administrator or automated
515 // process can determine the resource is fully terminated. If not
516 // set, graceful deletion of the object has not been requested.
517 //
518 // Populated by the system when a graceful deletion is requested.
519 // Read-only. More info:
520 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
521 "deletionTimestamp"?: #Time
522
523 // Must be empty before the object is deleted from the registry.
524 // Each entry is an identifier for the responsible component that
525 // will remove the entry from the list. If the deletionTimestamp
526 // of the object is non-nil, entries in this list can only be
527 // removed. Finalizers may be processed and removed in any order.
528 // Order is NOT enforced because it introduces significant risk
529 // of stuck finalizers. finalizers is a shared field, any actor
530 // with permission can reorder it. If the finalizer list is
531 // processed in order, then this can lead to a situation in which
532 // the component responsible for the first finalizer in the list
533 // is waiting for a signal (field value, external system, or
534 // other) produced by a component responsible for a finalizer
535 // later in the list, resulting in a deadlock. Without enforced
536 // ordering finalizers are free to order amongst themselves and
537 // are not vulnerable to ordering changes in the list.
538 "finalizers"?: [...string]
539
540 // GenerateName is an optional prefix, used by the server, to
541 // generate a unique name ONLY IF the Name field has not been
542 // provided. If this field is used, the name returned to the
543 // client will be different than the name passed. This value will
544 // also be combined with a unique suffix. The provided value has
545 // the same validation rules as the Name field, and may be
546 // truncated by the length of the suffix required to make the
547 // value unique on the server.
548 //
549 // If this field is specified and the generated name exists, the
550 // server will return a 409.
551 //
552 // Applied only if Name is not specified. More info:
553 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
554 "generateName"?: string
555
556 // A sequence number representing a specific generation of the
557 // desired state. Populated by the system. Read-only.
558 "generation"?: int64 & int
559
560 // Map of string keys and values that can be used to organize and
561 // categorize (scope and select) objects. May match selectors of
562 // replication controllers and services. More info:
563 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
564 "labels"?: {
565 [string]: string
566 }
567
568 // ManagedFields maps workflow-id and version to the set of fields
569 // that are managed by that workflow. This is mostly for internal
570 // housekeeping, and users typically shouldn't need to set or
571 // understand this field. A workflow can be the user's name, a
572 // controller's name, or the name of a specific apply path like
573 // "ci-cd". The set of fields is always in the version that the
574 // workflow used when modifying the object.
575 "managedFields"?: [...#ManagedFieldsEntry]
576
577 // Name must be unique within a namespace. Is required when
578 // creating resources, although some resources may allow a client
579 // to request the generation of an appropriate name
580 // automatically. Name is primarily intended for creation
581 // idempotence and configuration definition. Cannot be updated.
582 // More info:
583 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
584 "name"?: string
585
586 // Namespace defines the space within which each name must be
587 // unique. An empty namespace is equivalent to the "default"
588 // namespace, but "default" is the canonical representation. Not
589 // all objects are required to be scoped to a namespace - the
590 // value of this field for those objects will be empty.
591 //
592 // Must be a DNS_LABEL. Cannot be updated. More info:
593 // https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces
594 "namespace"?: string
595
596 // List of objects depended by this object. If ALL objects in the
597 // list have been deleted, this object will be garbage collected.
598 // If this object is managed by a controller, then an entry in
599 // this list will point to this controller, with the controller
600 // field set to true. There cannot be more than one managing
601 // controller.
602 "ownerReferences"?: [...#OwnerReference]
603
604 // An opaque value that represents the internal version of this
605 // object that can be used by clients to determine when objects
606 // have changed. May be used for optimistic concurrency, change
607 // detection, and the watch operation on a resource or set of
608 // resources. Clients must treat these values as opaque and
609 // passed unmodified back to the server. They may only be valid
610 // for a particular resource or set of resources.
611 //
612 // Populated by the system. Read-only. Value must be treated as
613 // opaque by clients and . More info:
614 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
615 "resourceVersion"?: string
616
617 // Deprecated: selfLink is a legacy read-only field that is no
618 // longer populated by the system.
619 "selfLink"?: string
620
621 // UID is the unique in time and space value for this object. It
622 // is typically generated by the server on successful creation of
623 // a resource and is not allowed to change on PUT operations.
624 //
625 // Populated by the system. Read-only. More info:
626 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
627 "uid"?: string
628}
629
630// OwnerReference contains enough information to let you identify
631// an owning object. An owning object must be in the same
632// namespace as the dependent, or be cluster-scoped, so there is
633// no namespace field.
634#OwnerReference: {
635 // API version of the referent.
636 "apiVersion"!: string
637
638 // If true, AND if the owner has the "foregroundDeletion"
639 // finalizer, then the owner cannot be deleted from the key-value
640 // store until this reference is removed. See
641 // https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion
642 // for how the garbage collector interacts with this field and
643 // enforces the foreground deletion. Defaults to false. To set
644 // this field, a user needs "delete" permission of the owner,
645 // otherwise 422 (Unprocessable Entity) will be returned.
646 "blockOwnerDeletion"?: bool
647
648 // If true, this reference points to the managing controller.
649 "controller"?: bool
650
651 // Kind of the referent. More info:
652 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
653 "kind"!: string
654
655 // Name of the referent. More info:
656 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
657 "name"!: string
658
659 // UID of the referent. More info:
660 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
661 "uid"!: string
662}
663
664// Patch is provided to give a concrete name and type to the
665// Kubernetes PATCH request body.
666#Patch: {}
667
668// Preconditions must be fulfilled before an operation (update,
669// delete, etc.) is carried out.
670#Preconditions: {
671 // Specifies the target ResourceVersion
672 "resourceVersion"?: string
673
674 // Specifies the target UID.
675 "uid"?: string
676}
677
678// ServerAddressByClientCIDR helps the client to determine the
679// server address that they should use, depending on the
680// clientCIDR that they match.
681#ServerAddressByClientCIDR: {
682 // The CIDR with which clients can match their IP to figure out
683 // the server address that they should use.
684 "clientCIDR"!: string
685
686 // Address of this server, suitable for a client that matches the
687 // above CIDR. This can be a hostname, hostname:port, IP or
688 // IP:port.
689 "serverAddress"!: string
690}
691
692// Status is a return value for calls that don't return other
693// objects.
694#Status: {
695 // APIVersion defines the versioned schema of this representation
696 // of an object. Servers should convert recognized schemas to the
697 // latest internal value, and may reject unrecognized values.
698 // More info:
699 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
700 "apiVersion": "v1"
701
702 // Suggested HTTP return code for this status, 0 if not set.
703 "code"?: int32 & int
704
705 // Extended data associated with the reason. Each reason may
706 // define its own extended details. This field is optional and
707 // the data returned is not guaranteed to conform to any schema
708 // except that defined by the reason type.
709 "details"?: #StatusDetails
710
711 // Kind is a string value representing the REST resource this
712 // object represents. Servers may infer this from the endpoint
713 // the client submits requests to. Cannot be updated. In
714 // CamelCase. More info:
715 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
716 "kind": "Status"
717
718 // A human-readable description of the status of this operation.
719 "message"?: string
720
721 // Standard list metadata. More info:
722 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
723 "metadata"?: #ListMeta
724
725 // A machine-readable description of why this operation is in the
726 // "Failure" status. If this value is empty there is no
727 // information available. A Reason clarifies an HTTP status code
728 // but does not override it.
729 "reason"?: string
730
731 // Status of the operation. One of: "Success" or "Failure". More
732 // info:
733 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
734 "status"?: string
735}
736
737// StatusCause provides more information about an api.Status
738// failure, including cases when multiple errors are encountered.
739#StatusCause: {
740 // The field of the resource that has caused this error, as named
741 // by its JSON serialization. May include dot and postfix
742 // notation for nested attributes. Arrays are zero-indexed.
743 // Fields may appear more than once in an array of causes due to
744 // fields having multiple errors. Optional.
745 //
746 // Examples:
747 // "name" - the field "name" on the current resource
748 // "items[0].name" - the field "name" on the first array entry in
749 // "items"
750 "field"?: string
751
752 // A human-readable description of the cause of the error. This
753 // field may be presented as-is to a reader.
754 "message"?: string
755
756 // A machine-readable description of the cause of the error. If
757 // this value is empty there is no information available.
758 "reason"?: string
759}
760
761// StatusDetails is a set of additional properties that MAY be set
762// by the server to provide additional information about a
763// response. The Reason field of a Status object defines what
764// attributes will be set. Clients must ignore fields that do not
765// match the defined type of each attribute, and should assume
766// that any attribute may be empty, invalid, or under defined.
767#StatusDetails: {
768 // The Causes array includes more details associated with the
769 // StatusReason failure. Not all StatusReasons may provide
770 // detailed causes.
771 "causes"?: [...#StatusCause]
772
773 // The group attribute of the resource associated with the status
774 // StatusReason.
775 "group"?: string
776
777 // The kind attribute of the resource associated with the status
778 // StatusReason. On some operations may differ from the requested
779 // resource Kind. More info:
780 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
781 "kind"?: string
782
783 // The name attribute of the resource associated with the status
784 // StatusReason (when there is a single name which can be
785 // described).
786 "name"?: string
787
788 // If specified, the time in seconds before the operation should
789 // be retried. Some errors may indicate the client must take an
790 // alternate action - for those errors this field may indicate
791 // how long to wait before taking the alternate action.
792 "retryAfterSeconds"?: int32 & int
793
794 // UID of the resource. (when there is a single resource which can
795 // be described). More info:
796 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
797 "uid"?: string
798}
799
800// Time is a wrapper around time.Time which supports correct
801// marshaling to YAML and JSON. Wrappers are provided for many of
802// the factory methods that the time package offers.
803#Time: time.Time
804
805// Event represents a single event to a watched resource.
806#WatchEvent: {
807 // Object is:
808 // * If Type is Added or Modified: the new state of the object.
809 // * If Type is Deleted: the state of the object immediately
810 // before deletion.
811 // * If Type is Error: *Status is recommended; other types may
812 // make sense
813 // depending on context.
814 "object"!: runtime.#RawExtension
815 "type"!: string
816}