You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Name of the Cinder volume in the context of a machine.
168
-
// It will be combined with the machine name to make the actual volume name.
169
-
Namestring`json:"name"`
170
-
// Size is the size in GB of the volume.
171
-
Sizeint`json:"diskSize"`
172
-
// VolumeType is the volume type of the volume.
173
-
// If omitted, the default type will be used.
174
-
VolumeTypestring`json:"volumeType,omitempty"`
175
-
// AvailabilityZone is the volume availability zone to create the volume in.
166
+
// blockDeviceStorage is the storage type of a block device to create and
167
+
// contains additional storage options.
168
+
// +kubebuilder:validation:XValidation:rule="self.type == 'Local' ? !has(self.volume) : has(self.volume)",message="volume is forbidden for type 'Local'"
169
+
// +union
170
+
//
171
+
//nolint:godot
172
+
typeBlockDeviceStoragestruct {
173
+
// type is the type of block device to create.
174
+
// This can be either "Volume" or "Local".
175
+
// +kubebuilder:validation:Enum="Volume";"Local"
176
+
// +kubebuilder:validation:Required
177
+
// +unionDiscriminator
178
+
TypeBlockDeviceType`json:"type"`
179
+
180
+
// volume contains additional storage options for a volume block device.
181
+
// +optional
182
+
// +unionMember,optional
183
+
Volume*BlockDeviceVolume`json:"volume,omitempty"`
184
+
}
185
+
186
+
// blockDeviceVolume contains additional storage options for a volume block device.
187
+
typeBlockDeviceVolumestruct {
188
+
// type is the Cinder volume type of the volume.
189
+
// If omitted, the default Cinder volume type that is configured in the OpenStack cloud
190
+
// will be used.
191
+
// The maximum length of a volume type name is 255 characters, as per the OpenStack limit.
192
+
// +kubebuilder:validation:MinLength=1
193
+
// +kubebuilder:validation:MaxLength=255
194
+
// +optional
195
+
Typestring`json:"type,omitempty"`
196
+
197
+
// availabilityZone is the volume availability zone to create the volume in.
176
198
// If omitted, the availability zone of the server will be used.
199
+
// The availability zone must NOT contain spaces otherwise it will lead to volume that belongs
200
+
// to this availability zone register failure, see kubernetes/cloud-provider-openstack#1379 for
201
+
// further information.
202
+
// The maximum length of availability zone name is 63 as per labels limits.
203
+
// +kubebuilder:validation:MinLength=1
204
+
// +kubebuilder:validation:MaxLength=63
205
+
// +kubebuilder:validation:XValidation:rule="!self.contains(' ')",message="availabilityZone may not contain spaces"
0 commit comments