Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPLAT-2000: Add configuration for vSphere multi disk thinProvisioned #2154

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions machine/v1beta1/types_vsphereprovider.go
Original file line number Diff line number Diff line change
@@ -198,8 +198,34 @@ type VSphereDisk struct {
// +kubebuilder:validation:Maximum=16384
// +required
SizeGiB int32 `json:"sizeGiB"`
// 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.
// +optional
ProvisioningMode ProvisioningMode `json:"provisioningMode,omitempty"`
}

// provisioningMode represents the various provisioning types available to a VMs disk.
// +kubebuilder:validation:Enum=Thin;Thick;EagerlyZeroed
type ProvisioningMode string

const (
// ProvisioningModeThin creates the disk using thin provisioning. This means a sparse (allocate on demand)
// format with additional space optimizations.
ProvisioningModeThin ProvisioningMode = "Thin"

// ProvisioningModeThick creates the disk with all space allocated.
ProvisioningModeThick ProvisioningMode = "Thick"

// ProvisioningModeEagerlyZeroed creates the disk 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.
ProvisioningModeEagerlyZeroed ProvisioningMode = "EagerlyZeroed"
)

// WorkspaceConfig defines a workspace configuration for the vSphere cloud
// provider.
type Workspace struct {
7 changes: 4 additions & 3 deletions machine/v1beta1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
@@ -22524,6 +22524,10 @@
"type": "string",
"default": ""
},
"provisioningMode": {
"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.",
"type": "string"
},
"sizeGiB": {
"description": "sizeGiB is the size of the disk in GiB. The maximum supported size 16384 GiB.",
"type": "integer",