1package v1beta1
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 // The format of this field is a Unix nanoseconds time encoded as an int64.
148 // On Unix, the command date +%s%N returns the current time in nanoseconds
149 // since 1970-01-01 00:00:00 UTC.
150 // This field is the source for the CreationTime field in VolumeGroupSnapshotStatus
151 "creationTime"?: time.Time
152
153 // Error is the last observed error during group snapshot creation, if any.
154 // Upon success after retry, this error field will be cleared.
155 "error"?: {
156 // message is a string detailing the encountered error during snapshot
157 // creation if specified.
158 // NOTE: message may be logged, and it should not contain sensitive
159 // information.
160 "message"?: string
161
162 // time is the timestamp when the error was encountered.
163 "time"?: time.Time
164 }
165
166 // ReadyToUse indicates if all the individual snapshots in the group are ready to be
167 // used to restore a group of volumes.
168 // ReadyToUse becomes true when ReadyToUse of all individual snapshots become true.
169 "readyToUse"?: bool
170
171 // VolumeGroupSnapshotHandle is a unique id returned by the CSI driver
172 // to identify the VolumeGroupSnapshot on the storage system.
173 // If a storage system does not provide such an id, the
174 // CSI driver can choose to return the VolumeGroupSnapshot name.
175 "volumeGroupSnapshotHandle"?: string
176
177 // VolumeSnapshotHandlePairList is a list of CSI "volume_id" and "snapshot_id"
178 // pair returned by the CSI driver to identify snapshots and their source volumes
179 // on the storage system.
180 "volumeSnapshotHandlePairList"?: [...{
181 // SnapshotHandle is a unique id returned by the CSI driver to identify a volume
182 // snapshot on the storage system
183 // Required.
184 "snapshotHandle"!: string
185
186 // VolumeHandle is a unique id returned by the CSI driver to identify a volume
187 // on the storage system
188 // Required.
189 "volumeHandle"!: string
190 }]
191 }
192
193 _embeddedResource: {
194 "apiVersion"!: string
195 "kind"!: string
196 "metadata"?: {...}
197 }
198 apiVersion: "groupsnapshot.storage.k8s.io/v1beta1"
199 kind: "VolumeGroupSnapshotContent"
200 metadata!: {
201 "name"!: string
202 "namespace"?: string
203 "labels"?: {[string]: string}
204 "annotations"?: {[string]: string}
205 ...
206 }
207}