Skip to content

Commit 8b82294

Browse files
authoredFeb 18, 2025··
Merge pull request #2154 from vr4manta/vsphere_multi_disk_provisioning
SPLAT-2000: Add configuration for vSphere multi disk thinProvisioned
2 parents 913eae8 + 97c4008 commit 8b82294

File tree

4 files changed

+41
-3
lines changed

4 files changed

+41
-3
lines changed
 

‎machine/v1beta1/types_vsphereprovider.go

+26
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,34 @@ type VSphereDisk struct {
198198
// +kubebuilder:validation:Maximum=16384
199199
// +required
200200
SizeGiB int32 `json:"sizeGiB"`
201+
// provisioningMode is an optional field that specifies the provisioning type to be used by this vSphere data disk.
202+
// Allowed values are "Thin", "Thick", "EagerlyZeroed", and omitted.
203+
// When set to Thin, the disk will be made using thin provisioning allocating the bare minimum space.
204+
// When set to Thick, the full disk size will be allocated when disk is created.
205+
// When set to EagerlyZeroed, the disk will be created using eager zero provisioning. An eager zeroed thick disk has all space allocated and wiped clean of any previous contents on the physical media at creation time. Such disks may take longer time during creation compared to other disk formats.
206+
// When omitted, no setting will be applied to the data disk and the provisioning mode for the disk will be determined by the default storage policy configured for the datastore in vSphere.
207+
// +optional
208+
ProvisioningMode ProvisioningMode `json:"provisioningMode,omitempty"`
201209
}
202210

211+
// provisioningMode represents the various provisioning types available to a VMs disk.
212+
// +kubebuilder:validation:Enum=Thin;Thick;EagerlyZeroed
213+
type ProvisioningMode string
214+
215+
const (
216+
// ProvisioningModeThin creates the disk using thin provisioning. This means a sparse (allocate on demand)
217+
// format with additional space optimizations.
218+
ProvisioningModeThin ProvisioningMode = "Thin"
219+
220+
// ProvisioningModeThick creates the disk with all space allocated.
221+
ProvisioningModeThick ProvisioningMode = "Thick"
222+
223+
// ProvisioningModeEagerlyZeroed creates the disk using eager zero provisioning. An eager zeroed thick disk
224+
// has all space allocated and wiped clean of any previous contents on the physical media at
225+
// creation time. Such disks may take longer time during creation compared to other disk formats.
226+
ProvisioningModeEagerlyZeroed ProvisioningMode = "EagerlyZeroed"
227+
)
228+
203229
// WorkspaceConfig defines a workspace configuration for the vSphere cloud
204230
// provider.
205231
type Workspace struct {

‎machine/v1beta1/zz_generated.swagger_doc_generated.go

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎openapi/generated_openapi/zz_generated.openapi.go

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎openapi/openapi.json

+4
Original file line numberDiff line numberDiff line change
@@ -22532,6 +22532,10 @@
2253222532
"type": "string",
2253322533
"default": ""
2253422534
},
22535+
"provisioningMode": {
22536+
"description": "provisioningMode is an optional field that specifies the provisioning type to be used by this vSphere data disk. Allowed values are \"Thin\", \"Thick\", \"EagerlyZeroed\", and omitted. When set to Thin, the disk will be made using thin provisioning allocating the bare minimum space. When set to Thick, the full disk size will be allocated when disk is created. When set to EagerlyZeroed, the disk will be created using eager zero provisioning. An eager zeroed thick disk has all space allocated and wiped clean of any previous contents on the physical media at creation time. Such disks may take longer time during creation compared to other disk formats. When omitted, no setting will be applied to the data disk and the provisioning mode for the disk will be determined by the default storage policy configured for the datastore in vSphere.",
22537+
"type": "string"
22538+
},
2253522539
"sizeGiB": {
2253622540
"description": "sizeGiB is the size of the disk in GiB. The maximum supported size 16384 GiB.",
2253722541
"type": "integer",

0 commit comments

Comments
 (0)
Please sign in to comment.