1package v1beta2
2
3import "time"
4
5// VolumeGroupSnapshot is a user's request for creating either a
6// point-in-time
7// group snapshot or binding to a pre-existing group snapshot.
8#VolumeGroupSnapshot: {
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 the desired characteristics of a group snapshot
32 // requested by a user.
33 // Required.
34 "spec"!: {
35 // Source specifies where a group snapshot will be created from.
36 // This field is immutable after creation.
37 // Required.
38 "source"!: {
39 // Selector is a label query over persistent volume claims that
40 // are to be
41 // grouped together for snapshotting.
42 // This labelSelector will be used to match the label added to a
43 // PVC.
44 // If the label is added or removed to a volume after a group
45 // snapshot
46 // is created, the existing group snapshots won't be modified.
47 // Once a VolumeGroupSnapshotContent is created and the sidecar
48 // starts to process
49 // it, the volume list will not change with retries.
50 "selector"?: {
51 // matchExpressions is a list of label selector requirements. The
52 // requirements are ANDed.
53 "matchExpressions"?: [...{
54 // key is the label key that the selector applies to.
55 "key"!: string
56
57 // operator represents a key's relationship to a set of values.
58 // Valid operators are In, NotIn, Exists and DoesNotExist.
59 "operator"!: string
60
61 // values is an array of string values. If the operator is In or
62 // NotIn,
63 // the values array must be non-empty. If the operator is Exists
64 // or DoesNotExist,
65 // the values array must be empty. This array is replaced during a
66 // strategic
67 // merge patch.
68 "values"?: [...string]
69 }]
70
71 // matchLabels is a map of {key,value} pairs. A single {key,value}
72 // in the matchLabels
73 // map is equivalent to an element of matchExpressions, whose key
74 // field is "key", the
75 // operator is "In", and the values array contains only "value".
76 // The requirements are ANDed.
77 "matchLabels"?: {
78 [string]: string
79 }
80 }
81
82 // VolumeGroupSnapshotContentName specifies the name of a
83 // pre-existing VolumeGroupSnapshotContent
84 // object representing an existing volume group snapshot.
85 // This field should be set if the volume group snapshot already
86 // exists and
87 // only needs a representation in Kubernetes.
88 // This field is immutable.
89 "volumeGroupSnapshotContentName"?: string
90 }
91
92 // VolumeGroupSnapshotClassName is the name of the
93 // VolumeGroupSnapshotClass
94 // requested by the VolumeGroupSnapshot.
95 // VolumeGroupSnapshotClassName may be left nil to indicate that
96 // the default
97 // class will be used.
98 // Empty string is not allowed for this field.
99 "volumeGroupSnapshotClassName"?: string
100 }
101
102 // Status represents the current information of a group snapshot.
103 // Consumers must verify binding between VolumeGroupSnapshot and
104 // VolumeGroupSnapshotContent objects is successful (by validating
105 // that both
106 // VolumeGroupSnapshot and VolumeGroupSnapshotContent point to
107 // each other) before
108 // using this object.
109 "status"?: {
110 // BoundVolumeGroupSnapshotContentName is the name of the
111 // VolumeGroupSnapshotContent
112 // object to which this VolumeGroupSnapshot object intends to bind
113 // to.
114 // If not specified, it indicates that the VolumeGroupSnapshot
115 // object has not
116 // been successfully bound to a VolumeGroupSnapshotContent object
117 // yet.
118 // NOTE: To avoid possible security issues, consumers must verify
119 // binding between
120 // VolumeGroupSnapshot and VolumeGroupSnapshotContent objects is
121 // successful
122 // (by validating that both VolumeGroupSnapshot and
123 // VolumeGroupSnapshotContent
124 // point at each other) before using this object.
125 "boundVolumeGroupSnapshotContentName"?: string
126
127 // CreationTime is the timestamp when the point-in-time group
128 // snapshot is taken
129 // by the underlying storage system.
130 // If not specified, it may indicate that the creation time of the
131 // group snapshot
132 // is unknown.
133 // This field is updated based on the CreationTime field in
134 // VolumeGroupSnapshotContentStatus
135 "creationTime"?: time.Time
136
137 // Error is the last observed error during group snapshot
138 // creation, if any.
139 // This field could be helpful to upper level controllers (i.e.,
140 // application
141 // controller) to decide whether they should continue on waiting
142 // for the group
143 // snapshot to be created based on the type of error reported.
144 // The snapshot controller will keep retrying when an error occurs
145 // during the
146 // group snapshot creation. Upon success, this error field will be
147 // cleared.
148 "error"?: {
149 // message is a string detailing the encountered error during
150 // snapshot
151 // creation if specified.
152 // NOTE: message may be logged, and it should not contain
153 // sensitive
154 // information.
155 "message"?: string
156
157 // time is the timestamp when the error was encountered.
158 "time"?: time.Time
159 }
160
161 // ReadyToUse indicates if all the individual snapshots in the
162 // group are ready
163 // to be used to restore a group of volumes.
164 // ReadyToUse becomes true when ReadyToUse of all individual
165 // snapshots become true.
166 // If not specified, it means the readiness of a group snapshot is
167 // unknown.
168 "readyToUse"?: bool
169 }
170
171 _embeddedResource: {
172 "apiVersion"!: string
173 "kind"!: string
174 "metadata"?: {
175 ...
176 }
177 }
178 apiVersion: "groupsnapshot.storage.k8s.io/v1beta2"
179 kind: "VolumeGroupSnapshot"
180 metadata!: {
181 "name"!: string
182 "namespace"!: string
183 "labels"?: {
184 [string]: string
185 }
186 "annotations"?: {
187 [string]: string
188 }
189 ...
190 }
191}