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
Copy file name to clipboardExpand all lines: enhancements/machine-api/vsphere-data-disk.md
+59-12
Original file line number
Diff line number
Diff line change
@@ -110,10 +110,13 @@ compute:
110
110
dataDisks:
111
111
- diskSizeGiB: 10
112
112
name: "container_images"
113
+
provisioningMode: "Thin"
113
114
- diskSizeGiB: 20
114
115
name: "log files"
116
+
provisioningMode: "Thick"
115
117
- diskSizeGiB: 30
116
118
name: "swap"
119
+
provisioningMode: "EagerlyZeroed"
117
120
replicas: 0
118
121
controlPlane:
119
122
architecture: amd64
@@ -131,13 +134,15 @@ controlPlane:
131
134
dataDisks:
132
135
- diskSizeGiB: 10
133
136
name: "etcd"
137
+
provisioningMode: "Thick"
134
138
- diskSizeGiB: 20
135
139
name: "container-images"
140
+
provisioningMode: "Thin"
136
141
replicas: 3
137
142
...
138
143
```
139
144
140
-
In the example above, we have added a new field `dataDisks` that is used to define each of the disks to create for the virtual machine. The `name` field is used to identify the disk. This is used primarily for debug and for identifying the disk definition. The `diskSizeGiB` field specifies how large the disk needs to be.
145
+
In the example above, we have added a new field `dataDisks` that is used to define each of the disks to create for the virtual machine. The `name` field is used to identify the disk. This is used primarily for debug and for identifying the disk definition. The `diskSizeGiB` field specifies how large the disk needs to be. The `provisioningMode` field specifies how the disk should be provisioned. This field supports the values of "Thin", "Thick", and "EagerlyZeroed"
141
146
142
147
#### API
143
148
@@ -156,15 +161,48 @@ type VSphereMachineProviderSpec struct {
156
161
157
162
// VSphereDisk describes additional disks for vSphere.
158
163
typeVSphereDiskstruct {
159
-
// name is a name to be used to identify the disk definition. If name is not specified,
160
-
// the disk will still be created. The name should be unique so that it can be used to clearly
161
-
// identify purpose of the disk, but is not required to be unique.
162
-
// +optional
164
+
// name is used to identify the disk definition. name is required needs to be unique so that it can be used to
165
+
// clearly identify purpose of the disk.
166
+
// It must be at most 80 characters in length and must consist only of alphanumeric characters, hyphens and underscores,
167
+
// and must start and end with an alphanumeric character.
// provisioningMode is an optional field that specifies the provisioning type to be used by this vSphere data disk.
180
+
// Allowed values are "Thin", "Thick", "EagerlyZeroed", and omitted.
181
+
// When set to Thin, the disk will be made using thin provisioning allocating the bare minimum space.
182
+
// When set to Thick, the full disk size will be allocated when disk is created.
183
+
// 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.
184
+
// When omitted, no setting will be applied to the data disk and the provisioning mode for the disk will be determined by the storage policy attached to the datastore.
Examples of the various CRs using the above type enhancement:
@@ -217,8 +255,10 @@ spec:
217
255
dataDisks:
218
256
- diskSizeGiB: 10
219
257
name: "etcd"
258
+
provisioningMode: "Thick"
220
259
- diskSizeGiB: 20
221
260
name: "container-images"
261
+
provisioningMode: "Thin"
222
262
diskGiB: 100
223
263
kind: VSphereMachineProviderSpec
224
264
memoryMiB: 16384
@@ -278,8 +318,10 @@ spec:
278
318
dataDisks:
279
319
- diskSizeGiB: 10
280
320
name: "etcd"
321
+
provisioningMode: "Thick"
281
322
- diskSizeGiB: 20
282
323
name: "container-images"
324
+
provisioningMode: "Thin"
283
325
diskGiB: 100
284
326
kind: VSphereMachineProviderSpec
285
327
memoryMiB: 16384
@@ -342,10 +384,13 @@ spec:
342
384
dataDisks:
343
385
- diskSizeGiB: 10
344
386
name: "container_images"
387
+
provisioningMode: "Thin"
345
388
- diskSizeGiB: 20
346
389
name: "log files"
390
+
provisioningMode: "Thick"
347
391
- diskSizeGiB: 30
348
392
name: "swap"
393
+
provisioningMode: "EagerlyZeroed"
349
394
diskGiB: 60
350
395
kind: VSphereMachineProviderSpec
351
396
memoryMiB: 8192
@@ -384,11 +429,11 @@ N/A
384
429
385
430
### Implementation Details/Notes/Constraints
386
431
387
-
What are some important details that didn't come across above in the
388
-
**Proposal**? Go in to as much detail as necessary here. This might be
389
-
a good place to talk about core concepts and how they relate. While it is useful
390
-
to go into the details of the code changes required, it is not necessary to show
391
-
how the code will be rewritten in the enhancement.
432
+
Many of the choices made above were based on how CAPV implemented the feature. This was to make sure we keep these APIs in sync with CAPI so that we can migrate our existing infrastructure to CAPI implementation in the future.
433
+
434
+
The installer is responsible for initially setting up the cluster with the data disks configurations for the control plane nodes. The installer is preconfiguring a machineset for compute nodes as well but can be modified in day 2+. The installer is also leveraging CAPI to install the control plane VMs. We have updated installer to use latest version of CAPV to get access to the upstream changes for this feature. The CPMS definition also has been enhanced to allow the CPMS operator to monitor changes in the disk configs.
435
+
436
+
The data disk configs are allowing the administrator to configure each data disk individually for provisioning mode. The installer today via the install-config.yaml does allow the administrator to set the provisioning mode used on the template's clone process. This configuration setting will also be used by govmomi / vCenter when creating the VMs data disks if the data disk config has omitted the provisioning mode field.
392
437
393
438
### Risks and Mitigations
394
439
@@ -402,6 +447,8 @@ N/A
402
447
403
448
> 1. Are there any other disk configuration options that we must add in order for this feature to be GA ready? Is keeping it simple w/ just size enough for GA or just TP?
404
449
450
+
Update: Added ability to set provisioning mode for each disk has been added to address allowing admins to set each disk specifically for their needs.
451
+
405
452
## Test Plan
406
453
407
454
- We will add an automated test to CI to test installing a cluster with data disks assigned to both control plane and compute nodes.
0 commit comments