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

groupsnapshot/v1beta1/VolumeGroupSnapshotContent.cue raw

  1package v1beta1
  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		// The format of this field is a Unix nanoseconds time encoded as
192		// an int64.
193		// On Unix, the command date +%s%N returns the current time in
194		// nanoseconds
195		// since 1970-01-01 00:00:00 UTC.
196		// This field is the source for the CreationTime field in
197		// VolumeGroupSnapshotStatus
198		"creationTime"?: time.Time
199
200		// Error is the last observed error during group snapshot
201		// creation, if any.
202		// Upon success after retry, this error field will be cleared.
203		"error"?: {
204			// message is a string detailing the encountered error during
205			// snapshot
206			// creation if specified.
207			// NOTE: message may be logged, and it should not contain
208			// sensitive
209			// information.
210			"message"?: string
211
212			// time is the timestamp when the error was encountered.
213			"time"?: time.Time
214		}
215
216		// ReadyToUse indicates if all the individual snapshots in the
217		// group are ready to be
218		// used to restore a group of volumes.
219		// ReadyToUse becomes true when ReadyToUse of all individual
220		// snapshots become true.
221		"readyToUse"?: bool
222
223		// VolumeGroupSnapshotHandle is a unique id returned by the CSI
224		// driver
225		// to identify the VolumeGroupSnapshot on the storage system.
226		// If a storage system does not provide such an id, the
227		// CSI driver can choose to return the VolumeGroupSnapshot name.
228		"volumeGroupSnapshotHandle"?: string
229
230		// VolumeSnapshotHandlePairList is a list of CSI "volume_id" and
231		// "snapshot_id"
232		// pair returned by the CSI driver to identify snapshots and their
233		// source volumes
234		// on the storage system.
235		"volumeSnapshotHandlePairList"?: [...{
236			// SnapshotHandle is a unique id returned by the CSI driver to
237			// identify a volume
238			// snapshot on the storage system
239			// Required.
240			"snapshotHandle"!: string
241
242			// VolumeHandle is a unique id returned by the CSI driver to
243			// identify a volume
244			// on the storage system
245			// Required.
246			"volumeHandle"!: string
247		}]
248	}
249
250	_embeddedResource: {
251		"apiVersion"!: string
252		"kind"!:       string
253		"metadata"?: {
254			...
255		}
256	}
257	apiVersion: "groupsnapshot.storage.k8s.io/v1beta1"
258	kind:       "VolumeGroupSnapshotContent"
259	metadata!: {
260		"name"!:      string
261		"namespace"?: string
262		"labels"?: {
263			[string]: string
264		}
265		"annotations"?: {
266			[string]: string
267		}
268		...
269	}
270}