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