cue.dev/x/crd/k8s.io/storage@v0.1.0

groupsnapshot/v1beta2/VolumeGroupSnapshotContent.cue raw

  1package v1beta2
  2
  3import "time"
  4
  5// VolumeGroupSnapshotContent represents the actual "on-disk"
  6// group snapshot object
  7// in the underlying storage system
  8#VolumeGroupSnapshotContent: {
  9	_embeddedResource
 10
 11	// APIVersion defines the versioned schema of this representation
 12	// of an object.
 13	// Servers should convert recognized schemas to the latest
 14	// internal value, and
 15	// may reject unrecognized values.
 16	// More info:
 17	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 18	"apiVersion"?: string
 19
 20	// Kind is a string value representing the REST resource this
 21	// object represents.
 22	// Servers may infer this from the endpoint the client submits
 23	// requests to.
 24	// Cannot be updated.
 25	// In CamelCase.
 26	// More info:
 27	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 28	"kind"?: string
 29	"metadata"?: {}
 30
 31	// Spec defines properties of a VolumeGroupSnapshotContent created
 32	// by the underlying storage system.
 33	// Required.
 34	"spec"!: {
 35		// DeletionPolicy determines whether this
 36		// VolumeGroupSnapshotContent and the
 37		// physical group snapshot on the underlying storage system should
 38		// be deleted
 39		// when the bound VolumeGroupSnapshot is deleted.
 40		// Supported values are "Retain" and "Delete".
 41		// "Retain" means that the VolumeGroupSnapshotContent and its
 42		// physical group
 43		// snapshot on underlying storage system are kept.
 44		// "Delete" means that the VolumeGroupSnapshotContent and its
 45		// physical group
 46		// snapshot on underlying storage system are deleted.
 47		// For dynamically provisioned group snapshots, this field will
 48		// automatically
 49		// be filled in by the CSI snapshotter sidecar with the
 50		// "DeletionPolicy" field
 51		// defined in the corresponding VolumeGroupSnapshotClass.
 52		// For pre-existing snapshots, users MUST specify this field when
 53		// creating the
 54		// VolumeGroupSnapshotContent object.
 55		// Required.
 56		"deletionPolicy"!: "Delete" | "Retain"
 57
 58		// Driver is the name of the CSI driver used to create the
 59		// physical group snapshot on
 60		// the underlying storage system.
 61		// This MUST be the same as the name returned by the CSI
 62		// GetPluginName() call for
 63		// that driver.
 64		// Required.
 65		"driver"!: string
 66
 67		// Source specifies whether the snapshot is (or should be)
 68		// dynamically provisioned
 69		// or already exists, and just requires a Kubernetes object
 70		// representation.
 71		// This field is immutable after creation.
 72		// Required.
 73		"source"!: {
 74			// GroupSnapshotHandles specifies the CSI "group_snapshot_id" of a
 75			// pre-existing
 76			// group snapshot and a list of CSI "snapshot_id" of pre-existing
 77			// snapshots
 78			// on the underlying storage system for which a Kubernetes object
 79			// representation was (or should be) created.
 80			// This field is immutable.
 81			"groupSnapshotHandles"?: {
 82				// VolumeGroupSnapshotHandle specifies the CSI "group_snapshot_id"
 83				// of a pre-existing
 84				// group snapshot on the underlying storage system for which a
 85				// Kubernetes object
 86				// representation was (or should be) created.
 87				// This field is immutable.
 88				// Required.
 89				"volumeGroupSnapshotHandle"!: string
 90
 91				// VolumeSnapshotHandles is a list of CSI "snapshot_id" of
 92				// pre-existing
 93				// snapshots on the underlying storage system for which Kubernetes
 94				// objects
 95				// representation were (or should be) created.
 96				// This field is immutable.
 97				// Required.
 98				"volumeSnapshotHandles"!: [...string]
 99			}
100
101			// VolumeHandles is a list of volume handles on the backend to be
102			// snapshotted
103			// together. It is specified for dynamic provisioning of the
104			// VolumeGroupSnapshot.
105			// This field is immutable.
106			"volumeHandles"?: [...string]
107		}
108
109		// VolumeGroupSnapshotClassName is the name of the
110		// VolumeGroupSnapshotClass from
111		// which this group snapshot was (or will be) created.
112		// Note that after provisioning, the VolumeGroupSnapshotClass may
113		// be deleted or
114		// recreated with different set of values, and as such, should not
115		// be referenced
116		// post-snapshot creation.
117		// For dynamic provisioning, this field must be set.
118		// This field may be unset for pre-provisioned snapshots.
119		"volumeGroupSnapshotClassName"?: string
120
121		// VolumeGroupSnapshotRef specifies the VolumeGroupSnapshot object
122		// to which this
123		// VolumeGroupSnapshotContent object is bound.
124		// VolumeGroupSnapshot.Spec.VolumeGroupSnapshotContentName field
125		// must reference to
126		// this VolumeGroupSnapshotContent's name for the bidirectional
127		// binding to be valid.
128		// For a pre-existing VolumeGroupSnapshotContent object, name and
129		// namespace of the
130		// VolumeGroupSnapshot object MUST be provided for binding to
131		// happen.
132		// This field is immutable after creation.
133		// Required.
134		"volumeGroupSnapshotRef"!: {
135			// API version of the referent.
136			"apiVersion"?: string
137
138			// If referring to a piece of an object instead of an entire
139			// object, this string
140			// should contain a valid JSON/Go field access statement, such as
141			// desiredState.manifest.containers[2].
142			// For example, if the object reference is to a container within a
143			// pod, this would take on a value like:
144			// "spec.containers{name}" (where "name" refers to the name of the
145			// container that triggered
146			// the event) or if no container name is specified
147			// "spec.containers[2]" (container with
148			// index 2 in this pod). This syntax is chosen only to have some
149			// well-defined way of
150			// referencing a part of an object.
151			// TODO: this design is not final and this field is subject to
152			// change in the future.
153			"fieldPath"?: string
154
155			// Kind of the referent.
156			// More info:
157			// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
158			"kind"?: string
159
160			// Name of the referent.
161			// More info:
162			// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
163			"name"?: string
164
165			// Namespace of the referent.
166			// More info:
167			// https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
168			"namespace"?: string
169
170			// Specific resourceVersion to which this reference is made, if
171			// any.
172			// More info:
173			// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
174			"resourceVersion"?: string
175
176			// UID of the referent.
177			// More info:
178			// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
179			"uid"?: string
180		}
181	}
182
183	// status represents the current information of a group snapshot.
184	"status"?: {
185		// CreationTime is the timestamp when the point-in-time group
186		// snapshot is taken
187		// by the underlying storage system.
188		// If not specified, it indicates the creation time is unknown.
189		// If not specified, it means the readiness of a group snapshot is
190		// unknown.
191		// This field is the source for the CreationTime field in
192		// VolumeGroupSnapshotStatus
193		"creationTime"?: time.Time
194
195		// Error is the last observed error during group snapshot
196		// creation, if any.
197		// Upon success after retry, this error field will be cleared.
198		"error"?: {
199			// message is a string detailing the encountered error during
200			// snapshot
201			// creation if specified.
202			// NOTE: message may be logged, and it should not contain
203			// sensitive
204			// information.
205			"message"?: string
206
207			// time is the timestamp when the error was encountered.
208			"time"?: time.Time
209		}
210
211		// ReadyToUse indicates if all the individual snapshots in the
212		// group are ready to be
213		// used to restore a group of volumes.
214		// ReadyToUse becomes true when ReadyToUse of all individual
215		// snapshots become true.
216		"readyToUse"?: bool
217
218		// VolumeGroupSnapshotHandle is a unique id returned by the CSI
219		// driver
220		// to identify the VolumeGroupSnapshot on the storage system.
221		// If a storage system does not provide such an id, the
222		// CSI driver can choose to return the VolumeGroupSnapshot name.
223		"volumeGroupSnapshotHandle"?: string
224
225		// This field is introduced in v1beta2
226		// It is replacing VolumeSnapshotHandlePairList
227		// VolumeSnapshotInfoList is a list of snapshot information
228		// returned by
229		// by the CSI driver to identify snapshots on the storage system.
230		"volumeSnapshotInfoList"?: [...{
231			// creationTime is the timestamp when the point-in-time snapshot
232			// is taken
233			// by the underlying storage system.
234			"creationTime"?: int64 & int
235
236			// ReadyToUse indicates if the snapshot is ready to be used to
237			// restore a volume.
238			"readyToUse"?: bool
239
240			// RestoreSize represents the minimum size of volume required to
241			// create a volume
242			// from this snapshot.
243			"restoreSize"?: int64 & int
244
245			// SnapshotHandle is the CSI "snapshot_id" of this snapshot on the
246			// underlying storage system.
247			"snapshotHandle"?: string
248
249			// VolumeHandle specifies the CSI "volume_id" of the volume from
250			// which this snapshot
251			// was taken from.
252			"volumeHandle"?: string
253		}]
254	}
255
256	_embeddedResource: {
257		"apiVersion"!: string
258		"kind"!:       string
259		"metadata"?: {
260			...
261		}
262	}
263	apiVersion: "groupsnapshot.storage.k8s.io/v1beta2"
264	kind:       "VolumeGroupSnapshotContent"
265	metadata!: {
266		"name"!:      string
267		"namespace"?: string
268		"labels"?: {
269			[string]: string
270		}
271		"annotations"?: {
272			[string]: string
273		}
274		...
275	}
276}