From 981dd64b13cd9a85d9bdb73fddafa9a4188d8ce1 Mon Sep 17 00:00:00 2001 From: vr4manta Date: Wed, 9 Oct 2024 09:11:47 -0400 Subject: [PATCH] Add vSphere multi disk support --- machine/v1beta1/types_vsphereprovider.go | 2 +- machine/v1beta1/zz_generated.deepcopy.go | 4 ++-- .../v1beta1/zz_generated.swagger_doc_generated.go | 2 +- openapi/generated_openapi/zz_generated.openapi.go | 2 +- openapi/openapi.json | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/machine/v1beta1/types_vsphereprovider.go b/machine/v1beta1/types_vsphereprovider.go index 08574505811..9dbdeeaad09 100644 --- a/machine/v1beta1/types_vsphereprovider.go +++ b/machine/v1beta1/types_vsphereprovider.go @@ -75,7 +75,7 @@ type VSphereMachineProviderSpec struct { // The first disk on that SCSI controller will be the OS disk from the template. // +openshift:enable:FeatureGate=VSphereMultiDisk // +optional - Disks []VSphereDisk `json:"disks,omitempty"` + DataDisks []VSphereDisk `json:"dataDisks,omitempty"` } // CloneMode is the type of clone operation used to clone a VM from a template. diff --git a/machine/v1beta1/zz_generated.deepcopy.go b/machine/v1beta1/zz_generated.deepcopy.go index 7407adc1d03..ba9aae81e2e 100644 --- a/machine/v1beta1/zz_generated.deepcopy.go +++ b/machine/v1beta1/zz_generated.deepcopy.go @@ -1816,8 +1816,8 @@ func (in *VSphereMachineProviderSpec) DeepCopyInto(out *VSphereMachineProviderSp *out = make([]string, len(*in)) copy(*out, *in) } - if in.Disks != nil { - in, out := &in.Disks, &out.Disks + if in.DataDisks != nil { + in, out := &in.DataDisks, &out.DataDisks *out = make([]VSphereDisk, len(*in)) copy(*out, *in) } diff --git a/machine/v1beta1/zz_generated.swagger_doc_generated.go b/machine/v1beta1/zz_generated.swagger_doc_generated.go index 6544f90878c..18594081b85 100644 --- a/machine/v1beta1/zz_generated.swagger_doc_generated.go +++ b/machine/v1beta1/zz_generated.swagger_doc_generated.go @@ -807,7 +807,7 @@ var map_VSphereMachineProviderSpec = map[string]string{ "tagIDs": "tagIDs is an optional set of tags to add to an instance. Specified tagIDs must use URN-notation instead of display names. A maximum of 10 tag IDs may be specified.", "snapshot": "Snapshot is the name of the snapshot from which the VM was cloned", "cloneMode": "CloneMode specifies the type of clone operation. The LinkedClone mode is only support for templates that have at least one snapshot. If the template has no snapshots, then CloneMode defaults to FullClone. When LinkedClone mode is enabled the DiskGiB field is ignored as it is not possible to expand disks of linked clones. Defaults to FullClone. When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone.", - "disks": "disks is a list of non OS disks to be created and attached to the VM. The max number of disk allowed to be attached is currently 15. This limitation is being applied to allow no more than 16 disks on the default scsi controller for the VM. The first disk on that SCSI controller will be the OS disk from the template.", + "dataDisks": "disks is a list of non OS disks to be created and attached to the VM. The max number of disk allowed to be attached is currently 15. This limitation is being applied to allow no more than 16 disks on the default scsi controller for the VM. The first disk on that SCSI controller will be the OS disk from the template.", } func (VSphereMachineProviderSpec) SwaggerDoc() map[string]string { diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 0be2816a2d5..5ada8e5041a 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -38667,7 +38667,7 @@ func schema_openshift_api_machine_v1beta1_VSphereMachineProviderSpec(ref common. Format: "", }, }, - "disks": { + "dataDisks": { SchemaProps: spec.SchemaProps{ Description: "disks is a list of non OS disks to be created and attached to the VM. The max number of disk allowed to be attached is currently 15. This limitation is being applied to allow no more than 16 disks on the default scsi controller for the VM. The first disk on that SCSI controller will be the OS disk from the template.", Type: []string{"array"}, diff --git a/openapi/openapi.json b/openapi/openapi.json index 208b6c867f0..dedc20d5f72 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -22277,12 +22277,7 @@ "description": "CredentialsSecret is a reference to the secret with vSphere credentials.", "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" }, - "diskGiB": { - "description": "DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned. This parameter will be ignored if 'LinkedClone' CloneMode is set.", - "type": "integer", - "format": "int32" - }, - "disks": { + "dataDisks": { "description": "disks is a list of non OS disks to be created and attached to the VM. The max number of disk allowed to be attached is currently 15. This limitation is being applied to allow no more than 16 disks on the default scsi controller for the VM. The first disk on that SCSI controller will be the OS disk from the template.", "type": "array", "items": { @@ -22290,6 +22285,11 @@ "$ref": "#/definitions/com.github.openshift.api.machine.v1beta1.VSphereDisk" } }, + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned. This parameter will be ignored if 'LinkedClone' CloneMode is set.", + "type": "integer", + "format": "int32" + }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string"