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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
25 changes: 23 additions & 2 deletions machine/v1beta1/types_vsphereprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,34 @@ type VSphereDisk struct {
// +required
Name string `json:"name"`
// sizeGiB is the size of the disk in GiB.
// The maximum supported size is 57742 GiB.
// The maximum supported size is 16384 GiB.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=57742
// +kubebuilder:validation:Maximum=16384
// +required
SizeGiB int32 `json:"sizeGiB"`
// provisioningType specifies the provisioning type to be used by default for VirtualMachine volumes exclusively
// owned by this VirtualMachine. This does not apply to PersistentVolumeClaim volumes that are created and managed externally.
// If not set, the setting will be provided by the default storage policy.
// +optional
ProvisioningType ProvisioningType `json:"provisioningType,omitempty"`
}

type ProvisioningType string

var (
// ThinProvisioned creates the disk using thin provisioning. This means a sparse (allocate on demand) format
// with additional space optimizations.
ThinProvisioned ProvisioningType = "ThinProvisioned"

// ThickProvisioned creates the disk with all space allocated.
ThickProvisioned ProvisioningType = "ThickProvisioned"

// EagerlyZeroed 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.
EagerlyZeroed ProvisioningType = "EagerlyZeroed"
)

// WorkspaceConfig defines a workspace configuration for the vSphere cloud
// provider.
type Workspace struct {
Expand Down
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.

9 changes: 8 additions & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

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

6 changes: 5 additions & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -22523,8 +22523,12 @@
"type": "string",
"default": ""
},
"provisioningType": {
"description": "provisioningType specifies the provisioning type to be used by default for VirtualMachine volumes exclusively owned by this VirtualMachine. This does not apply to PersistentVolumeClaim volumes that are created and managed externally. If not set, the setting will be provided by the default storage policy.",
"type": "string"
},
"sizeGiB": {
"description": "sizeGiB is the size of the disk in GiB. The maximum supported size is 57742 GiB.",
"description": "sizeGiB is the size of the disk in GiB. The maximum supported size is 16384 GiB.",
"type": "integer",
"format": "int32",
"default": 0
Expand Down