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

groupsnapshot/v1/VolumeGroupSnapshotContent.cue raw

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