cue.dev/x/k8s.io@v0.8.0

api/storage/v1/schema.cue raw

  1package v1
  2
  3import (
  4	"cue.dev/x/k8s.io/apimachinery/pkg/apis/meta/v1"
  5	"cue.dev/x/k8s.io/apimachinery/pkg/api/resource"
  6	v1_9 "cue.dev/x/k8s.io/api/core/v1"
  7)
  8
  9// CSIDriver captures information about a Container Storage
 10// Interface (CSI) volume driver deployed on the cluster.
 11// Kubernetes attach detach controller uses this object to
 12// determine whether attach is required. Kubelet uses this object
 13// to determine whether pod information needs to be passed on
 14// mount. CSIDriver objects are non-namespaced.
 15#CSIDriver: {
 16	// APIVersion defines the versioned schema of this representation
 17	// of an object. Servers should convert recognized schemas to the
 18	// latest internal value, and may reject unrecognized values.
 19	// More info:
 20	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 21	"apiVersion": "storage.k8s.io/v1"
 22
 23	// Kind is a string value representing the REST resource this
 24	// object represents. Servers may infer this from the endpoint
 25	// the client submits requests to. Cannot be updated. In
 26	// CamelCase. More info:
 27	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 28	"kind": "CSIDriver"
 29
 30	// Standard object metadata. metadata.Name indicates the name of
 31	// the CSI driver that this object refers to; it MUST be the same
 32	// name returned by the CSI GetPluginName() call for that driver.
 33	// The driver name must be 63 characters or less, beginning and
 34	// ending with an alphanumeric character ([a-z0-9A-Z]) with
 35	// dashes (-), dots (.), and alphanumerics between. More info:
 36	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
 37	"metadata"?: v1.#ObjectMeta
 38
 39	// spec represents the specification of the CSI Driver.
 40	"spec"!: #CSIDriverSpec
 41}
 42
 43// CSIDriverList is a collection of CSIDriver objects.
 44#CSIDriverList: {
 45	// APIVersion defines the versioned schema of this representation
 46	// of an object. Servers should convert recognized schemas to the
 47	// latest internal value, and may reject unrecognized values.
 48	// More info:
 49	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 50	"apiVersion": "storage.k8s.io/v1"
 51
 52	// items is the list of CSIDriver
 53	"items"!: [...#CSIDriver]
 54
 55	// Kind is a string value representing the REST resource this
 56	// object represents. Servers may infer this from the endpoint
 57	// the client submits requests to. Cannot be updated. In
 58	// CamelCase. More info:
 59	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 60	"kind": "CSIDriverList"
 61
 62	// Standard list metadata More info:
 63	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
 64	"metadata"?: v1.#ListMeta
 65}
 66
 67// CSIDriverSpec is the specification of a CSIDriver.
 68#CSIDriverSpec: {
 69	// attachRequired indicates this CSI volume driver requires an
 70	// attach operation (because it implements the CSI
 71	// ControllerPublishVolume() method), and that the Kubernetes
 72	// attach detach controller should call the attach volume
 73	// interface which checks the volumeattachment status and waits
 74	// until the volume is attached before proceeding to mounting.
 75	// The CSI external-attacher coordinates with CSI volume driver
 76	// and updates the volumeattachment status when the attach
 77	// operation is complete. If the value is specified to false, the
 78	// attach operation will be skipped. Otherwise the attach
 79	// operation will be called.
 80	//
 81	// This field is immutable.
 82	"attachRequired"?: bool
 83
 84	// fsGroupPolicy defines if the underlying volume supports
 85	// changing ownership and permission of the volume before being
 86	// mounted. Refer to the specific FSGroupPolicy values for
 87	// additional details.
 88	//
 89	// This field was immutable in Kubernetes < 1.29 and now is
 90	// mutable.
 91	//
 92	// Defaults to ReadWriteOnceWithFSType, which will examine each
 93	// volume to determine if Kubernetes should modify ownership and
 94	// permissions of the volume. With the default policy the defined
 95	// fsGroup will only be applied if a fstype is defined and the
 96	// volume's access mode contains ReadWriteOnce.
 97	"fsGroupPolicy"?: string
 98
 99	// nodeAllocatableUpdatePeriodSeconds specifies the interval
100	// between periodic updates of the CSINode allocatable capacity
101	// for this driver. When set, both periodic updates and updates
102	// triggered by capacity-related failures are enabled. If not
103	// set, no updates occur (neither periodic nor upon detecting
104	// capacity-related failures), and the allocatable.count remains
105	// static. The minimum allowed value for this field is 10
106	// seconds.
107	//
108	// This feature requires the MutableCSINodeAllocatableCount
109	// feature gate to be enabled.
110	//
111	// This field is mutable.
112	"nodeAllocatableUpdatePeriodSeconds"?: int64 & int
113
114	// podInfoOnMount indicates this CSI volume driver requires
115	// additional pod information (like podName, podUID, etc.) during
116	// mount operations, if set to true. If set to false, pod
117	// information will not be passed on mount. Default is false.
118	//
119	// The CSI driver specifies podInfoOnMount as part of driver
120	// deployment. If true, Kubelet will pass pod information as
121	// VolumeContext in the CSI NodePublishVolume() calls. The CSI
122	// driver is responsible for parsing and validating the
123	// information passed in as VolumeContext.
124	//
125	// The following VolumeContext will be passed if podInfoOnMount is
126	// set to true. This list might grow, but the prefix will be
127	// used. "csi.storage.k8s.io/pod.name": pod.Name
128	// "csi.storage.k8s.io/pod.namespace": pod.Namespace
129	// "csi.storage.k8s.io/pod.uid": string(pod.UID)
130	// "csi.storage.k8s.io/ephemeral": "true" if the volume is an
131	// ephemeral inline volume
132	// defined by a CSIVolumeSource, otherwise "false"
133	//
134	// "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes
135	// 1.16. It is only required for drivers which support both the
136	// "Persistent" and "Ephemeral" VolumeLifecycleMode. Other
137	// drivers can leave pod info disabled and/or ignore this field.
138	// As Kubernetes 1.15 doesn't support this field, drivers can
139	// only support one mode when deployed on such a cluster and the
140	// deployment determines which mode that is, for example via a
141	// command line parameter of the driver.
142	//
143	// This field was immutable in Kubernetes < 1.29 and now is
144	// mutable.
145	"podInfoOnMount"?: bool
146
147	// PreventPodSchedulingIfMissing indicates that the CSI driver
148	// wants to prevent pod scheduling if the CSI driver on the node
149	// is missing.
150	//
151	// Enabling this option will prevent the scheduler (or any other
152	// component which embeds default scheduler such as
153	// cluster-autoscaler) from scheduling pods to nodes where CSI
154	// driver is not installed.
155	//
156	// For components(such as cluster-autoscaler) that embed the
157	// scheduler and run pod placement simulations using scheduler
158	// plugins, they MUST be aware of CSI driver registration
159	// information via CSINode object. They must create simulated
160	// CSINode objects in addition to Node objects during scheduling
161	// simulation, otherwise if PreventPodSchedulingIfMissing is
162	// enabled globally for CSIDriver object, any newly created node
163	// may be rejected by the scheduler because of missing CSI driver
164	// information from the node.
165	//
166	// This is an alpha feature and requires the VolumeLimitScaling
167	// feature gate to be enabled. Default is "false".
168	"preventPodSchedulingIfMissing"?: bool
169
170	// requiresRepublish indicates the CSI driver wants
171	// `NodePublishVolume` being periodically called to reflect any
172	// possible change in the mounted volume. This field defaults to
173	// false.
174	//
175	// Note: After a successful initial NodePublishVolume call,
176	// subsequent calls to NodePublishVolume should only update the
177	// contents of the volume. New mount points will not be seen by a
178	// running container.
179	"requiresRepublish"?: bool
180
181	// seLinuxMount specifies if the CSI driver supports "-o context"
182	// mount option.
183	//
184	// When "true", the CSI driver must ensure that all volumes
185	// provided by this CSI driver can be mounted separately with
186	// different `-o context` options. This is typical for storage
187	// backends that provide volumes as filesystems on block devices
188	// or as independent shared volumes. Kubernetes will call
189	// NodeStage / NodePublish with "-o context=xyz" mount option
190	// when mounting a ReadWriteOncePod volume used in Pod that has
191	// explicitly set SELinux context. In the future, it may be
192	// expanded to other volume AccessModes. In any case, Kubernetes
193	// will ensure that the volume is mounted only with a single
194	// SELinux context.
195	//
196	// When "false", Kubernetes won't pass any special SELinux mount
197	// options to the driver. This is typical for volumes that
198	// represent subdirectories of a bigger shared filesystem.
199	//
200	// Default is "false".
201	"seLinuxMount"?: bool
202
203	// serviceAccountTokenInSecrets is an opt-in for CSI drivers to
204	// indicate that service account tokens should be passed via the
205	// Secrets field in NodePublishVolumeRequest instead of the
206	// VolumeContext field. The CSI specification provides a
207	// dedicated Secrets field for sensitive information like tokens,
208	// which is the appropriate mechanism for handling credentials.
209	// This addresses security concerns where sensitive tokens were
210	// being logged as part of volume context.
211	//
212	// When "true", kubelet will pass the tokens only in the Secrets
213	// field with the key "csi.storage.k8s.io/serviceAccount.tokens".
214	// The CSI driver must be updated to read tokens from the Secrets
215	// field instead of VolumeContext.
216	//
217	// When "false" or not set, kubelet will pass the tokens in
218	// VolumeContext with the key
219	// "csi.storage.k8s.io/serviceAccount.tokens" (existing
220	// behavior). This maintains backward compatibility with existing
221	// CSI drivers.
222	//
223	// This field can only be set when TokenRequests is configured.
224	// The API server will reject CSIDriver specs that set this field
225	// without TokenRequests.
226	//
227	// Default behavior if unset is to pass tokens in the
228	// VolumeContext field.
229	"serviceAccountTokenInSecrets"?: bool
230
231	// storageCapacity indicates that the CSI volume driver wants pod
232	// scheduling to consider the storage capacity that the driver
233	// deployment will report by creating CSIStorageCapacity objects
234	// with capacity information, if set to true.
235	//
236	// The check can be enabled immediately when deploying a driver.
237	// In that case, provisioning new volumes with late binding will
238	// pause until the driver deployment has published some suitable
239	// CSIStorageCapacity object.
240	//
241	// Alternatively, the driver can be deployed with the field unset
242	// or false and it can be flipped later when storage capacity
243	// information has been published.
244	//
245	// This field was immutable in Kubernetes <= 1.22 and now is
246	// mutable.
247	"storageCapacity"?: bool
248
249	// tokenRequests indicates the CSI driver needs pods' service
250	// account tokens it is mounting volume for to do necessary
251	// authentication. Kubelet will pass the tokens in VolumeContext
252	// in the CSI NodePublishVolume calls. The CSI driver should
253	// parse and validate the following VolumeContext:
254	// "csi.storage.k8s.io/serviceAccount.tokens": {
255	// "<audience>": {
256	// "token": <token>,
257	// "expirationTimestamp": <expiration timestamp in RFC3339>,
258	// },
259	// ...
260	// }
261	//
262	// Note: Audience in each TokenRequest should be different and at
263	// most one token is empty string. To receive a new token after
264	// expiry, RequiresRepublish can be used to trigger
265	// NodePublishVolume periodically.
266	"tokenRequests"?: [...#TokenRequest]
267
268	// volumeLifecycleModes defines what kind of volumes this CSI
269	// volume driver supports. The default if the list is empty is
270	// "Persistent", which is the usage defined by the CSI
271	// specification and implemented in Kubernetes via the usual
272	// PV/PVC mechanism.
273	//
274	// The other mode is "Ephemeral". In this mode, volumes are
275	// defined inline inside the pod spec with CSIVolumeSource and
276	// their lifecycle is tied to the lifecycle of that pod. A driver
277	// has to be aware of this because it is only going to get a
278	// NodePublishVolume call for such a volume.
279	//
280	// For more information about implementing this mode, see
281	// https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html
282	// A driver can support one or more of these modes and more modes
283	// may be added in the future.
284	//
285	// This field is beta. This field is immutable.
286	"volumeLifecycleModes"?: [...string]
287}
288
289// CSINode holds information about all CSI drivers installed on a
290// node. CSI drivers do not need to create the CSINode object
291// directly. As long as they use the node-driver-registrar
292// sidecar container, the kubelet will automatically populate the
293// CSINode object for the CSI driver as part of kubelet plugin
294// registration. CSINode has the same name as a node. If the
295// object is missing, it means either there are no CSI Drivers
296// available on the node, or the Kubelet version is low enough
297// that it doesn't create this object. CSINode has an
298// OwnerReference that points to the corresponding node object.
299#CSINode: {
300	// APIVersion defines the versioned schema of this representation
301	// of an object. Servers should convert recognized schemas to the
302	// latest internal value, and may reject unrecognized values.
303	// More info:
304	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
305	"apiVersion": "storage.k8s.io/v1"
306
307	// Kind is a string value representing the REST resource this
308	// object represents. Servers may infer this from the endpoint
309	// the client submits requests to. Cannot be updated. In
310	// CamelCase. More info:
311	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
312	"kind": "CSINode"
313
314	// Standard object's metadata. metadata.name must be the
315	// Kubernetes node name.
316	"metadata"?: v1.#ObjectMeta
317
318	// spec is the specification of CSINode
319	"spec"!: #CSINodeSpec
320}
321
322// CSINodeDriver holds information about the specification of one
323// CSI driver installed on a node
324#CSINodeDriver: {
325	// allocatable represents the volume resources of a node that are
326	// available for scheduling. This field is beta.
327	"allocatable"?: #VolumeNodeResources
328
329	// name represents the name of the CSI driver that this object
330	// refers to. This MUST be the same name returned by the CSI
331	// GetPluginName() call for that driver.
332	"name"!: string
333
334	// nodeID of the node from the driver point of view. This field
335	// enables Kubernetes to communicate with storage systems that do
336	// not share the same nomenclature for nodes. For example,
337	// Kubernetes may refer to a given node as "node1", but the
338	// storage system may refer to the same node as "nodeA". When
339	// Kubernetes issues a command to the storage system to attach a
340	// volume to a specific node, it can use this field to refer to
341	// the node name using the ID that the storage system will
342	// understand, e.g. "nodeA" instead of "node1". This field is
343	// required.
344	"nodeID"!: string
345
346	// topologyKeys is the list of keys supported by the driver. When
347	// a driver is initialized on a cluster, it provides a set of
348	// topology keys that it understands (e.g. "company.com/zone",
349	// "company.com/region"). When a driver is initialized on a node,
350	// it provides the same topology keys along with values. Kubelet
351	// will expose these topology keys as labels on its own node
352	// object. When Kubernetes does topology aware provisioning, it
353	// can use this list to determine which labels it should retrieve
354	// from the node object and pass back to the driver. It is
355	// possible for different nodes to use different topology keys.
356	// This can be empty if driver does not support topology.
357	"topologyKeys"?: [...string]
358}
359
360// CSINodeList is a collection of CSINode objects.
361#CSINodeList: {
362	// APIVersion defines the versioned schema of this representation
363	// of an object. Servers should convert recognized schemas to the
364	// latest internal value, and may reject unrecognized values.
365	// More info:
366	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
367	"apiVersion": "storage.k8s.io/v1"
368
369	// items is the list of CSINode
370	"items"!: [...#CSINode]
371
372	// Kind is a string value representing the REST resource this
373	// object represents. Servers may infer this from the endpoint
374	// the client submits requests to. Cannot be updated. In
375	// CamelCase. More info:
376	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
377	"kind": "CSINodeList"
378
379	// Standard list metadata More info:
380	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
381	"metadata"?: v1.#ListMeta
382}
383
384// CSINodeSpec holds information about the specification of all
385// CSI drivers installed on a node
386#CSINodeSpec: {
387	// drivers is a list of information of all CSI Drivers existing on
388	// a node. If all drivers in the list are uninstalled, this can
389	// become empty.
390	"drivers"!: [...#CSINodeDriver]
391}
392
393// CSIStorageCapacity stores the result of one CSI GetCapacity
394// call. For a given StorageClass, this describes the available
395// capacity in a particular topology segment. This can be used
396// when considering where to instantiate new PersistentVolumes.
397//
398// For example this can express things like: - StorageClass
399// "standard" has "1234 GiB" available in
400// "topology.kubernetes.io/zone=us-east1" - StorageClass
401// "localssd" has "10 GiB" available in
402// "kubernetes.io/hostname=knode-abc123"
403//
404// The following three cases all imply that no capacity is
405// available for a certain combination: - no object exists with
406// suitable topology and storage class name - such an object
407// exists, but the capacity is unset - such an object exists, but
408// the capacity is zero
409//
410// The producer of these objects can decide which approach is more
411// suitable.
412//
413// They are consumed by the kube-scheduler when a CSI driver opts
414// into capacity-aware scheduling with
415// CSIDriverSpec.StorageCapacity. The scheduler compares the
416// MaximumVolumeSize against the requested size of pending
417// volumes to filter out unsuitable nodes. If MaximumVolumeSize
418// is unset, it falls back to a comparison against the less
419// precise Capacity. If that is also unset, the scheduler assumes
420// that capacity is insufficient and tries some other node.
421#CSIStorageCapacity: {
422	// APIVersion defines the versioned schema of this representation
423	// of an object. Servers should convert recognized schemas to the
424	// latest internal value, and may reject unrecognized values.
425	// More info:
426	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
427	"apiVersion": "storage.k8s.io/v1"
428
429	// capacity is the value reported by the CSI driver in its
430	// GetCapacityResponse for a GetCapacityRequest with topology and
431	// parameters that match the previous fields.
432	//
433	// The semantic is currently (CSI spec 1.2) defined as: The
434	// available capacity, in bytes, of the storage that can be used
435	// to provision volumes. If not set, that information is
436	// currently unavailable.
437	"capacity"?: resource.#Quantity
438
439	// Kind is a string value representing the REST resource this
440	// object represents. Servers may infer this from the endpoint
441	// the client submits requests to. Cannot be updated. In
442	// CamelCase. More info:
443	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
444	"kind": "CSIStorageCapacity"
445
446	// maximumVolumeSize is the value reported by the CSI driver in
447	// its GetCapacityResponse for a GetCapacityRequest with topology
448	// and parameters that match the previous fields.
449	//
450	// This is defined since CSI spec 1.4.0 as the largest size that
451	// may be used in a
452	// CreateVolumeRequest.capacity_range.required_bytes field to
453	// create a volume with the same parameters as those in
454	// GetCapacityRequest. The corresponding value in the Kubernetes
455	// API is ResourceRequirements.Requests in a volume claim.
456	"maximumVolumeSize"?: resource.#Quantity
457
458	// Standard object's metadata. The name has no particular meaning.
459	// It must be a DNS subdomain (dots allowed, 253 characters). To
460	// ensure that there are no conflicts with other CSI drivers on
461	// the cluster, the recommendation is to use csisc-<uuid>, a
462	// generated name, or a reverse-domain name which ends with the
463	// unique CSI driver name.
464	//
465	// Objects are namespaced.
466	//
467	// More info:
468	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
469	"metadata"?: v1.#ObjectMeta
470
471	// nodeTopology defines which nodes have access to the storage for
472	// which capacity was reported. If not set, the storage is not
473	// accessible from any node in the cluster. If empty, the storage
474	// is accessible from all nodes. This field is immutable.
475	"nodeTopology"?: v1.#LabelSelector
476
477	// storageClassName represents the name of the StorageClass that
478	// the reported capacity applies to. It must meet the same
479	// requirements as the name of a StorageClass object (non-empty,
480	// DNS subdomain). If that object no longer exists, the
481	// CSIStorageCapacity object is obsolete and should be removed by
482	// its creator. This field is immutable.
483	"storageClassName"!: string
484}
485
486// CSIStorageCapacityList is a collection of CSIStorageCapacity
487// objects.
488#CSIStorageCapacityList: {
489	// APIVersion defines the versioned schema of this representation
490	// of an object. Servers should convert recognized schemas to the
491	// latest internal value, and may reject unrecognized values.
492	// More info:
493	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
494	"apiVersion": "storage.k8s.io/v1"
495
496	// items is the list of CSIStorageCapacity objects.
497	"items"!: [...#CSIStorageCapacity]
498
499	// Kind is a string value representing the REST resource this
500	// object represents. Servers may infer this from the endpoint
501	// the client submits requests to. Cannot be updated. In
502	// CamelCase. More info:
503	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
504	"kind": "CSIStorageCapacityList"
505
506	// Standard list metadata More info:
507	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
508	"metadata"?: v1.#ListMeta
509}
510
511// StorageClass describes the parameters for a class of storage
512// for which PersistentVolumes can be dynamically provisioned.
513//
514// StorageClasses are non-namespaced; the name of the storage
515// class according to etcd is in ObjectMeta.Name.
516#StorageClass: {
517	// allowVolumeExpansion shows whether the storage class allow
518	// volume expand.
519	"allowVolumeExpansion"?: bool
520
521	// allowedTopologies restrict the node topologies where volumes
522	// can be dynamically provisioned. Each volume plugin defines its
523	// own supported topology specifications. An empty
524	// TopologySelectorTerm list means there is no topology
525	// restriction. This field is only honored by servers that enable
526	// the VolumeScheduling feature.
527	"allowedTopologies"?: [...v1_9.#TopologySelectorTerm]
528
529	// APIVersion defines the versioned schema of this representation
530	// of an object. Servers should convert recognized schemas to the
531	// latest internal value, and may reject unrecognized values.
532	// More info:
533	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
534	"apiVersion": "storage.k8s.io/v1"
535
536	// Kind is a string value representing the REST resource this
537	// object represents. Servers may infer this from the endpoint
538	// the client submits requests to. Cannot be updated. In
539	// CamelCase. More info:
540	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
541	"kind": "StorageClass"
542
543	// Standard object's metadata. More info:
544	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
545	"metadata"?: v1.#ObjectMeta
546
547	// mountOptions controls the mountOptions for dynamically
548	// provisioned PersistentVolumes of this storage class. e.g.
549	// ["ro", "soft"]. Not validated - mount of the PVs will simply
550	// fail if one is invalid.
551	"mountOptions"?: [...string]
552
553	// parameters holds the parameters for the provisioner that should
554	// create volumes of this storage class.
555	"parameters"?: {
556		[string]: string
557	}
558
559	// provisioner indicates the type of the provisioner.
560	"provisioner"!: string
561
562	// reclaimPolicy controls the reclaimPolicy for dynamically
563	// provisioned PersistentVolumes of this storage class. Defaults
564	// to Delete.
565	"reclaimPolicy"?: string
566
567	// volumeBindingMode indicates how PersistentVolumeClaims should
568	// be provisioned and bound. When unset, VolumeBindingImmediate
569	// is used. This field is only honored by servers that enable the
570	// VolumeScheduling feature.
571	"volumeBindingMode"?: string
572}
573
574// StorageClassList is a collection of storage classes.
575#StorageClassList: {
576	// APIVersion defines the versioned schema of this representation
577	// of an object. Servers should convert recognized schemas to the
578	// latest internal value, and may reject unrecognized values.
579	// More info:
580	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
581	"apiVersion": "storage.k8s.io/v1"
582
583	// items is the list of StorageClasses
584	"items"!: [...#StorageClass]
585
586	// Kind is a string value representing the REST resource this
587	// object represents. Servers may infer this from the endpoint
588	// the client submits requests to. Cannot be updated. In
589	// CamelCase. More info:
590	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
591	"kind": "StorageClassList"
592
593	// Standard list metadata More info:
594	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
595	"metadata"?: v1.#ListMeta
596}
597
598// TokenRequest contains parameters of a service account token.
599#TokenRequest: {
600	// audience is the intended audience of the token in
601	// "TokenRequestSpec". It will default to the audiences of kube
602	// apiserver.
603	"audience"!: string
604
605	// expirationSeconds is the duration of validity of the token in
606	// "TokenRequestSpec". It has the same default value of
607	// "ExpirationSeconds" in "TokenRequestSpec".
608	"expirationSeconds"?: int64 & int
609}
610
611// VolumeAttachment captures the intent to attach or detach the
612// specified volume to/from the specified node.
613//
614// VolumeAttachment objects are non-namespaced.
615#VolumeAttachment: {
616	// APIVersion defines the versioned schema of this representation
617	// of an object. Servers should convert recognized schemas to the
618	// latest internal value, and may reject unrecognized values.
619	// More info:
620	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
621	"apiVersion": "storage.k8s.io/v1"
622
623	// Kind is a string value representing the REST resource this
624	// object represents. Servers may infer this from the endpoint
625	// the client submits requests to. Cannot be updated. In
626	// CamelCase. More info:
627	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
628	"kind": "VolumeAttachment"
629
630	// Standard object metadata. More info:
631	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
632	"metadata"?: v1.#ObjectMeta
633
634	// spec represents specification of the desired attach/detach
635	// volume behavior. Populated by the Kubernetes system.
636	"spec"!: #VolumeAttachmentSpec
637
638	// status represents status of the VolumeAttachment request.
639	// Populated by the entity completing the attach or detach
640	// operation, i.e. the external-attacher.
641	"status"?: #VolumeAttachmentStatus
642}
643
644// VolumeAttachmentList is a collection of VolumeAttachment
645// objects.
646#VolumeAttachmentList: {
647	// APIVersion defines the versioned schema of this representation
648	// of an object. Servers should convert recognized schemas to the
649	// latest internal value, and may reject unrecognized values.
650	// More info:
651	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
652	"apiVersion": "storage.k8s.io/v1"
653
654	// items is the list of VolumeAttachments
655	"items"!: [...#VolumeAttachment]
656
657	// Kind is a string value representing the REST resource this
658	// object represents. Servers may infer this from the endpoint
659	// the client submits requests to. Cannot be updated. In
660	// CamelCase. More info:
661	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
662	"kind": "VolumeAttachmentList"
663
664	// Standard list metadata More info:
665	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
666	"metadata"?: v1.#ListMeta
667}
668
669// VolumeAttachmentSource represents a volume that should be
670// attached. Right now only PersistentVolumes can be attached via
671// external attacher, in the future we may allow also inline
672// volumes in pods. Exactly one member can be set.
673#VolumeAttachmentSource: {
674	// inlineVolumeSpec contains all the information necessary to
675	// attach a persistent volume defined by a pod's inline
676	// VolumeSource. This field is populated only for the
677	// CSIMigration feature. It contains translated fields from a
678	// pod's inline VolumeSource to a PersistentVolumeSpec. This
679	// field is beta-level and is only honored by servers that
680	// enabled the CSIMigration feature.
681	"inlineVolumeSpec"?: v1_9.#PersistentVolumeSpec
682
683	// persistentVolumeName represents the name of the persistent
684	// volume to attach.
685	"persistentVolumeName"?: string
686}
687
688// VolumeAttachmentSpec is the specification of a VolumeAttachment
689// request.
690#VolumeAttachmentSpec: {
691	// attacher indicates the name of the volume driver that MUST
692	// handle this request. This is the name returned by
693	// GetPluginName().
694	"attacher"!: string
695
696	// nodeName represents the node that the volume should be attached
697	// to.
698	"nodeName"!: string
699
700	// source represents the volume that should be attached.
701	"source"!: #VolumeAttachmentSource
702}
703
704// VolumeAttachmentStatus is the status of a VolumeAttachment
705// request.
706#VolumeAttachmentStatus: {
707	// attachError represents the last error encountered during attach
708	// operation, if any. This field must only be set by the entity
709	// completing the attach operation, i.e. the external-attacher.
710	"attachError"?: #VolumeError
711
712	// attached indicates the volume is successfully attached. This
713	// field must only be set by the entity completing the attach
714	// operation, i.e. the external-attacher.
715	"attached"!: bool
716
717	// attachmentMetadata is populated with any information returned
718	// by the attach operation, upon successful attach, that must be
719	// passed into subsequent WaitForAttach or Mount calls. This
720	// field must only be set by the entity completing the attach
721	// operation, i.e. the external-attacher.
722	"attachmentMetadata"?: {
723		[string]: string
724	}
725
726	// detachError represents the last error encountered during detach
727	// operation, if any. This field must only be set by the entity
728	// completing the detach operation, i.e. the external-attacher.
729	"detachError"?: #VolumeError
730}
731
732// VolumeAttributesClass represents a specification of mutable
733// volume attributes defined by the CSI driver. The class can be
734// specified during dynamic provisioning of
735// PersistentVolumeClaims, and changed in the
736// PersistentVolumeClaim spec after provisioning.
737#VolumeAttributesClass: {
738	// APIVersion defines the versioned schema of this representation
739	// of an object. Servers should convert recognized schemas to the
740	// latest internal value, and may reject unrecognized values.
741	// More info:
742	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
743	"apiVersion": "storage.k8s.io/v1"
744
745	// Name of the CSI driver This field is immutable.
746	"driverName"!: string
747
748	// Kind is a string value representing the REST resource this
749	// object represents. Servers may infer this from the endpoint
750	// the client submits requests to. Cannot be updated. In
751	// CamelCase. More info:
752	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
753	"kind": "VolumeAttributesClass"
754
755	// Standard object's metadata. More info:
756	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
757	"metadata"?: v1.#ObjectMeta
758
759	// parameters hold volume attributes defined by the CSI driver.
760	// These values are opaque to the Kubernetes and are passed
761	// directly to the CSI driver. The underlying storage provider
762	// supports changing these attributes on an existing volume,
763	// however the parameters field itself is immutable. To invoke a
764	// volume update, a new VolumeAttributesClass should be created
765	// with new parameters, and the PersistentVolumeClaim should be
766	// updated to reference the new VolumeAttributesClass.
767	//
768	// This field is required and must contain at least one key/value
769	// pair. The keys cannot be empty, and the maximum number of
770	// parameters is 512, with a cumulative max size of 256K. If the
771	// CSI driver rejects invalid parameters, the target
772	// PersistentVolumeClaim will be set to an "Infeasible" state in
773	// the modifyVolumeStatus field.
774	"parameters"?: {
775		[string]: string
776	}
777}
778
779// VolumeAttributesClassList is a collection of
780// VolumeAttributesClass objects.
781#VolumeAttributesClassList: {
782	// APIVersion defines the versioned schema of this representation
783	// of an object. Servers should convert recognized schemas to the
784	// latest internal value, and may reject unrecognized values.
785	// More info:
786	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
787	"apiVersion": "storage.k8s.io/v1"
788
789	// items is the list of VolumeAttributesClass objects.
790	"items"!: [...#VolumeAttributesClass]
791
792	// Kind is a string value representing the REST resource this
793	// object represents. Servers may infer this from the endpoint
794	// the client submits requests to. Cannot be updated. In
795	// CamelCase. More info:
796	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
797	"kind": "VolumeAttributesClassList"
798
799	// Standard list metadata More info:
800	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
801	"metadata"?: v1.#ListMeta
802}
803
804// VolumeError captures an error encountered during a volume
805// operation.
806#VolumeError: {
807	// errorCode is a numeric gRPC code representing the error
808	// encountered during Attach or Detach operations.
809	//
810	// This field requires the MutableCSINodeAllocatableCount feature
811	// gate being enabled to be set.
812	"errorCode"?: int32 & int
813
814	// message represents the error encountered during Attach or
815	// Detach operation. This string may be logged, so it should not
816	// contain sensitive information.
817	"message"?: string
818
819	// time represents the time the error was encountered.
820	"time"?: v1.#Time
821}
822
823// VolumeNodeResources is a set of resource limits for scheduling
824// of volumes.
825#VolumeNodeResources: {
826	// count indicates the maximum number of unique volumes managed by
827	// the CSI driver that can be used on a node. A volume that is
828	// both attached and mounted on a node is considered to be used
829	// once, not twice. The same rule applies for a unique volume
830	// that is shared among multiple pods on the same node. If this
831	// field is not specified, then the supported number of volumes
832	// on this node is unbounded.
833	"count"?: int32 & int
834}