From f150765dcedb441a1447103e83d225350b78a8ca Mon Sep 17 00:00:00 2001 From: vr4manta Date: Wed, 18 Sep 2024 08:40:45 -0400 Subject: [PATCH 1/7] Vendor updates --- go.mod | 2 ++ go.sum | 4 ++-- .../openshift/api/features/features.go | 7 +++++++ .../machine/v1beta1/types_vsphereprovider.go | 18 ++++++++++++++++ .../machine/v1beta1/zz_generated.deepcopy.go | 21 +++++++++++++++++++ .../zz_generated.swagger_doc_generated.go | 11 ++++++++++ vendor/modules.txt | 3 ++- 7 files changed, 63 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e80efd4ddbf..9a01f511bfc 100644 --- a/go.mod +++ b/go.mod @@ -326,3 +326,5 @@ replace github.com/openshift/assisted-service/models => github.com/openshift/ass replace github.com/containerd/containerd => github.com/containerd/containerd v1.6.26 replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 + +replace github.com/openshift/api => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 diff --git a/go.sum b/go.sum index 7821d9c1d67..20d3d0573c0 100644 --- a/go.sum +++ b/go.sum @@ -930,8 +930,8 @@ github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/govmomi v0.43.0 h1:7Kg3Bkdly+TrE67BYXzRq7ZrDnn7xqpKX95uEh2f9Go= github.com/vmware/govmomi v0.43.0/go.mod h1:IOv5nTXCPqH9qVJAlRuAGffogaLsNs8aF+e7vLgsHJU= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 h1:WDXPgFYRTEmlo3wKeo3/9idb42JbckSd75GyfjpgLPU= +github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= diff --git a/vendor/github.com/openshift/api/features/features.go b/vendor/github.com/openshift/api/features/features.go index 7f496239543..2219393cd9b 100644 --- a/vendor/github.com/openshift/api/features/features.go +++ b/vendor/github.com/openshift/api/features/features.go @@ -175,6 +175,13 @@ var ( enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() + FeatureGateVSphereMultiDisk = newFeatureGate("VSphereMultiDisk"). + reportProblemsToJiraComponent("splat"). + contactPerson("vr4manta"). + productScope(ocpSpecific). + enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + mustRegister() + FeatureGateVSphereMultiVCenters = newFeatureGate("VSphereMultiVCenters"). reportProblemsToJiraComponent("splat"). contactPerson("vr4manta"). diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go index f458cbf6eff..387af8e564f 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go @@ -70,6 +70,12 @@ type VSphereMachineProviderSpec struct { // When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone. // +optional CloneMode CloneMode `json:"cloneMode,omitempty"` + // 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. + // +openshift:enable:FeatureGate=VSphereMultiDisk + // +optional + Disks []VSphereDisk `json:"disks,omitempty"` } // CloneMode is the type of clone operation used to clone a VM from a template. @@ -172,6 +178,18 @@ type NetworkDeviceSpec struct { AddressesFromPools []AddressesFromPool `json:"addressesFromPools,omitempty"` } +// VSphereDisk describes additional disks for vSphere. +type VSphereDisk struct { + // deviceName is a name to be used to identify the disk definition. If deviceName is not specified, + // the disk will still be created. The deviceName should be unique so that it can be used to clearly + // identify purpose of the disk, but is not required to be unique. + // +optional + DeviceName string `json:"deviceName,omitempty"` + // sizeGB is the size of the disk (in GiB). + // +kubebuilder:validation:Required + SizeGiB int64 `json:"sizeGiB"` +} + // WorkspaceConfig defines a workspace configuration for the vSphere cloud // provider. type Workspace struct { diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go index d37ac11e6af..7407adc1d03 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go @@ -1774,6 +1774,22 @@ func (in *VMDiskSecurityProfile) DeepCopy() *VMDiskSecurityProfile { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VSphereDisk) DeepCopyInto(out *VSphereDisk) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDisk. +func (in *VSphereDisk) DeepCopy() *VSphereDisk { + if in == nil { + return nil + } + out := new(VSphereDisk) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VSphereMachineProviderSpec) DeepCopyInto(out *VSphereMachineProviderSpec) { *out = *in @@ -1800,6 +1816,11 @@ func (in *VSphereMachineProviderSpec) DeepCopyInto(out *VSphereMachineProviderSp *out = make([]string, len(*in)) copy(*out, *in) } + if in.Disks != nil { + in, out := &in.Disks, &out.Disks + *out = make([]VSphereDisk, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go index 5bba232bf7f..fa32b98da0c 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go @@ -783,6 +783,16 @@ func (NetworkSpec) SwaggerDoc() map[string]string { return map_NetworkSpec } +var map_VSphereDisk = map[string]string{ + "": "VSphereDisk describes additional disks for vSphere.", + "deviceName": "deviceName is a name to be used to identify the disk definition. If deviceName is not specified, the disk will still be created. The deviceName should be unique so that it can be used to clearly identify purpose of the disk, but is not required to be unique.", + "sizeGb": "sizeGB is the size of the disk (in GiB).", +} + +func (VSphereDisk) SwaggerDoc() map[string]string { + return map_VSphereDisk +} + var map_VSphereMachineProviderSpec = map[string]string{ "": "VSphereMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an VSphere virtual machine. It is used by the vSphere machine actuator to create a single Machine. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", "userDataSecret": "UserDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", @@ -797,6 +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.", } func (VSphereMachineProviderSpec) SwaggerDoc() map[string]string { diff --git a/vendor/modules.txt b/vendor/modules.txt index f6e469b688a..062d5bf9ac9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1077,7 +1077,7 @@ github.com/opencontainers/image-spec/specs-go/v1 # github.com/opencontainers/runtime-spec v1.2.0 ## explicit github.com/opencontainers/runtime-spec/specs-go -# github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f +# github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 ## explicit; go 1.22.0 github.com/openshift/api/annotations github.com/openshift/api/config/v1 @@ -2557,3 +2557,4 @@ sigs.k8s.io/yaml/goyaml.v3 # github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20241001055825-63e8b0d3ad63 # github.com/containerd/containerd => github.com/containerd/containerd v1.6.26 # github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 +# github.com/openshift/api => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 From 055d8943f22c32a70b1b8924c4f773987086e589 Mon Sep 17 00:00:00 2001 From: vr4manta Date: Wed, 18 Sep 2024 08:41:08 -0400 Subject: [PATCH 2/7] Added vSphere multi disk support --- .../install.openshift.io_installconfigs.yaml | 42 ++++++++ pkg/asset/machines/vsphere/machines.go | 11 ++ pkg/destroy/ovirt/destroyer.go | 2 +- pkg/infrastructure/clusterapi/clusterapi.go | 7 +- pkg/infrastructure/clusterapi/types.go | 7 +- .../vsphere/clusterapi/clusterapi.go | 101 ++++++++++++++++++ pkg/types/vsphere/machinepool.go | 17 +++ pkg/types/vsphere/validation/featuregates.go | 24 +++++ 8 files changed, 204 insertions(+), 7 deletions(-) diff --git a/data/data/install.openshift.io_installconfigs.yaml b/data/data/install.openshift.io_installconfigs.yaml index cde90873fba..f5f2e1d21cb 100644 --- a/data/data/install.openshift.io_installconfigs.yaml +++ b/data/data/install.openshift.io_installconfigs.yaml @@ -1147,6 +1147,20 @@ spec: description: VSphere is the configuration used when installing on vSphere. properties: + additionalDisks: + description: AdditionalDisks defines additional disks to + add to vm that are not part of the template. + items: + description: AdditionalDisks defines the disk for a virtual + machine. + properties: + diskSizeGB: + description: DiskSizeGB defines the size of disk in + GB. + format: int32 + type: integer + type: object + type: array coresPerSocket: description: NumCoresPerSocket is the number of cores per socket in a vm. The number of vCPUs on the vm will be @@ -2222,6 +2236,20 @@ spec: description: VSphere is the configuration used when installing on vSphere. properties: + additionalDisks: + description: AdditionalDisks defines additional disks to add + to vm that are not part of the template. + items: + description: AdditionalDisks defines the disk for a virtual + machine. + properties: + diskSizeGB: + description: DiskSizeGB defines the size of disk in + GB. + format: int32 + type: integer + type: object + type: array coresPerSocket: description: NumCoresPerSocket is the number of cores per socket in a vm. The number of vCPUs on the vm will be NumCPUs/NumCoresPerSocket. @@ -4893,6 +4921,20 @@ spec: used when installing on VSphere for machine pools which do not define their own platform configuration. properties: + additionalDisks: + description: AdditionalDisks defines additional disks to add + to vm that are not part of the template. + items: + description: AdditionalDisks defines the disk for a virtual + machine. + properties: + diskSizeGB: + description: DiskSizeGB defines the size of disk in + GB. + format: int32 + type: integer + type: object + type: array coresPerSocket: description: NumCoresPerSocket is the number of cores per socket in a vm. The number of vCPUs on the vm will be NumCPUs/NumCoresPerSocket. diff --git a/pkg/asset/machines/vsphere/machines.go b/pkg/asset/machines/vsphere/machines.go index 041fdcd6f3c..89191746376 100644 --- a/pkg/asset/machines/vsphere/machines.go +++ b/pkg/asset/machines/vsphere/machines.go @@ -335,6 +335,16 @@ func provider(clusterID string, vcenter *vsphere.VCenter, failureDomain vsphere. networkDeviceSpec[i] = machineapi.NetworkDeviceSpec{NetworkName: network} } + additionalDisks := []machineapi.VSphereDisk{} + for i, curDisk := range mpool.AdditionalDisks { + diskName := fmt.Sprintf("Disk_%d", (i + 1)) + newDisk := machineapi.VSphereDisk{ + DeviceName: diskName, + SizeGiB: int64(curDisk.DiskSizeGB), + } + additionalDisks = append(additionalDisks, newDisk) + } + return &machineapi.VSphereMachineProviderSpec{ TypeMeta: metav1.TypeMeta{ APIVersion: machineapi.SchemeGroupVersion.String(), @@ -358,6 +368,7 @@ func provider(clusterID string, vcenter *vsphere.VCenter, failureDomain vsphere. NumCoresPerSocket: mpool.NumCoresPerSocket, MemoryMiB: mpool.MemoryMiB, DiskGiB: mpool.OSDisk.DiskSizeGB, + Disks: additionalDisks, }, nil } diff --git a/pkg/destroy/ovirt/destroyer.go b/pkg/destroy/ovirt/destroyer.go index 9031dd9340f..fd7d0f27d00 100644 --- a/pkg/destroy/ovirt/destroyer.go +++ b/pkg/destroy/ovirt/destroyer.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/ovirt/go-ovirt" + ovirtsdk "github.com/ovirt/go-ovirt" "github.com/sirupsen/logrus" "github.com/openshift/installer/pkg/asset/installconfig/ovirt" diff --git a/pkg/infrastructure/clusterapi/clusterapi.go b/pkg/infrastructure/clusterapi/clusterapi.go index 7a80ea1e8b1..77ea308172a 100644 --- a/pkg/infrastructure/clusterapi/clusterapi.go +++ b/pkg/infrastructure/clusterapi/clusterapi.go @@ -373,9 +373,10 @@ func (i *InfraProvider) Provision(ctx context.Context, dir string, parents asset if p, ok := i.impl.(PostProvider); ok { postMachineInput := PostProvisionInput{ - Client: cl, - InstallConfig: installConfig, - InfraID: clusterID.InfraID, + Client: cl, + InstallConfig: installConfig, + InfraID: clusterID.InfraID, + MachineManifests: machineManifests, } timer.StartTimer(postProvisionStage) diff --git a/pkg/infrastructure/clusterapi/types.go b/pkg/infrastructure/clusterapi/types.go index a373a7f1daa..ce8924aee67 100644 --- a/pkg/infrastructure/clusterapi/types.go +++ b/pkg/infrastructure/clusterapi/types.go @@ -97,9 +97,10 @@ type PostProvider interface { // PostProvisionInput collects the args passed to the PostProvision hook. type PostProvisionInput struct { - Client client.Client - InstallConfig *installconfig.InstallConfig - InfraID string + Client client.Client + InstallConfig *installconfig.InstallConfig + InfraID string + MachineManifests []client.Object } // BootstrapDestroyer allows platform-specific behavior when diff --git a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go index 0f7080c5b4e..043ba876620 100644 --- a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go +++ b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go @@ -2,10 +2,12 @@ package clusterapi import ( "context" + "errors" "fmt" "path" "strings" + "github.com/sirupsen/logrus" "github.com/vmware/govmomi/object" "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" "sigs.k8s.io/cluster-api-provider-vsphere/pkg/session" @@ -134,6 +136,50 @@ func (p Provider) PreProvision(ctx context.Context, in clusterapi.PreProvisionIn return nil } +// InfraReady is called once cluster.Status.InfrastructureReady +// is true, typically after load balancers have been provisioned. It can be used +// to create DNS records. +func (p Provider) InfraReady(ctx context.Context, in clusterapi.InfraReadyInput) error { + return nil +} + +// PostProvision should be called to add or update and vSphere resources after provisioning has completed. +func (p Provider) PostProvision(ctx context.Context, in clusterapi.PostProvisionInput) error { + // We will want to check to see if ControlPlane machines need additional disks + cpPool := in.InstallConfig.Config.ControlPlane.Platform.VSphere + + // If not set, nothing to do here. + if cpPool == nil { + return nil + } + + // If we have any additional disks defined, we'll need to create them here + if len(cpPool.AdditionalDisks) > 0 { + logrus.Info("Adding additional disks to control plane machines") + + for i := range in.MachineManifests { + if vm, ok := in.MachineManifests[i].(*v1beta1.VSphereMachine); ok { + if !strings.HasSuffix(vm.Name, "bootstrap") { + logrus.Infof("Adding additional disks to vm %s", vm.Name) + server := vm.Spec.Server + vctrSession, err := in.InstallConfig.VSphere.Session(context.TODO(), server) + + if err != nil { + return err + } + err = addAdditionalDisks(ctx, vm, cpPool, vctrSession) + + if err != nil { + return err + } + } + } + } + } + + return nil +} + // downloadImage if any failure domains don't have a defined template, this function // returns true. func downloadImage(installConfig *installconfig.InstallConfig) bool { @@ -144,3 +190,58 @@ func downloadImage(installConfig *installconfig.InstallConfig) bool { } return false } + +func addAdditionalDisks(ctx context.Context, machine *v1beta1.VSphereMachine, pool *vsphere.MachinePool, session *session.Session) error { + logrus.Debugf("Getting vm %v", machine.Name) + vm, err := session.Finder.VirtualMachine(ctx, fmt.Sprintf("%s/%s", machine.Spec.Folder, machine.Name)) + offset := 1 // For now, we assume only one disk is current attached to VM. + + if err != nil { + return err + } + + logrus.Debugf("Getting VM devices") + devices, err := vm.Device(ctx) + if err != nil { + return err + } + + logrus.Debugf("Getting datastore %v", machine.Spec.Datastore) + ds, err := session.Finder.Datastore(ctx, machine.Spec.Datastore) + if err != nil { + return err + } + + // For now, we only do the active scsi controller + logrus.Debug("Getting scsi controller") + controller, err := devices.FindSCSIController("") + if err != nil { + return err + } + + for diskIndex, newDisk := range pool.AdditionalDisks { + logrus.Debugf("Attempting to add disk %d with size %dGB", diskIndex, newDisk.DiskSizeGB) + + disk := devices.CreateDisk(controller, ds.Reference(), "") + + existing := devices.SelectByBackingInfo(disk.Backing) + + if len(existing) > 0 { + logrus.Warningf("Disk already present for index %d", diskIndex) + return errors.New("disk already present") + } + + disk.CapacityInKB = int64(newDisk.DiskSizeGB) * 1024 * 1024 + unitNumber := int32(offset + diskIndex) + disk.VirtualDevice.UnitNumber = &unitNumber + + // Add disk using default profile of VM. + logrus.Infof("Adding disk device to vm %v", disk) + err = vm.AddDevice(ctx, disk) + if err != nil { + return err + } + } + + return nil +} diff --git a/pkg/types/vsphere/machinepool.go b/pkg/types/vsphere/machinepool.go index 1b4cd6ae0ed..b3059d12f82 100644 --- a/pkg/types/vsphere/machinepool.go +++ b/pkg/types/vsphere/machinepool.go @@ -24,6 +24,11 @@ type MachinePool struct { // +optional OSDisk `json:"osDisk"` + // AdditionalDisks defines additional disks to add to vm that are not part of the template. + // + // +optional + AdditionalDisks []AdditionalDisks `json:"additionalDisks"` + // Zones defines available zones // Zones is available in TechPreview. // @@ -39,6 +44,14 @@ type OSDisk struct { DiskSizeGB int32 `json:"diskSizeGB"` } +// AdditionalDisks defines the disk for a virtual machine. +type AdditionalDisks struct { + // DiskSizeGB defines the size of disk in GB. + // + // +optional + DiskSizeGB int32 `json:"diskSizeGB"` +} + // Set sets the values from `required` to `p`. func (p *MachinePool) Set(required *MachinePool) { if required == nil || p == nil { @@ -64,4 +77,8 @@ func (p *MachinePool) Set(required *MachinePool) { if len(required.Zones) > 0 { p.Zones = required.Zones } + + if len(required.AdditionalDisks) > 0 { + p.AdditionalDisks = required.AdditionalDisks + } } diff --git a/pkg/types/vsphere/validation/featuregates.go b/pkg/types/vsphere/validation/featuregates.go index 80b6b8c596f..4b3e92cc2ee 100644 --- a/pkg/types/vsphere/validation/featuregates.go +++ b/pkg/types/vsphere/validation/featuregates.go @@ -22,6 +22,9 @@ func GatedFeatures(c *types.InstallConfig) []featuregates.GatedInstallConfigFeat } } + cpDef := c.ControlPlane.Platform.VSphere + computeDefs := c.Compute + return []featuregates.GatedInstallConfigFeature{ { FeatureGateName: features.FeatureGateVSphereStaticIPs, @@ -43,5 +46,26 @@ func GatedFeatures(c *types.InstallConfig) []featuregates.GatedInstallConfigFeat Condition: nodeNetworkingDefined, Field: field.NewPath("platform", "vsphere", "nodeNetworking"), }, + { + FeatureGateName: features.FeatureGateVSphereMultiDisk, + Condition: cpDef != nil && len(cpDef.AdditionalDisks) > 0, // Here we need to check disk count + Field: field.NewPath("controlPlane", "platform", "vsphere", "additionalDisks"), + }, + { + FeatureGateName: features.FeatureGateVSphereMultiDisk, + Condition: hasAdditionalDisks(computeDefs), // Here we need to check disk count + Field: field.NewPath("compute", "platform", "vsphere", "additionalDisks"), + }, + } +} + +func hasAdditionalDisks(pool []types.MachinePool) bool { + foundAdditionalDisks := false + for _, machine := range pool { + if machine.Platform.VSphere != nil && len(machine.Platform.VSphere.AdditionalDisks) > 0 { + foundAdditionalDisks = true + break + } } + return foundAdditionalDisks } From 2789a89fd15b0b60f5559cc98b27f838c1db1a6b Mon Sep 17 00:00:00 2001 From: vr4manta Date: Mon, 30 Sep 2024 10:04:40 -0400 Subject: [PATCH 3/7] Fixed some logging --- pkg/infrastructure/vsphere/clusterapi/clusterapi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go index 043ba876620..ab42486622c 100644 --- a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go +++ b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go @@ -220,7 +220,7 @@ func addAdditionalDisks(ctx context.Context, machine *v1beta1.VSphereMachine, po } for diskIndex, newDisk := range pool.AdditionalDisks { - logrus.Debugf("Attempting to add disk %d with size %dGB", diskIndex, newDisk.DiskSizeGB) + logrus.Debugf("Attempting to add disk %d with size %dGiB", diskIndex, newDisk.DiskSizeGB) disk := devices.CreateDisk(controller, ds.Reference(), "") @@ -236,7 +236,7 @@ func addAdditionalDisks(ctx context.Context, machine *v1beta1.VSphereMachine, po disk.VirtualDevice.UnitNumber = &unitNumber // Add disk using default profile of VM. - logrus.Infof("Adding disk device to vm %v", disk) + logrus.Infof("Adding disk device to vm %s", machine.Name) err = vm.AddDevice(ctx, disk) if err != nil { return err From ee6df1ddad81eb2c9fff46623ed650fafd3891d4 Mon Sep 17 00:00:00 2001 From: vr4manta Date: Mon, 30 Sep 2024 14:55:14 -0400 Subject: [PATCH 4/7] Changed logic to use CAPI for data disks --- cluster-api/providers/vsphere/go.mod | 2 + cluster-api/providers/vsphere/go.sum | 2 + .../golang.org/x/sys/unix/syscall_hurd.go | 1 + .../x/sys/unix/zerrors_darwin_amd64.go | 7 + .../x/sys/unix/zerrors_darwin_arm64.go | 7 + .../x/sys/unix/ztypes_darwin_amd64.go | 13 + .../x/sys/unix/ztypes_darwin_arm64.go | 13 + .../x/sys/unix/ztypes_freebsd_386.go | 1 + .../x/sys/unix/ztypes_freebsd_amd64.go | 1 + .../x/sys/unix/ztypes_freebsd_arm.go | 1 + .../x/sys/unix/ztypes_freebsd_arm64.go | 1 + .../x/sys/unix/ztypes_freebsd_riscv64.go | 1 + .../x/sys/unix/ztypes_linux_riscv64.go | 33 +++ .../x/sys/windows/syscall_windows.go | 4 + .../golang.org/x/sys/windows/types_windows.go | 45 ++++ .../x/sys/windows/zsyscall_windows.go | 38 +++ .../vendor/golang.org/x/term/term_windows.go | 1 + .../admissionregistration/v1alpha1/types.go | 4 +- .../admissionregistration/v1beta1/types.go | 4 +- .../vendor/k8s.io/api/batch/v1/types.go | 6 +- .../vendor/k8s.io/api/core/v1/generated.proto | 2 + .../vendor/k8s.io/api/core/v1/types.go | 6 +- .../pkg/util/httpstream/httpstream.go | 9 + .../applyconfigurations/internal/internal.go | 2 + .../v1alpha1/generated_expansion.go | 14 + .../.golangci.yml | 10 +- .../apis/v1beta1/types.go | 15 ++ .../{ => vmware}/serviceaccount_controller.go | 3 +- .../servicediscovery_controller.go | 8 +- .../controllers/vspherecluster_controller.go | 5 - .../pkg/services/govmomi/vcenter/clone.go | 44 ++++ go.mod | 2 + go.sum | 2 + pkg/asset/machines/vsphere/capimachines.go | 14 + .../x/tools/go/packages/external.go | 2 +- .../x/tools/internal/aliases/aliases.go | 10 +- .../x/tools/internal/aliases/aliases_go121.go | 4 +- .../x/tools/internal/aliases/aliases_go122.go | 5 +- .../x/tools/internal/gcimporter/iexport.go | 249 +++++++++++++++++- .../x/tools/internal/gcimporter/iimport.go | 18 +- .../tools/internal/gcimporter/ureader_yes.go | 28 +- .../x/tools/internal/imports/mod.go | 9 +- .../x/tools/internal/pkgbits/encoder.go | 43 +-- .../x/tools/internal/pkgbits/frames_go1.go | 21 -- .../x/tools/internal/pkgbits/frames_go17.go | 28 -- .../x/tools/internal/pkgbits/support.go | 2 +- .../x/tools/internal/pkgbits/sync.go | 23 ++ .../internal/pkgbits/syncmarker_string.go | 7 +- .../x/tools/internal/pkgbits/version.go | 85 ++++++ .../tools/internal/typesinternal/errorcode.go | 8 +- vendor/k8s.io/api/resource/v1alpha3/doc.go | 15 ++ .../v1alpha1/generated_expansion.go | 4 + .../apis/v1beta1/types.go | 15 ++ 53 files changed, 772 insertions(+), 125 deletions(-) rename cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/{ => vmware}/serviceaccount_controller.go (99%) rename cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/{ => vmware}/servicediscovery_controller.go (98%) delete mode 100644 vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go delete mode 100644 vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go create mode 100644 vendor/golang.org/x/tools/internal/pkgbits/version.go diff --git a/cluster-api/providers/vsphere/go.mod b/cluster-api/providers/vsphere/go.mod index 8efd041a7eb..2d24ca6b370 100644 --- a/cluster-api/providers/vsphere/go.mod +++ b/cluster-api/providers/vsphere/go.mod @@ -20,6 +20,8 @@ require ( github.com/vmware/govmomi v0.43.0 // indirect ) +replace sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074 + require ( github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect diff --git a/cluster-api/providers/vsphere/go.sum b/cluster-api/providers/vsphere/go.sum index 177b72fd883..2149931b1f0 100644 --- a/cluster-api/providers/vsphere/go.sum +++ b/cluster-api/providers/vsphere/go.sum @@ -248,6 +248,8 @@ github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9 github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505/go.mod h1:5rqRJ9zGR+KnKbkGx373WgN8xJpvAj99kHnfoDYRO5I= github.com/vmware/govmomi v0.43.0 h1:7Kg3Bkdly+TrE67BYXzRq7ZrDnn7xqpKX95uEh2f9Go= github.com/vmware/govmomi v0.43.0/go.mod h1:IOv5nTXCPqH9qVJAlRuAGffogaLsNs8aF+e7vLgsHJU= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074 h1:7LvmgO6YNMEEpH6dkJgM6ZkDGIiC4d3JvtHw8O2HRxs= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074/go.mod h1:9WD2xjNc8mGctPk03kMS0t8NH0eaFBnAkO+cIcS0qr0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/syscall_hurd.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/syscall_hurd.go index ba46651f8e3..a6a2d2fc2b9 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/syscall_hurd.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/syscall_hurd.go @@ -11,6 +11,7 @@ package unix int ioctl(int, unsigned long int, uintptr_t); */ import "C" +import "unsafe" func ioctl(fd int, req uint, arg uintptr) (err error) { r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index 4308ac1772b..d73c4652e6c 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -237,6 +237,9 @@ const ( CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 + CONNECT_DATA_AUTHENTICATED = 0x4 + CONNECT_DATA_IDEMPOTENT = 0x2 + CONNECT_RESUME_ON_READ_WRITE = 0x1 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -1265,6 +1268,10 @@ const ( RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 + SAE_ASSOCID_ALL = 0xffffffff + SAE_ASSOCID_ANY = 0x0 + SAE_CONNID_ALL = 0xffffffff + SAE_CONNID_ANY = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index c8068a7a169..4a55a400588 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -237,6 +237,9 @@ const ( CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 + CONNECT_DATA_AUTHENTICATED = 0x4 + CONNECT_DATA_IDEMPOTENT = 0x2 + CONNECT_RESUME_ON_READ_WRITE = 0x1 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -1265,6 +1268,10 @@ const ( RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 + SAE_ASSOCID_ALL = 0xffffffff + SAE_ASSOCID_ANY = 0x0 + SAE_CONNID_ALL = 0xffffffff + SAE_CONNID_ANY = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 091d107f3a5..d003c3d4378 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -306,6 +306,19 @@ type XVSockPgen struct { type _Socklen uint32 +type SaeAssocID uint32 + +type SaeConnID uint32 + +type SaEndpoints struct { + Srcif uint32 + Srcaddr *RawSockaddr + Srcaddrlen uint32 + Dstaddr *RawSockaddr + Dstaddrlen uint32 + _ [4]byte +} + type Xucred struct { Version uint32 Uid uint32 diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 28ff4ef74d0..0d45a941aae 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -306,6 +306,19 @@ type XVSockPgen struct { type _Socklen uint32 +type SaeAssocID uint32 + +type SaeConnID uint32 + +type SaEndpoints struct { + Srcif uint32 + Srcaddr *RawSockaddr + Srcaddrlen uint32 + Dstaddr *RawSockaddr + Dstaddrlen uint32 + _ [4]byte +} + type Xucred struct { Version uint32 Uid uint32 diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 6cbd094a3aa..51e13eb055f 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -625,6 +625,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index 7c03b6ee77f..d002d8ef3cc 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -630,6 +630,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 422107ee8b1..3f863d898dd 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -616,6 +616,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go index 505a12acfd9..61c72931066 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go @@ -610,6 +610,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go index cc986c79006..b5d17414f03 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go @@ -612,6 +612,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 15adc04142f..ad05b51a603 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -727,6 +727,37 @@ const ( RISCV_HWPROBE_EXT_ZBA = 0x8 RISCV_HWPROBE_EXT_ZBB = 0x10 RISCV_HWPROBE_EXT_ZBS = 0x20 + RISCV_HWPROBE_EXT_ZICBOZ = 0x40 + RISCV_HWPROBE_EXT_ZBC = 0x80 + RISCV_HWPROBE_EXT_ZBKB = 0x100 + RISCV_HWPROBE_EXT_ZBKC = 0x200 + RISCV_HWPROBE_EXT_ZBKX = 0x400 + RISCV_HWPROBE_EXT_ZKND = 0x800 + RISCV_HWPROBE_EXT_ZKNE = 0x1000 + RISCV_HWPROBE_EXT_ZKNH = 0x2000 + RISCV_HWPROBE_EXT_ZKSED = 0x4000 + RISCV_HWPROBE_EXT_ZKSH = 0x8000 + RISCV_HWPROBE_EXT_ZKT = 0x10000 + RISCV_HWPROBE_EXT_ZVBB = 0x20000 + RISCV_HWPROBE_EXT_ZVBC = 0x40000 + RISCV_HWPROBE_EXT_ZVKB = 0x80000 + RISCV_HWPROBE_EXT_ZVKG = 0x100000 + RISCV_HWPROBE_EXT_ZVKNED = 0x200000 + RISCV_HWPROBE_EXT_ZVKNHA = 0x400000 + RISCV_HWPROBE_EXT_ZVKNHB = 0x800000 + RISCV_HWPROBE_EXT_ZVKSED = 0x1000000 + RISCV_HWPROBE_EXT_ZVKSH = 0x2000000 + RISCV_HWPROBE_EXT_ZVKT = 0x4000000 + RISCV_HWPROBE_EXT_ZFH = 0x8000000 + RISCV_HWPROBE_EXT_ZFHMIN = 0x10000000 + RISCV_HWPROBE_EXT_ZIHINTNTL = 0x20000000 + RISCV_HWPROBE_EXT_ZVFH = 0x40000000 + RISCV_HWPROBE_EXT_ZVFHMIN = 0x80000000 + RISCV_HWPROBE_EXT_ZFA = 0x100000000 + RISCV_HWPROBE_EXT_ZTSO = 0x200000000 + RISCV_HWPROBE_EXT_ZACAS = 0x400000000 + RISCV_HWPROBE_EXT_ZICOND = 0x800000000 + RISCV_HWPROBE_EXT_ZIHINTPAUSE = 0x1000000000 RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5 RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0 RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1 @@ -734,4 +765,6 @@ const ( RISCV_HWPROBE_MISALIGNED_FAST = 0x3 RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4 RISCV_HWPROBE_MISALIGNED_MASK = 0x7 + RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE = 0x6 + RISCV_HWPROBE_WHICH_CPUS = 0x1 ) diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/syscall_windows.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/syscall_windows.go index 1fa34fd17c5..5cee9a3143f 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -313,6 +313,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode //sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo //sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition +//sys GetConsoleCP() (cp uint32, err error) = kernel32.GetConsoleCP +//sys GetConsoleOutputCP() (cp uint32, err error) = kernel32.GetConsoleOutputCP +//sys SetConsoleCP(cp uint32) (err error) = kernel32.SetConsoleCP +//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP //sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW //sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW //sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/types_windows.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/types_windows.go index 4d0c15745f8..7b97a154c95 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/types_windows.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/types_windows.go @@ -1060,6 +1060,7 @@ const ( SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6 SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4 SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12 + SIO_UDP_NETRESET = IOC_IN | IOC_VENDOR | 15 // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460 @@ -2031,6 +2032,50 @@ const ( IF_TYPE_IEEE1394 = 144 ) +// Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin +const ( + IpPrefixOriginOther = 0 + IpPrefixOriginManual = 1 + IpPrefixOriginWellKnown = 2 + IpPrefixOriginDhcp = 3 + IpPrefixOriginRouterAdvertisement = 4 + IpPrefixOriginUnchanged = 1 << 4 +) + +// Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin +const ( + NlsoOther = 0 + NlsoManual = 1 + NlsoWellKnown = 2 + NlsoDhcp = 3 + NlsoLinkLayerAddress = 4 + NlsoRandom = 5 + IpSuffixOriginOther = 0 + IpSuffixOriginManual = 1 + IpSuffixOriginWellKnown = 2 + IpSuffixOriginDhcp = 3 + IpSuffixOriginLinkLayerAddress = 4 + IpSuffixOriginRandom = 5 + IpSuffixOriginUnchanged = 1 << 4 +) + +// Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state +const ( + NldsInvalid = 0 + NldsTentative = 1 + NldsDuplicate = 2 + NldsDeprecated = 3 + NldsPreferred = 4 + IpDadStateInvalid = 0 + IpDadStateTentative = 1 + IpDadStateDuplicate = 2 + IpDadStateDeprecated = 3 + IpDadStatePreferred = 4 +) + type SocketAddress struct { Sockaddr *syscall.RawSockaddrAny SockaddrLength int32 diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 9bb979a3e47..4c2e1bdc01e 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -247,7 +247,9 @@ var ( procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") procGetComputerNameW = modkernel32.NewProc("GetComputerNameW") + procGetConsoleCP = modkernel32.NewProc("GetConsoleCP") procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") + procGetConsoleOutputCP = modkernel32.NewProc("GetConsoleOutputCP") procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW") procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") @@ -347,8 +349,10 @@ var ( procSetCommMask = modkernel32.NewProc("SetCommMask") procSetCommState = modkernel32.NewProc("SetCommState") procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts") + procSetConsoleCP = modkernel32.NewProc("SetConsoleCP") procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition") procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") + procSetConsoleOutputCP = modkernel32.NewProc("SetConsoleOutputCP") procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW") procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") @@ -2162,6 +2166,15 @@ func GetComputerName(buf *uint16, n *uint32) (err error) { return } +func GetConsoleCP() (cp uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0) + cp = uint32(r0) + if cp == 0 { + err = errnoErr(e1) + } + return +} + func GetConsoleMode(console Handle, mode *uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0) if r1 == 0 { @@ -2170,6 +2183,15 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) { return } +func GetConsoleOutputCP() (cp uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetConsoleOutputCP.Addr(), 0, 0, 0, 0) + cp = uint32(r0) + if cp == 0 { + err = errnoErr(e1) + } + return +} + func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0) if r1 == 0 { @@ -3038,6 +3060,14 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { return } +func SetConsoleCP(cp uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleCP.Addr(), 1, uintptr(cp), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func setConsoleCursorPosition(console Handle, position uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0) if r1 == 0 { @@ -3054,6 +3084,14 @@ func SetConsoleMode(console Handle, mode uint32) (err error) { return } +func SetConsoleOutputCP(cp uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleOutputCP.Addr(), 1, uintptr(cp), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SetCurrentDirectory(path *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) if r1 == 0 { diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/term/term_windows.go b/cluster-api/providers/vsphere/vendor/golang.org/x/term/term_windows.go index 465f560604e..df6bf948e14 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/term/term_windows.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/term/term_windows.go @@ -26,6 +26,7 @@ func makeRaw(fd int) (*State, error) { return nil, err } raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) + raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { return nil, err } diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go b/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go index bd6b17e1588..78d918bc72f 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go @@ -142,7 +142,7 @@ type ValidatingAdmissionPolicyList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. - Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. @@ -404,7 +404,7 @@ type ValidatingAdmissionPolicyBindingList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. - Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1beta1/types.go b/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1beta1/types.go index cf1e29a6cab..0f590312392 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1beta1/types.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1beta1/types.go @@ -158,7 +158,7 @@ type ValidatingAdmissionPolicyList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. - Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. @@ -419,7 +419,7 @@ type ValidatingAdmissionPolicyBindingList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. - Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/api/batch/v1/types.go b/cluster-api/providers/vsphere/vendor/k8s.io/api/batch/v1/types.go index 49b0ec6441d..adaefbab5a8 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/api/batch/v1/types.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/api/batch/v1/types.go @@ -174,7 +174,7 @@ type PodFailurePolicyOnExitCodesRequirement struct { // When specified, it should match one the container or initContainer // names in the pod template. // +optional - ContainerName *string `json:"containerName" protobuf:"bytes,1,opt,name=containerName"` + ContainerName *string `json:"containerName,omitempty" protobuf:"bytes,1,opt,name=containerName"` // Represents the relationship between the container exit code(s) and the // specified values. Containers completed with success (exit code 0) are @@ -234,14 +234,14 @@ type PodFailurePolicyRule struct { // Represents the requirement on the container exit codes. // +optional - OnExitCodes *PodFailurePolicyOnExitCodesRequirement `json:"onExitCodes" protobuf:"bytes,2,opt,name=onExitCodes"` + OnExitCodes *PodFailurePolicyOnExitCodesRequirement `json:"onExitCodes,omitempty" protobuf:"bytes,2,opt,name=onExitCodes"` // Represents the requirement on the pod conditions. The requirement is represented // as a list of pod condition patterns. The requirement is satisfied if at // least one pattern matches an actual pod condition. At most 20 elements are allowed. // +listType=atomic // +optional - OnPodConditions []PodFailurePolicyOnPodConditionsPattern `json:"onPodConditions" protobuf:"bytes,3,opt,name=onPodConditions"` + OnPodConditions []PodFailurePolicyOnPodConditionsPattern `json:"onPodConditions,omitempty" protobuf:"bytes,3,opt,name=onPodConditions"` } // PodFailurePolicy describes how failed pods influence the backoffLimit. diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/api/core/v1/generated.proto b/cluster-api/providers/vsphere/vendor/k8s.io/api/core/v1/generated.proto index f3b47c722d1..9ebc9b91bc5 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/api/core/v1/generated.proto +++ b/cluster-api/providers/vsphere/vendor/k8s.io/api/core/v1/generated.proto @@ -1997,6 +1997,7 @@ message HostAlias { // HostIP represents a single IP address allocated to the host. message HostIP { // IP is the IP address assigned to the host + // +required optional string ip = 1; } @@ -3693,6 +3694,7 @@ message PodExecOptions { // PodIP represents a single IP address allocated to the pod. message PodIP { // IP is the IP address assigned to the pod + // +required optional string ip = 1; } diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/api/core/v1/types.go b/cluster-api/providers/vsphere/vendor/k8s.io/api/core/v1/types.go index 328df9a7b7d..d5eca377592 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/api/core/v1/types.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/api/core/v1/types.go @@ -4340,13 +4340,15 @@ type PodDNSConfigOption struct { // PodIP represents a single IP address allocated to the pod. type PodIP struct { // IP is the IP address assigned to the pod - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` + // +required + IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` } // HostIP represents a single IP address allocated to the host. type HostIP struct { // IP is the IP address assigned to the host - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` + // +required + IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` } // EphemeralContainerCommon is a copy of all fields in Container to be inlined in diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go b/cluster-api/providers/vsphere/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go index a32fce5a0c1..8054b98676b 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go @@ -116,6 +116,15 @@ func IsUpgradeFailure(err error) bool { return errors.As(err, &upgradeErr) } +// isHTTPSProxyError returns true if error is Gorilla/Websockets HTTPS Proxy dial error; +// false otherwise (see https://github.com/kubernetes/kubernetes/issues/126134). +func IsHTTPSProxyError(err error) bool { + if err == nil { + return false + } + return strings.Contains(err.Error(), "proxy: unknown scheme: https") +} + // IsUpgradeRequest returns true if the given request is a connection upgrade request func IsUpgradeRequest(req *http.Request) bool { for _, h := range req.Header[http.CanonicalHeaderKey(HeaderConnection)] { diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go b/cluster-api/providers/vsphere/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go index 47bfb44e0c3..5cc22c97000 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -5661,6 +5661,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: ip type: scalar: string + default: "" - name: io.k8s.api.core.v1.HostPathVolumeSource map: fields: @@ -6747,6 +6748,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: ip type: scalar: string + default: "" - name: io.k8s.api.core.v1.PodOS map: fields: diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go b/cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go index 89220c3ce98..509e8116b88 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go @@ -1,5 +1,9 @@ /* +<<<<<<<< HEAD:cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go Copyright The Kubernetes Authors. +======== +Copyright 2024 The Kubernetes Authors. +>>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +18,18 @@ See the License for the specific language governing permissions and limitations under the License. */ +<<<<<<<< HEAD:cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go // Code generated by client-gen. DO NOT EDIT. package v1alpha1 type StorageVersionMigrationExpansion interface{} +======== +// +k8s:deepcopy-gen=package +// +k8s:protobuf-gen=package +// +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true +// +groupName=storagemigration.k8s.io + +package v1alpha1 // import "k8s.io/api/storagemigration/v1alpha1" +>>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/.golangci.yml b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/.golangci.yml index f00b7751c83..7bfdd69e1f7 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/.golangci.yml +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/.golangci.yml @@ -195,12 +195,18 @@ issues: exclude-rules: # Specific exclude rules for deprecated items that are still part of the codebase. These # should be removed as the referenced deprecated item is removed from the project. + # Deprecations for AutoConfigure - linters: - staticcheck - text: "SA1019: .* is deprecated: This package will be removed in one of the next releases." + text: "SA1019: .*AutoConfigure is deprecated" + # Deprecations for PreferredAPIServerCIDR - linters: - staticcheck - text: "SA1019: .* is deprecated: This field is going to be removed in a future release." + text: "SA1019: .*PreferredAPIServerCIDR is deprecated" + # Deprecations for old api groups + - linters: + - staticcheck + text: "SA1019: \"sigs.k8s.io/cluster-api-provider-vsphere/apis/(v1alpha3|v1alpha4)\" is deprecated: This package will be removed in one of the next releases." - linters: - revive text: "exported: exported method .*\\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported" diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go index 38bf6b5f816..e7b758df740 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go @@ -203,6 +203,21 @@ type VirtualMachineCloneSpec struct { // Check the compatibility with the ESXi version before setting the value. // +optional HardwareVersion string `json:"hardwareVersion,omitempty"` + // DataDisks holds information for additional disks to add to the VM that are not part of the VM's OVA template. + // +optional + DataDisks []VSphereDisk `json:"dataDisks,omitempty"` +} + +// VSphereDisk describes additional disks for vSphere to be added to VM that are not part of the VM OVA template. +type VSphereDisk struct { + // DeviceName is a name to be used to identify the disk definition. If deviceName is not specified, + // the disk will still be created. The deviceName should be unique so that it can be used to clearly + // identify purpose of the disk, but is not required to be unique. + // +optional + DeviceName string `json:"deviceName,omitempty"` + // SizeGiB is the size of the disk (in GiB). + // +kubebuilder:validation:Required + SizeGiB int64 `json:"sizeGiB"` } // VSphereMachineTemplateResource describes the data needed to create a VSphereMachine from a template. diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/serviceaccount_controller.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vmware/serviceaccount_controller.go similarity index 99% rename from cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/serviceaccount_controller.go rename to cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vmware/serviceaccount_controller.go index 1a3bb7c6770..71f2b68363e 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/serviceaccount_controller.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vmware/serviceaccount_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package vmware import ( "context" @@ -61,7 +61,6 @@ import ( const ( kindProviderServiceAccount = "ProviderServiceAccount" - systemServiceAccountPrefix = "system.serviceaccount" ) // AddServiceAccountProviderControllerToManager adds this controller to the provided manager. diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/servicediscovery_controller.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vmware/servicediscovery_controller.go similarity index 98% rename from cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/servicediscovery_controller.go rename to cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vmware/servicediscovery_controller.go index db9c8f3ea03..df3c8814a16 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/servicediscovery_controller.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vmware/servicediscovery_controller.go @@ -14,13 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package vmware import ( "context" "fmt" "net" "net/url" + "reflect" "time" "github.com/pkg/errors" @@ -485,3 +486,8 @@ func allClustersRequests(ctx context.Context, c client.Client) []reconcile.Reque } return requests } + +func clusterToVMwareInfrastructureMapFunc(ctx context.Context, controllerCtx *capvcontext.ControllerManagerContext) handler.MapFunc { + gvk := vmwarev1.GroupVersion.WithKind(reflect.TypeOf(&vmwarev1.VSphereCluster{}).Elem().Name()) + return clusterutilv1.ClusterToInfrastructureMapFunc(ctx, gvk, controllerCtx.Client, &vmwarev1.VSphereCluster{}) +} diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vspherecluster_controller.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vspherecluster_controller.go index 095ec8a9d07..d2596f47a40 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vspherecluster_controller.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/controllers/vspherecluster_controller.go @@ -172,8 +172,3 @@ func clusterToInfrastructureMapFunc(ctx context.Context, controllerCtx *capvcont gvk := infrav1.GroupVersion.WithKind(reflect.TypeOf(&infrav1.VSphereCluster{}).Elem().Name()) return clusterutilv1.ClusterToInfrastructureMapFunc(ctx, gvk, controllerCtx.Client, &infrav1.VSphereCluster{}) } - -func clusterToVMwareInfrastructureMapFunc(ctx context.Context, controllerCtx *capvcontext.ControllerManagerContext) handler.MapFunc { - gvk := vmwarev1.GroupVersion.WithKind(reflect.TypeOf(&vmwarev1.VSphereCluster{}).Elem().Name()) - return clusterutilv1.ClusterToInfrastructureMapFunc(ctx, gvk, controllerCtx.Client, &vmwarev1.VSphereCluster{}) -} diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter/clone.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter/clone.go index 91f64eb28dd..04897ed0af4 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter/clone.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter/clone.go @@ -29,6 +29,7 @@ import ( pbmTypes "github.com/vmware/govmomi/pbm/types" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" + "k8s.io/klog/v2" "k8s.io/utils/ptr" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" @@ -369,6 +370,49 @@ func getDiskSpec(vmCtx *capvcontext.VMContext, devices object.VirtualDeviceList) diskSpecs = append(diskSpecs, additionalDiskConfigSpec) } } + + // Now if we have increased the disk size of any additional disks that were in the template, we can now add new disks + // that are present in the additionalDisks list. + for i, dataDisk := range vmCtx.VSphereVM.Spec.DataDisks { + klog.InfoS("Adding disk", "spec", dataDisk) + + // Need storage policy + // Need scsi controller + controller, err := devices.FindDiskController("scsi") + if err != nil { + klog.Infof("Unable to get scsi controller") + } + + unit := int32(i + 1) + + dev := &types.VirtualDisk{ + VirtualDevice: types.VirtualDevice{ + Key: devices.NewKey() - int32(i), + Backing: &types.VirtualDiskFlatVer2BackingInfo{ + DiskMode: string(types.VirtualDiskModePersistent), + ThinProvisioned: types.NewBool(true), + VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ + FileName: "", + //Datastore: types.NewReference(datastore.Reference()), + }, + }, + UnitNumber: &unit, + ControllerKey: controller.GetVirtualController().Key, + }, + CapacityInKB: dataDisk.SizeGiB * 1024 * 1024, + } + + diskConfigSpec := types.VirtualDeviceConfigSpec{ + Device: dev, + Operation: types.VirtualDeviceConfigSpecOperationAdd, + FileOperation: types.VirtualDeviceConfigSpecFileOperationCreate, + } + + klog.InfoS("Generated device", "dev", dev) + + diskSpecs = append(diskSpecs, &diskConfigSpec) + } + return diskSpecs, nil } diff --git a/go.mod b/go.mod index 9a01f511bfc..3d99a029c71 100644 --- a/go.mod +++ b/go.mod @@ -328,3 +328,5 @@ replace github.com/containerd/containerd => github.com/containerd/containerd v1. replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 replace github.com/openshift/api => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 + +replace sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074 diff --git a/go.sum b/go.sum index 20d3d0573c0..2e4ed75cdd4 100644 --- a/go.sum +++ b/go.sum @@ -932,6 +932,8 @@ github.com/vmware/govmomi v0.43.0 h1:7Kg3Bkdly+TrE67BYXzRq7ZrDnn7xqpKX95uEh2f9Go github.com/vmware/govmomi v0.43.0/go.mod h1:IOv5nTXCPqH9qVJAlRuAGffogaLsNs8aF+e7vLgsHJU= github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 h1:WDXPgFYRTEmlo3wKeo3/9idb42JbckSd75GyfjpgLPU= github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074 h1:7LvmgO6YNMEEpH6dkJgM6ZkDGIiC4d3JvtHw8O2HRxs= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074/go.mod h1:9WD2xjNc8mGctPk03kMS0t8NH0eaFBnAkO+cIcS0qr0= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= diff --git a/pkg/asset/machines/vsphere/capimachines.go b/pkg/asset/machines/vsphere/capimachines.go index 6ca0aa83342..9ff7f40e613 100644 --- a/pkg/asset/machines/vsphere/capimachines.go +++ b/pkg/asset/machines/vsphere/capimachines.go @@ -148,6 +148,20 @@ func GenerateMachines(ctx context.Context, clusterID string, config *types.Insta }, }, } + + // If we have additional disks to add to VM, lets iterate through them and add to CAPV machine + if len(providerSpec.Disks) > 0 { + dataDisks := []capv.VSphereDisk{} + for _, disk := range providerSpec.Disks { + newDisk := capv.VSphereDisk{ + DeviceName: disk.DeviceName, + SizeGiB: disk.SizeGiB, + } + dataDisks = append(dataDisks, newDisk) + } + vsphereMachine.Spec.DataDisks = dataDisks + } + vsphereMachine.SetGroupVersionKind(capv.GroupVersion.WithKind("VSphereMachine")) capvMachines = append(capvMachines, vsphereMachine) diff --git a/vendor/golang.org/x/tools/go/packages/external.go b/vendor/golang.org/x/tools/go/packages/external.go index c2b4b711b59..8f7afcb5dfb 100644 --- a/vendor/golang.org/x/tools/go/packages/external.go +++ b/vendor/golang.org/x/tools/go/packages/external.go @@ -82,7 +82,7 @@ type DriverResponse struct { type driver func(cfg *Config, patterns ...string) (*DriverResponse, error) // findExternalDriver returns the file path of a tool that supplies -// the build system package structure, or "" if not found." +// the build system package structure, or "" if not found. // If GOPACKAGESDRIVER is set in the environment findExternalTool returns its // value, otherwise it searches for a binary named gopackagesdriver on the PATH. func findExternalDriver(cfg *Config) driver { diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases.go b/vendor/golang.org/x/tools/internal/aliases/aliases.go index c24c2eee457..f7798e3354e 100644 --- a/vendor/golang.org/x/tools/internal/aliases/aliases.go +++ b/vendor/golang.org/x/tools/internal/aliases/aliases.go @@ -22,11 +22,17 @@ import ( // GODEBUG=gotypesalias=... by invoking the type checker. The Enabled // function is expensive and should be called once per task (e.g. // package import), not once per call to NewAlias. -func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type) *types.TypeName { +// +// Precondition: enabled || len(tparams)==0. +// If materialized aliases are disabled, there must not be any type parameters. +func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type, tparams []*types.TypeParam) *types.TypeName { if enabled { tname := types.NewTypeName(pos, pkg, name, nil) - newAlias(tname, rhs) + newAlias(tname, rhs, tparams) return tname } + if len(tparams) > 0 { + panic("cannot create an alias with type parameters when gotypesalias is not enabled") + } return types.NewTypeName(pos, pkg, name, rhs) } diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go b/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go index 6652f7db0fb..a775fcc4bed 100644 --- a/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go +++ b/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go @@ -27,7 +27,9 @@ func Origin(alias *Alias) *Alias { panic("unreachabl // Unalias returns the type t for go <=1.21. func Unalias(t types.Type) types.Type { return t } -func newAlias(name *types.TypeName, rhs types.Type) *Alias { panic("unreachable") } +func newAlias(name *types.TypeName, rhs types.Type, tparams []*types.TypeParam) *Alias { + panic("unreachable") +} // Enabled reports whether [NewAlias] should create [types.Alias] types. // diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go b/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go index 3ef1afeb403..31c159e42e6 100644 --- a/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go +++ b/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go @@ -70,10 +70,9 @@ func Unalias(t types.Type) types.Type { return types.Unalias(t) } // newAlias is an internal alias around types.NewAlias. // Direct usage is discouraged as the moment. // Try to use NewAlias instead. -func newAlias(tname *types.TypeName, rhs types.Type) *Alias { +func newAlias(tname *types.TypeName, rhs types.Type, tparams []*types.TypeParam) *Alias { a := types.NewAlias(tname, rhs) - // TODO(go.dev/issue/65455): Remove kludgy workaround to set a.actual as a side-effect. - Unalias(a) + SetTypeParams(a, tparams) return a } diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go index deeb67f315a..5f283281a25 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go @@ -2,9 +2,227 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Indexed binary package export. -// This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; -// see that file for specification of the format. +// Indexed package export. +// +// The indexed export data format is an evolution of the previous +// binary export data format. Its chief contribution is introducing an +// index table, which allows efficient random access of individual +// declarations and inline function bodies. In turn, this allows +// avoiding unnecessary work for compilation units that import large +// packages. +// +// +// The top-level data format is structured as: +// +// Header struct { +// Tag byte // 'i' +// Version uvarint +// StringSize uvarint +// DataSize uvarint +// } +// +// Strings [StringSize]byte +// Data [DataSize]byte +// +// MainIndex []struct{ +// PkgPath stringOff +// PkgName stringOff +// PkgHeight uvarint +// +// Decls []struct{ +// Name stringOff +// Offset declOff +// } +// } +// +// Fingerprint [8]byte +// +// uvarint means a uint64 written out using uvarint encoding. +// +// []T means a uvarint followed by that many T objects. In other +// words: +// +// Len uvarint +// Elems [Len]T +// +// stringOff means a uvarint that indicates an offset within the +// Strings section. At that offset is another uvarint, followed by +// that many bytes, which form the string value. +// +// declOff means a uvarint that indicates an offset within the Data +// section where the associated declaration can be found. +// +// +// There are five kinds of declarations, distinguished by their first +// byte: +// +// type Var struct { +// Tag byte // 'V' +// Pos Pos +// Type typeOff +// } +// +// type Func struct { +// Tag byte // 'F' or 'G' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'G' +// Signature Signature +// } +// +// type Const struct { +// Tag byte // 'C' +// Pos Pos +// Value Value +// } +// +// type Type struct { +// Tag byte // 'T' or 'U' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'U' +// Underlying typeOff +// +// Methods []struct{ // omitted if Underlying is an interface type +// Pos Pos +// Name stringOff +// Recv Param +// Signature Signature +// } +// } +// +// type Alias struct { +// Tag byte // 'A' or 'B' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'B' +// Type typeOff +// } +// +// // "Automatic" declaration of each typeparam +// type TypeParam struct { +// Tag byte // 'P' +// Pos Pos +// Implicit bool +// Constraint typeOff +// } +// +// typeOff means a uvarint that either indicates a predeclared type, +// or an offset into the Data section. If the uvarint is less than +// predeclReserved, then it indicates the index into the predeclared +// types list (see predeclared in bexport.go for order). Otherwise, +// subtracting predeclReserved yields the offset of a type descriptor. +// +// Value means a type, kind, and type-specific value. See +// (*exportWriter).value for details. +// +// +// There are twelve kinds of type descriptors, distinguished by an itag: +// +// type DefinedType struct { +// Tag itag // definedType +// Name stringOff +// PkgPath stringOff +// } +// +// type PointerType struct { +// Tag itag // pointerType +// Elem typeOff +// } +// +// type SliceType struct { +// Tag itag // sliceType +// Elem typeOff +// } +// +// type ArrayType struct { +// Tag itag // arrayType +// Len uint64 +// Elem typeOff +// } +// +// type ChanType struct { +// Tag itag // chanType +// Dir uint64 // 1 RecvOnly; 2 SendOnly; 3 SendRecv +// Elem typeOff +// } +// +// type MapType struct { +// Tag itag // mapType +// Key typeOff +// Elem typeOff +// } +// +// type FuncType struct { +// Tag itag // signatureType +// PkgPath stringOff +// Signature Signature +// } +// +// type StructType struct { +// Tag itag // structType +// PkgPath stringOff +// Fields []struct { +// Pos Pos +// Name stringOff +// Type typeOff +// Embedded bool +// Note stringOff +// } +// } +// +// type InterfaceType struct { +// Tag itag // interfaceType +// PkgPath stringOff +// Embeddeds []struct { +// Pos Pos +// Type typeOff +// } +// Methods []struct { +// Pos Pos +// Name stringOff +// Signature Signature +// } +// } +// +// // Reference to a type param declaration +// type TypeParamType struct { +// Tag itag // typeParamType +// Name stringOff +// PkgPath stringOff +// } +// +// // Instantiation of a generic type (like List[T2] or List[int]) +// type InstanceType struct { +// Tag itag // instanceType +// Pos pos +// TypeArgs []typeOff +// BaseType typeOff +// } +// +// type UnionType struct { +// Tag itag // interfaceType +// Terms []struct { +// tilde bool +// Type typeOff +// } +// } +// +// +// +// type Signature struct { +// Params []Param +// Results []Param +// Variadic bool // omitted if Results is empty +// } +// +// type Param struct { +// Pos Pos +// Name stringOff +// Type typOff +// } +// +// +// Pos encodes a file:line:column triple, incorporating a simple delta +// encoding scheme within a data object. See exportWriter.pos for +// details. package gcimporter @@ -523,9 +741,22 @@ func (p *iexporter) doDecl(obj types.Object) { } if obj.IsAlias() { - w.tag(aliasTag) + alias, materialized := t.(*aliases.Alias) // may fail when aliases are not enabled + + var tparams *types.TypeParamList + if materialized { + tparams = aliases.TypeParams(alias) + } + if tparams.Len() == 0 { + w.tag(aliasTag) + } else { + w.tag(genericAliasTag) + } w.pos(obj.Pos()) - if alias, ok := t.(*aliases.Alias); ok { + if tparams.Len() > 0 { + w.tparamList(obj.Name(), tparams, obj.Pkg()) + } + if materialized { // Preserve materialized aliases, // even of non-exported types. t = aliases.Rhs(alias) @@ -745,7 +976,13 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { } switch t := t.(type) { case *aliases.Alias: - // TODO(adonovan): support parameterized aliases, following *types.Named. + if targs := aliases.TypeArgs(t); targs.Len() > 0 { + w.startType(instanceType) + w.pos(t.Obj().Pos()) + w.typeList(targs, pkg) + w.typ(aliases.Origin(t), pkg) + return + } w.startType(aliasType) w.qualifiedType(t.Obj()) diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go index 136aa03653c..ed2d5629596 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Indexed package import. -// See cmd/compile/internal/gc/iexport.go for the export data format. +// See iexport.go for the export data format. // This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go. @@ -562,14 +562,14 @@ func (r *importReader) obj(name string) { pos := r.pos() switch tag { - case aliasTag: + case aliasTag, genericAliasTag: + var tparams []*types.TypeParam + if tag == genericAliasTag { + tparams = r.tparamList() + } typ := r.typ() - // TODO(adonovan): support generic aliases: - // if tag == genericAliasTag { - // tparams := r.tparamList() - // alias.SetTypeParams(tparams) - // } - r.declare(aliases.NewAlias(r.p.aliases, pos, r.currPkg, name, typ)) + obj := aliases.NewAlias(r.p.aliases, pos, r.currPkg, name, typ, tparams) + r.declare(obj) case constTag: typ, val := r.value() @@ -862,7 +862,7 @@ func (r *importReader) string() string { return r.p.stringAt(r.uint64()) } func (r *importReader) doType(base *types.Named) (res types.Type) { k := r.kind() if debug { - r.p.trace("importing type %d (base: %s)", k, base) + r.p.trace("importing type %d (base: %v)", k, base) r.p.indent++ defer func() { r.p.indent-- diff --git a/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go b/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go index 2c077068877..f0742f5404b 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go @@ -52,8 +52,7 @@ func (pr *pkgReader) later(fn func()) { // See cmd/compile/internal/noder.derivedInfo. type derivedInfo struct { - idx pkgbits.Index - needed bool + idx pkgbits.Index } // See cmd/compile/internal/noder.typeInfo. @@ -110,13 +109,17 @@ func readUnifiedPackage(fset *token.FileSet, ctxt *types.Context, imports map[st r := pr.newReader(pkgbits.RelocMeta, pkgbits.PublicRootIdx, pkgbits.SyncPublic) pkg := r.pkg() - r.Bool() // has init + if r.Version().Has(pkgbits.HasInit) { + r.Bool() + } for i, n := 0, r.Len(); i < n; i++ { // As if r.obj(), but avoiding the Scope.Lookup call, // to avoid eager loading of imports. r.Sync(pkgbits.SyncObject) - assert(!r.Bool()) + if r.Version().Has(pkgbits.DerivedFuncInstance) { + assert(!r.Bool()) + } r.p.objIdx(r.Reloc(pkgbits.RelocObj)) assert(r.Len() == 0) } @@ -165,7 +168,7 @@ type readerDict struct { // tparams is a slice of the constructed TypeParams for the element. tparams []*types.TypeParam - // devived is a slice of types derived from tparams, which may be + // derived is a slice of types derived from tparams, which may be // instantiated while reading the current element. derived []derivedInfo derivedTypes []types.Type // lazily instantiated from derived @@ -471,7 +474,9 @@ func (r *reader) param() *types.Var { func (r *reader) obj() (types.Object, []types.Type) { r.Sync(pkgbits.SyncObject) - assert(!r.Bool()) + if r.Version().Has(pkgbits.DerivedFuncInstance) { + assert(!r.Bool()) + } pkg, name := r.p.objIdx(r.Reloc(pkgbits.RelocObj)) obj := pkgScope(pkg).Lookup(name) @@ -525,8 +530,12 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) { case pkgbits.ObjAlias: pos := r.pos() + var tparams []*types.TypeParam + if r.Version().Has(pkgbits.AliasTypeParamNames) { + tparams = r.typeParamNames() + } typ := r.typ() - declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ)) + declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ, tparams)) case pkgbits.ObjConst: pos := r.pos() @@ -632,7 +641,10 @@ func (pr *pkgReader) objDictIdx(idx pkgbits.Index) *readerDict { dict.derived = make([]derivedInfo, r.Len()) dict.derivedTypes = make([]types.Type, len(dict.derived)) for i := range dict.derived { - dict.derived[i] = derivedInfo{r.Reloc(pkgbits.RelocType), r.Bool()} + dict.derived[i] = derivedInfo{idx: r.Reloc(pkgbits.RelocType)} + if r.Version().Has(pkgbits.DerivedInfoNeeded) { + assert(!r.Bool()) + } } pr.retireReader(r) diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go index 91221fda322..8555e3f83da 100644 --- a/vendor/golang.org/x/tools/internal/imports/mod.go +++ b/vendor/golang.org/x/tools/internal/imports/mod.go @@ -245,7 +245,10 @@ func newModuleResolver(e *ProcessEnv, moduleCacheCache *DirInfoCache) (*ModuleRe // 2. Use this to separate module cache scanning from other scanning. func gomodcacheForEnv(goenv map[string]string) string { if gmc := goenv["GOMODCACHE"]; gmc != "" { - return gmc + // golang/go#67156: ensure that the module cache is clean, since it is + // assumed as a prefix to directories scanned by gopathwalk, which are + // themselves clean. + return filepath.Clean(gmc) } gopaths := filepath.SplitList(goenv["GOPATH"]) if len(gopaths) == 0 { @@ -740,8 +743,8 @@ func (r *ModuleResolver) loadExports(ctx context.Context, pkg *pkg, includeTest func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) directoryPackageInfo { subdir := "" - if dir != root.Path { - subdir = dir[len(root.Path)+len("/"):] + if prefix := root.Path + string(filepath.Separator); strings.HasPrefix(dir, prefix) { + subdir = dir[len(prefix):] } importPath := filepath.ToSlash(subdir) if strings.HasPrefix(importPath, "vendor/") { diff --git a/vendor/golang.org/x/tools/internal/pkgbits/encoder.go b/vendor/golang.org/x/tools/internal/pkgbits/encoder.go index 6482617a4fc..c17a12399d0 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/encoder.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/encoder.go @@ -12,18 +12,15 @@ import ( "io" "math/big" "runtime" + "strings" ) -// currentVersion is the current version number. -// -// - v0: initial prototype -// -// - v1: adds the flags uint32 word -const currentVersion uint32 = 1 - // A PkgEncoder provides methods for encoding a package's Unified IR // export data. type PkgEncoder struct { + // version of the bitstream. + version Version + // elems holds the bitstream for previously encoded elements. elems [numRelocs][]string @@ -47,8 +44,9 @@ func (pw *PkgEncoder) SyncMarkers() bool { return pw.syncFrames >= 0 } // export data files, but can help diagnosing desync errors in // higher-level Unified IR reader/writer code. If syncFrames is // negative, then sync markers are omitted entirely. -func NewPkgEncoder(syncFrames int) PkgEncoder { +func NewPkgEncoder(version Version, syncFrames int) PkgEncoder { return PkgEncoder{ + version: version, stringsIdx: make(map[string]Index), syncFrames: syncFrames, } @@ -64,13 +62,15 @@ func (pw *PkgEncoder) DumpTo(out0 io.Writer) (fingerprint [8]byte) { assert(binary.Write(out, binary.LittleEndian, x) == nil) } - writeUint32(currentVersion) + writeUint32(uint32(pw.version)) - var flags uint32 - if pw.SyncMarkers() { - flags |= flagSyncMarkers + if pw.version.Has(Flags) { + var flags uint32 + if pw.SyncMarkers() { + flags |= flagSyncMarkers + } + writeUint32(flags) } - writeUint32(flags) // Write elemEndsEnds. var sum uint32 @@ -159,7 +159,7 @@ type Encoder struct { // Flush finalizes the element's bitstream and returns its Index. func (w *Encoder) Flush() Index { - var sb bytes.Buffer // TODO(mdempsky): strings.Builder after #44505 is resolved + var sb strings.Builder // Backup the data so we write the relocations at the front. var tmp bytes.Buffer @@ -189,7 +189,7 @@ func (w *Encoder) Flush() Index { func (w *Encoder) checkErr(err error) { if err != nil { - errorf("unexpected encoding error: %v", err) + panicf("unexpected encoding error: %v", err) } } @@ -320,8 +320,14 @@ func (w *Encoder) Code(c Code) { // section (if not already present), and then writing a relocation // into the element bitstream. func (w *Encoder) String(s string) { + w.StringRef(w.p.StringIdx(s)) +} + +// StringRef writes a reference to the given index, which must be a +// previously encoded string value. +func (w *Encoder) StringRef(idx Index) { w.Sync(SyncString) - w.Reloc(RelocString, w.p.StringIdx(s)) + w.Reloc(RelocString, idx) } // Strings encodes and writes a variable-length slice of strings into @@ -348,7 +354,7 @@ func (w *Encoder) Value(val constant.Value) { func (w *Encoder) scalar(val constant.Value) { switch v := constant.Val(val).(type) { default: - errorf("unhandled %v (%v)", val, val.Kind()) + panicf("unhandled %v (%v)", val, val.Kind()) case bool: w.Code(ValBool) w.Bool(v) @@ -381,3 +387,6 @@ func (w *Encoder) bigFloat(v *big.Float) { b := v.Append(nil, 'p', -1) w.String(string(b)) // TODO: More efficient encoding. } + +// Version reports the version of the bitstream. +func (w *Encoder) Version() Version { return w.p.version } diff --git a/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go b/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go deleted file mode 100644 index 5294f6a63ed..00000000000 --- a/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.7 -// +build !go1.7 - -// TODO(mdempsky): Remove after #44505 is resolved - -package pkgbits - -import "runtime" - -func walkFrames(pcs []uintptr, visit frameVisitor) { - for _, pc := range pcs { - fn := runtime.FuncForPC(pc) - file, line := fn.FileLine(pc) - - visit(file, line, fn.Name(), pc-fn.Entry()) - } -} diff --git a/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go b/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go deleted file mode 100644 index 2324ae7adfe..00000000000 --- a/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.7 -// +build go1.7 - -package pkgbits - -import "runtime" - -// walkFrames calls visit for each call frame represented by pcs. -// -// pcs should be a slice of PCs, as returned by runtime.Callers. -func walkFrames(pcs []uintptr, visit frameVisitor) { - if len(pcs) == 0 { - return - } - - frames := runtime.CallersFrames(pcs) - for { - frame, more := frames.Next() - visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry) - if !more { - return - } - } -} diff --git a/vendor/golang.org/x/tools/internal/pkgbits/support.go b/vendor/golang.org/x/tools/internal/pkgbits/support.go index ad26d3b28ca..50534a29553 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/support.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/support.go @@ -12,6 +12,6 @@ func assert(b bool) { } } -func errorf(format string, args ...interface{}) { +func panicf(format string, args ...any) { panic(fmt.Errorf(format, args...)) } diff --git a/vendor/golang.org/x/tools/internal/pkgbits/sync.go b/vendor/golang.org/x/tools/internal/pkgbits/sync.go index 5bd51ef7170..1520b73afb9 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/sync.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/sync.go @@ -6,6 +6,7 @@ package pkgbits import ( "fmt" + "runtime" "strings" ) @@ -23,6 +24,24 @@ func fmtFrames(pcs ...uintptr) []string { type frameVisitor func(file string, line int, name string, offset uintptr) +// walkFrames calls visit for each call frame represented by pcs. +// +// pcs should be a slice of PCs, as returned by runtime.Callers. +func walkFrames(pcs []uintptr, visit frameVisitor) { + if len(pcs) == 0 { + return + } + + frames := runtime.CallersFrames(pcs) + for { + frame, more := frames.Next() + visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry) + if !more { + return + } + } +} + // SyncMarker is an enum type that represents markers that may be // written to export data to ensure the reader and writer stay // synchronized. @@ -110,4 +129,8 @@ const ( SyncStmtsEnd SyncLabel SyncOptLabel + + SyncMultiExpr + SyncRType + SyncConvRTTI ) diff --git a/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go b/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go index 4a5b0ca5f2f..582ad56d3e0 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go @@ -74,11 +74,14 @@ func _() { _ = x[SyncStmtsEnd-64] _ = x[SyncLabel-65] _ = x[SyncOptLabel-66] + _ = x[SyncMultiExpr-67] + _ = x[SyncRType-68] + _ = x[SyncConvRTTI-69] } -const _SyncMarker_name = "EOFBoolInt64Uint64StringValueValRelocsRelocUseRelocPublicPosPosBaseObjectObject1PkgPkgDefMethodTypeTypeIdxTypeParamNamesSignatureParamsParamCodeObjSymLocalIdentSelectorPrivateFuncExtVarExtTypeExtPragmaExprListExprsExprExprTypeAssignOpFuncLitCompLitDeclFuncBodyOpenScopeCloseScopeCloseAnotherScopeDeclNamesDeclNameStmtsBlockStmtIfStmtForStmtSwitchStmtRangeStmtCaseClauseCommClauseSelectStmtDeclsLabeledStmtUseObjLocalAddLocalLinknameStmt1StmtsEndLabelOptLabel" +const _SyncMarker_name = "EOFBoolInt64Uint64StringValueValRelocsRelocUseRelocPublicPosPosBaseObjectObject1PkgPkgDefMethodTypeTypeIdxTypeParamNamesSignatureParamsParamCodeObjSymLocalIdentSelectorPrivateFuncExtVarExtTypeExtPragmaExprListExprsExprExprTypeAssignOpFuncLitCompLitDeclFuncBodyOpenScopeCloseScopeCloseAnotherScopeDeclNamesDeclNameStmtsBlockStmtIfStmtForStmtSwitchStmtRangeStmtCaseClauseCommClauseSelectStmtDeclsLabeledStmtUseObjLocalAddLocalLinknameStmt1StmtsEndLabelOptLabelMultiExprRTypeConvRTTI" -var _SyncMarker_index = [...]uint16{0, 3, 7, 12, 18, 24, 29, 32, 38, 43, 51, 57, 60, 67, 73, 80, 83, 89, 95, 99, 106, 120, 129, 135, 140, 147, 150, 160, 168, 175, 182, 188, 195, 201, 209, 214, 218, 226, 232, 234, 241, 248, 252, 260, 269, 279, 296, 305, 313, 318, 327, 333, 340, 350, 359, 369, 379, 389, 394, 405, 416, 424, 432, 437, 445, 450, 458} +var _SyncMarker_index = [...]uint16{0, 3, 7, 12, 18, 24, 29, 32, 38, 43, 51, 57, 60, 67, 73, 80, 83, 89, 95, 99, 106, 120, 129, 135, 140, 147, 150, 160, 168, 175, 182, 188, 195, 201, 209, 214, 218, 226, 232, 234, 241, 248, 252, 260, 269, 279, 296, 305, 313, 318, 327, 333, 340, 350, 359, 369, 379, 389, 394, 405, 416, 424, 432, 437, 445, 450, 458, 467, 472, 480} func (i SyncMarker) String() string { i -= 1 diff --git a/vendor/golang.org/x/tools/internal/pkgbits/version.go b/vendor/golang.org/x/tools/internal/pkgbits/version.go new file mode 100644 index 00000000000..53af9df22b3 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/pkgbits/version.go @@ -0,0 +1,85 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkgbits + +// Version indicates a version of a unified IR bitstream. +// Each Version indicates the addition, removal, or change of +// new data in the bitstream. +// +// These are serialized to disk and the interpretation remains fixed. +type Version uint32 + +const ( + // V0: initial prototype. + // + // All data that is not assigned a Field is in version V0 + // and has not been deprecated. + V0 Version = iota + + // V1: adds the Flags uint32 word + V1 + + // V2: removes unused legacy fields and supports type parameters for aliases. + // - remove the legacy "has init" bool from the public root + // - remove obj's "derived func instance" bool + // - add a TypeParamNames field to ObjAlias + // - remove derived info "needed" bool + V2 + + numVersions = iota +) + +// Field denotes a unit of data in the serialized unified IR bitstream. +// It is conceptually a like field in a structure. +// +// We only really need Fields when the data may or may not be present +// in a stream based on the Version of the bitstream. +// +// Unlike much of pkgbits, Fields are not serialized and +// can change values as needed. +type Field int + +const ( + // Flags in a uint32 in the header of a bitstream + // that is used to indicate whether optional features are enabled. + Flags Field = iota + + // Deprecated: HasInit was a bool indicating whether a package + // has any init functions. + HasInit + + // Deprecated: DerivedFuncInstance was a bool indicating + // whether an object was a function instance. + DerivedFuncInstance + + // ObjAlias has a list of TypeParamNames. + AliasTypeParamNames + + // Deprecated: DerivedInfoNeeded was a bool indicating + // whether a type was a derived type. + DerivedInfoNeeded + + numFields = iota +) + +// introduced is the version a field was added. +var introduced = [numFields]Version{ + Flags: V1, + AliasTypeParamNames: V2, +} + +// removed is the version a field was removed in or 0 for fields +// that have not yet been deprecated. +// (So removed[f]-1 is the last version it is included in.) +var removed = [numFields]Version{ + HasInit: V2, + DerivedFuncInstance: V2, + DerivedInfoNeeded: V2, +} + +// Has reports whether field f is present in a bitstream at version v. +func (v Version) Has(f Field) bool { + return introduced[f] <= v && (v < removed[f] || removed[f] == V0) +} diff --git a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go index 834e05381ce..131caab2847 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go @@ -838,7 +838,7 @@ const ( // InvalidCap occurs when an argument to the cap built-in function is not of // supported type. // - // See https://golang.org/ref/spec#Lengthand_capacity for information on + // See https://golang.org/ref/spec#Length_and_capacity for information on // which underlying types are supported as arguments to cap and len. // // Example: @@ -859,7 +859,7 @@ const ( // InvalidCopy occurs when the arguments are not of slice type or do not // have compatible type. // - // See https://golang.org/ref/spec#Appendingand_copying_slices for more + // See https://golang.org/ref/spec#Appending_and_copying_slices for more // information on the type requirements for the copy built-in. // // Example: @@ -897,7 +897,7 @@ const ( // InvalidLen occurs when an argument to the len built-in function is not of // supported type. // - // See https://golang.org/ref/spec#Lengthand_capacity for information on + // See https://golang.org/ref/spec#Length_and_capacity for information on // which underlying types are supported as arguments to cap and len. // // Example: @@ -914,7 +914,7 @@ const ( // InvalidMake occurs when make is called with an unsupported type argument. // - // See https://golang.org/ref/spec#Makingslices_maps_and_channels for + // See https://golang.org/ref/spec#Making_slices_maps_and_channels for // information on the types that may be created using make. // // Example: diff --git a/vendor/k8s.io/api/resource/v1alpha3/doc.go b/vendor/k8s.io/api/resource/v1alpha3/doc.go index aeb66561fb8..29916eeb816 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/doc.go +++ b/vendor/k8s.io/api/resource/v1alpha3/doc.go @@ -1,5 +1,9 @@ /* +<<<<<<<< HEAD:vendor/k8s.io/api/resource/v1alpha3/doc.go Copyright 2022 The Kubernetes Authors. +======== +Copyright 2016 The Kubernetes Authors. +>>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +18,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +<<<<<<<< HEAD:vendor/k8s.io/api/resource/v1alpha3/doc.go // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package @@ -22,3 +27,13 @@ limitations under the License. // Package v1alpha3 is the v1alpha3 version of the resource API. package v1alpha3 // import "k8s.io/api/resource/v1alpha3" +======== +package portforward + +const ( + PortForwardV1Name = "portforward.k8s.io" + WebsocketsSPDYTunnelingPrefix = "SPDY/3.1+" + KubernetesSuffix = ".k8s.io" + WebsocketsSPDYTunnelingPortForwardV1 = WebsocketsSPDYTunnelingPrefix + PortForwardV1Name +) +>>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go index 2dc2f30cfc4..459ee337b72 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go @@ -18,4 +18,8 @@ limitations under the License. package v1alpha1 +<<<<<<<< HEAD:vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go type LeaseCandidateExpansion interface{} +======== +type StorageVersionMigrationExpansion interface{} +>>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go diff --git a/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go b/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go index 38bf6b5f816..e7b758df740 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go @@ -203,6 +203,21 @@ type VirtualMachineCloneSpec struct { // Check the compatibility with the ESXi version before setting the value. // +optional HardwareVersion string `json:"hardwareVersion,omitempty"` + // DataDisks holds information for additional disks to add to the VM that are not part of the VM's OVA template. + // +optional + DataDisks []VSphereDisk `json:"dataDisks,omitempty"` +} + +// VSphereDisk describes additional disks for vSphere to be added to VM that are not part of the VM OVA template. +type VSphereDisk struct { + // DeviceName is a name to be used to identify the disk definition. If deviceName is not specified, + // the disk will still be created. The deviceName should be unique so that it can be used to clearly + // identify purpose of the disk, but is not required to be unique. + // +optional + DeviceName string `json:"deviceName,omitempty"` + // SizeGiB is the size of the disk (in GiB). + // +kubebuilder:validation:Required + SizeGiB int64 `json:"sizeGiB"` } // VSphereMachineTemplateResource describes the data needed to create a VSphereMachine from a template. From 5fe7c0151f3bfaadbc558aed10b67603a8678a98 Mon Sep 17 00:00:00 2001 From: vr4manta Date: Tue, 1 Oct 2024 13:16:23 -0400 Subject: [PATCH 5/7] Using CAPV to do disks --- cluster-api/Makefile | 22 + cluster-api/providers/vsphere/go.mod | 24 +- cluster-api/providers/vsphere/go.sum | 70 +- .../github.com/onsi/gomega/CHANGELOG.md | 8 + .../github.com/onsi/gomega/gomega_dsl.go | 2 +- .../bipartitegraph/bipartitegraphmatching.go | 2 +- .../vendor/golang.org/x/sys/unix/mkerrors.sh | 1 + .../golang.org/x/sys/unix/syscall_darwin.go | 37 + .../x/sys/unix/zerrors_zos_s390x.go | 2 + .../x/sys/unix/zsyscall_darwin_amd64.go | 20 + .../x/sys/unix/zsyscall_darwin_amd64.s | 5 + .../x/sys/unix/zsyscall_darwin_arm64.go | 20 + .../x/sys/unix/zsyscall_darwin_arm64.s | 5 + .../golang.org/x/sys/unix/ztypes_linux.go | 5 +- .../api/admissionregistration/v1/types.go | 4 +- .../apiserver/pkg/features/kube_features.go | 2 +- .../v1alpha1/generated_expansion.go | 14 - .../providers/vsphere/vendor/modules.txt | 27 +- .../cluster-api-provider-vsphere/Makefile | 11 +- .../cluster-api-provider-vsphere/README.md | 16 +- .../apis/v1alpha3/zz_generated.conversion.go | 1 + .../apis/v1alpha4/zz_generated.conversion.go | 1 + .../apis/v1beta1/types.go | 5 - .../apis/v1beta1/zz_generated.deepcopy.go | 20 + .../clusterctl-settings.json | 2 +- .../cluster-api-provider-vsphere/main.go | 4 +- .../metadata.yaml | 3 + .../pkg/services/govmomi/vcenter/clone.go | 116 +- .../tilt-provider.yaml | 4 +- .../vsphere-infrastructure-components.yaml | 14868 ++++++++-------- go.mod | 24 +- go.sum | 50 +- pkg/asset/machines/vsphere/capimachines.go | 7 +- pkg/asset/machines/vsphere/machines.go | 12 +- .../vsphere/clusterapi/clusterapi.go | 40 +- pkg/types/vsphere/machinepool.go | 16 +- pkg/types/vsphere/validation/featuregates.go | 18 +- vendor/github.com/gobuffalo/flect/humanize.go | 5 + vendor/github.com/onsi/gomega/CHANGELOG.md | 8 + vendor/github.com/onsi/gomega/gomega_dsl.go | 2 +- .../bipartitegraph/bipartitegraphmatching.go | 2 +- .../api/config/v1/types_infrastructure.go | 26 +- .../api/config/v1/zz_generated.deepcopy.go | 5 + ..._generated.featuregated-crd-manifests.yaml | 1 + .../v1/zz_generated.swagger_doc_generated.go | 11 +- .../openshift/api/features/features.go | 7 + .../machine/v1beta1/types_vsphereprovider.go | 9 +- .../machine/v1beta1/zz_generated.deepcopy.go | 4 +- .../zz_generated.swagger_doc_generated.go | 7 +- .../api/machineconfiguration/v1/types.go | 3 +- ..._generated.featuregated-crd-manifests.yaml | 1 + .../openshift/api/operator/v1/types.go | 32 +- .../api/operator/v1/types_ingress.go | 22 +- .../v1/zz_generated.swagger_doc_generated.go | 9 +- vendor/golang.org/x/oauth2/LICENSE | 4 +- vendor/golang.org/x/oauth2/token.go | 7 + .../x/tools/internal/pkgbits/decoder.go | 34 +- .../x/tools/internal/stdlib/manifest.go | 2 +- vendor/k8s.io/api/resource/v1alpha3/doc.go | 15 - .../v1alpha1/generated_expansion.go | 4 - vendor/modules.txt | 27 +- .../apis/v1beta1/types.go | 9 +- .../apis/v1beta1/zz_generated.deepcopy.go | 20 + 63 files changed, 8036 insertions(+), 7728 deletions(-) diff --git a/cluster-api/Makefile b/cluster-api/Makefile index f263a884673..9b838e565bb 100644 --- a/cluster-api/Makefile +++ b/cluster-api/Makefile @@ -7,6 +7,11 @@ GO_BUILD_TARGETS:= $(foreach DIR,$(PROVSUBDIRS), $(subst $(DIR),go-build.$(DIR), GO_CLEAN_TARGETS:= $(foreach DIR,$(PROVSUBDIRS), $(subst $(DIR),go-clean.$(DIR),$(DIR))) PROVIDER_TARGETS := $(foreach DIR,$(PROVSUBDIRS), bin/$(TARGET_OS_ARCH)/cluster-api-provider-$(DIR)) +##CONTROLLER_GEN_VER := v0.15.0 +##CONTROLLER_GEN_BIN := controller-gen +##CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)) +##CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen + LDFLAGS:= "-s -w" GCFLAGS:= "" @@ -57,3 +62,20 @@ go-clean-cluster-api: .PHONY: clean clean: go-clean + +##.PHONY: generate-manifests +#generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc. +# $(MAKE) clean-generated-yaml SRC_DIRS="$(CRD_ROOT),$(SUPERVISOR_CRD_ROOT),./config/govmomi/webhook/manifests.yaml,./config/supervisor/webhook/manifests.yaml" +# $(CONTROLLER_GEN) \ +# paths=./provider/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3 \ +# paths=./provider/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4 \ +# paths=./provider/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1 \ +# paths=./provider/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/internal/webhooks \ +# crd:crdVersions=v1 \ +# output:crd:dir=$(CRD_ROOT) \ +# output:webhook:dir=$(WEBHOOK_ROOT) \ +# webhook + +#.PHONY: clean-generated-yaml +#clean-generated-yaml: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1beta1" +# (IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name '*.yaml' -exec rm -f {} \;; done) \ No newline at end of file diff --git a/cluster-api/providers/vsphere/go.mod b/cluster-api/providers/vsphere/go.mod index 2d24ca6b370..7fdb5d1da99 100644 --- a/cluster-api/providers/vsphere/go.mod +++ b/cluster-api/providers/vsphere/go.mod @@ -20,7 +20,7 @@ require ( github.com/vmware/govmomi v0.43.0 // indirect ) -replace sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074 +replace sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011142218-bfea6dcafeea require ( github.com/NYTimes/gziphandler v1.1.1 // indirect @@ -62,7 +62,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/onsi/gomega v1.34.1 // indirect + github.com/onsi/gomega v1.34.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.18.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect @@ -83,11 +83,11 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/net v0.28.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect @@ -101,13 +101,13 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.30.3 // indirect - k8s.io/apiextensions-apiserver v0.30.3 // indirect - k8s.io/apimachinery v0.30.3 // indirect - k8s.io/apiserver v0.30.3 // indirect - k8s.io/client-go v0.30.3 // indirect - k8s.io/cluster-bootstrap v0.30.3 // indirect - k8s.io/component-base v0.30.3 // indirect + k8s.io/api v0.30.5 // indirect + k8s.io/apiextensions-apiserver v0.30.5 // indirect + k8s.io/apimachinery v0.30.5 // indirect + k8s.io/apiserver v0.30.5 // indirect + k8s.io/client-go v0.30.5 // indirect + k8s.io/cluster-bootstrap v0.30.5 // indirect + k8s.io/component-base v0.30.5 // indirect k8s.io/klog/v2 v2.120.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect diff --git a/cluster-api/providers/vsphere/go.sum b/cluster-api/providers/vsphere/go.sum index 2149931b1f0..001d23a65b3 100644 --- a/cluster-api/providers/vsphere/go.sum +++ b/cluster-api/providers/vsphere/go.sum @@ -114,8 +114,8 @@ github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -182,12 +182,12 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= -github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= +github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -248,8 +248,8 @@ github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9 github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505/go.mod h1:5rqRJ9zGR+KnKbkGx373WgN8xJpvAj99kHnfoDYRO5I= github.com/vmware/govmomi v0.43.0 h1:7Kg3Bkdly+TrE67BYXzRq7ZrDnn7xqpKX95uEh2f9Go= github.com/vmware/govmomi v0.43.0/go.mod h1:IOv5nTXCPqH9qVJAlRuAGffogaLsNs8aF+e7vLgsHJU= -github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074 h1:7LvmgO6YNMEEpH6dkJgM6ZkDGIiC4d3JvtHw8O2HRxs= -github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074/go.mod h1:9WD2xjNc8mGctPk03kMS0t8NH0eaFBnAkO+cIcS0qr0= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011142218-bfea6dcafeea h1:rC5LPbp+0wrEwaC9lSrZNIJn/7sm3jrq1CMNSYpF840= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011142218-bfea6dcafeea/go.mod h1:9WD2xjNc8mGctPk03kMS0t8NH0eaFBnAkO+cIcS0qr0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -297,14 +297,14 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -312,8 +312,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -328,10 +328,10 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -346,8 +346,8 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= +golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -388,21 +388,21 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.30.3 h1:ImHwK9DCsPA9uoU3rVh4QHAHHK5dTSv1nxJUapx8hoQ= -k8s.io/api v0.30.3/go.mod h1:GPc8jlzoe5JG3pb0KJCSLX5oAFIW3/qNJITlDj8BH04= -k8s.io/apiextensions-apiserver v0.30.3 h1:oChu5li2vsZHx2IvnGP3ah8Nj3KyqG3kRSaKmijhB9U= -k8s.io/apiextensions-apiserver v0.30.3/go.mod h1:uhXxYDkMAvl6CJw4lrDN4CPbONkF3+XL9cacCT44kV4= +k8s.io/api v0.30.5 h1:Coz05sfEVywzGcA96AJPUfs2B8LBMnh+IIsM+HCfaz8= +k8s.io/api v0.30.5/go.mod h1:HfNBGFvq9iNK8dmTKjYIdAtMxu8BXTb9c1SJyO6QjKs= +k8s.io/apiextensions-apiserver v0.30.5 h1:JfXTIyzXf5+ryncbp7T/uaVjLdvkwtqoNG2vo7S2a6M= +k8s.io/apiextensions-apiserver v0.30.5/go.mod h1:uVLEME2UPA6UN22i+jTu66B9/0CnsjlHkId+Awo0lvs= k8s.io/apimachinery v0.17.4/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g= -k8s.io/apimachinery v0.30.3 h1:q1laaWCmrszyQuSQCfNB8cFgCuDAoPszKY4ucAjDwHc= -k8s.io/apimachinery v0.30.3/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/apiserver v0.30.3 h1:QZJndA9k2MjFqpnyYv/PH+9PE0SHhx3hBho4X0vE65g= -k8s.io/apiserver v0.30.3/go.mod h1:6Oa88y1CZqnzetd2JdepO0UXzQX4ZnOekx2/PtEjrOg= -k8s.io/client-go v0.30.3 h1:bHrJu3xQZNXIi8/MoxYtZBBWQQXwy16zqJwloXXfD3k= -k8s.io/client-go v0.30.3/go.mod h1:8d4pf8vYu665/kUbsxWAQ/JDBNWqfFeZnvFiVdmx89U= -k8s.io/cluster-bootstrap v0.30.3 h1:MgxyxMkpaC6mu0BKWJ8985XCOnKU+eH3Iy+biwtDXRk= -k8s.io/cluster-bootstrap v0.30.3/go.mod h1:h8BoLDfdD7XEEIXy7Bx9FcMzxHwz29jsYYi34bM5DKU= -k8s.io/component-base v0.30.3 h1:Ci0UqKWf4oiwy8hr1+E3dsnliKnkMLZMVbWzeorlk7s= -k8s.io/component-base v0.30.3/go.mod h1:C1SshT3rGPCuNtBs14RmVD2xW0EhRSeLvBh7AGk1quA= +k8s.io/apimachinery v0.30.5 h1:CQZO19GFgw4zcOjY2H+mJ3k1u1o7zFACTNCB7nu4O18= +k8s.io/apimachinery v0.30.5/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apiserver v0.30.5 h1:roo3cfvUS7zvI6u+bY35Xv3rSDXbY9dwl1gN+rxx0S4= +k8s.io/apiserver v0.30.5/go.mod h1:p5UqIn1WPdOFo7uO/ZUdX464hHZy1DP384znr7FOIXA= +k8s.io/client-go v0.30.5 h1:vEDSzfTz0F8TXcWVdXl+aqV7NAV8M3UvC2qnGTTCoKw= +k8s.io/client-go v0.30.5/go.mod h1:/q5fHHBmhAUesOOFJACpD7VJ4e57rVtTPDOsvXrPpMk= +k8s.io/cluster-bootstrap v0.30.5 h1:nLLO5MoIA6aHknH0+qTUBNHBu7LbIaeLezl0QVf451o= +k8s.io/cluster-bootstrap v0.30.5/go.mod h1:KnU0RqdOaIzj2G7E36FjmvZroXzh4hjtw2AnFILvsn0= +k8s.io/component-base v0.30.5 h1:O6W8GfdBuyctVy7lu7I0yo8kB6bYgzGzjCyaagb2BR0= +k8s.io/component-base v0.30.5/go.mod h1:eliJtfE7RG18UHMWrqPQWodf1GnQVFGA6McNOHYi11g= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= @@ -417,8 +417,6 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0 h1:Tc9rS7JJoZ9sl sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0/go.mod h1:1ewhL9l1gkPcU/IU/6rFYfikf+7Y5imWv7ARVbBOzNs= sigs.k8s.io/cluster-api v1.8.2 h1:upWtsmCIAZK82WvEX6T/jlXW7XC6YwCEQFo2FezXH0c= sigs.k8s.io/cluster-api v1.8.2/go.mod h1:pXv5LqLxuIbhGIXykyNKiJh+KrLweSBajVHHitPLyoY= -sigs.k8s.io/cluster-api-provider-vsphere v1.11.1 h1:hwQEMOiC0zNIRNl5qG1x+IyAAoN32WhQrXo2ANjD+CQ= -sigs.k8s.io/cluster-api-provider-vsphere v1.11.1/go.mod h1:YU5i6KB5MnjuyI4ushaDOwdX1rscnSaJmnF3SlrnLPU= sigs.k8s.io/controller-runtime v0.18.5 h1:nTHio/W+Q4aBlQMgbnC5hZb4IjIidyrizMai9P6n4Rk= sigs.k8s.io/controller-runtime v0.18.5/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/CHANGELOG.md b/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/CHANGELOG.md index c6c34d65dc8..7972bbc3a88 100644 --- a/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.34.2 + +Require Go 1.22+ + +### Maintenance +- bump ginkgo as well [c59c6dc] +- bump to go 1.22 - remove x/exp dependency [8158b99] + ## 1.34.1 ### Maintenance diff --git a/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/gomega_dsl.go b/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/gomega_dsl.go index 2546ccceb0b..edacf8c13d7 100644 --- a/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.34.1" +const GOMEGA_VERSION = "1.34.2" const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. If you're using Ginkgo then you probably forgot to put your assertion in an It(). diff --git a/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go b/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go index 4339acc6418..44aa61d4b33 100644 --- a/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go +++ b/cluster-api/providers/vsphere/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go @@ -1,7 +1,7 @@ package bipartitegraph import ( - "golang.org/x/exp/slices" + "slices" . "github.com/onsi/gomega/matchers/support/goraph/edge" . "github.com/onsi/gomega/matchers/support/goraph/node" diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/mkerrors.sh b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/mkerrors.sh index d07dd09eb50..e14b766a32c 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -552,6 +552,7 @@ ccflags="$@" $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ || + $2 ~ /^(CONNECT|SAE)_/ || $2 ~ /^FIORDCHK$/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/syscall_darwin.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/syscall_darwin.go index 2d15200adb4..099867deede 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -566,6 +566,43 @@ func PthreadFchdir(fd int) (err error) { return pthread_fchdir_np(fd) } +// Connectx calls connectx(2) to initiate a connection on a socket. +// +// srcIf, srcAddr, and dstAddr are filled into a [SaEndpoints] struct and passed as the endpoints argument. +// +// - srcIf is the optional source interface index. 0 means unspecified. +// - srcAddr is the optional source address. nil means unspecified. +// - dstAddr is the destination address. +// +// On success, Connectx returns the number of bytes enqueued for transmission. +func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocID, flags uint32, iov []Iovec, connid *SaeConnID) (n uintptr, err error) { + endpoints := SaEndpoints{ + Srcif: srcIf, + } + + if srcAddr != nil { + addrp, addrlen, err := srcAddr.sockaddr() + if err != nil { + return 0, err + } + endpoints.Srcaddr = (*RawSockaddr)(addrp) + endpoints.Srcaddrlen = uint32(addrlen) + } + + if dstAddr != nil { + addrp, addrlen, err := dstAddr.sockaddr() + if err != nil { + return 0, err + } + endpoints.Dstaddr = (*RawSockaddr)(addrp) + endpoints.Dstaddrlen = uint32(addrlen) + } + + err = connectx(fd, &endpoints, associd, flags, iov, &n, connid) + return +} + +//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go index da08b2ab3d9..1ec2b1407b1 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go @@ -581,6 +581,8 @@ const ( AT_EMPTY_PATH = 0x1000 AT_REMOVEDIR = 0x200 RENAME_NOREPLACE = 1 << 0 + ST_RDONLY = 1 + ST_NOSUID = 2 ) const ( diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index b622533ef2c..24b346e1a35 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -841,6 +841,26 @@ var libc_pthread_fchdir_np_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { + var _p0 unsafe.Pointer + if len(iov) > 0 { + _p0 = unsafe.Pointer(&iov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_connectx_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s index cfe6646baf2..ebd213100b3 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s @@ -248,6 +248,11 @@ TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) +TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connectx(SB) +GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 13f624f69f1..824b9c2d5e0 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -841,6 +841,26 @@ var libc_pthread_fchdir_np_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { + var _p0 unsafe.Pointer + if len(iov) > 0 { + _p0 = unsafe.Pointer(&iov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_connectx_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s index fe222b75df0..4f178a22934 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s @@ -248,6 +248,11 @@ TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) +TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connectx(SB) +GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 diff --git a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_linux.go b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_linux.go index b102b95a0a1..9f2550dc312 100644 --- a/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/cluster-api/providers/vsphere/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -2486,7 +2486,7 @@ type XDPMmapOffsets struct { type XDPUmemReg struct { Addr uint64 Len uint64 - Chunk_size uint32 + Size uint32 Headroom uint32 Flags uint32 Tx_metadata_len uint32 @@ -3807,6 +3807,9 @@ const ( ETHTOOL_MSG_PSE_GET_REPLY = 0x25 ETHTOOL_MSG_RSS_GET_REPLY = 0x26 ETHTOOL_MSG_KERNEL_MAX = 0x2b + ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 + ETHTOOL_FLAG_OMIT_REPLY = 0x2 + ETHTOOL_FLAG_STATS = 0x4 ETHTOOL_A_HEADER_UNSPEC = 0x0 ETHTOOL_A_HEADER_DEV_INDEX = 0x1 ETHTOOL_A_HEADER_DEV_NAME = 0x2 diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1/types.go b/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1/types.go index 0510712b246..b9ce1f0335c 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1/types.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/api/admissionregistration/v1/types.go @@ -203,7 +203,7 @@ type ValidatingAdmissionPolicyList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. - Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. @@ -464,7 +464,7 @@ type ValidatingAdmissionPolicyBindingList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. - Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/apiserver/pkg/features/kube_features.go b/cluster-api/providers/vsphere/vendor/k8s.io/apiserver/pkg/features/kube_features.go index bae04d95458..31c4d902186 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/apiserver/pkg/features/kube_features.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/apiserver/pkg/features/kube_features.go @@ -335,7 +335,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS APIServerTracing: {Default: true, PreRelease: featuregate.Beta}, - APIServingWithRoutine: {Default: true, PreRelease: featuregate.Beta}, + APIServingWithRoutine: {Default: false, PreRelease: featuregate.Alpha}, ValidatingAdmissionPolicy: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.32 diff --git a/cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go b/cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go index 509e8116b88..89220c3ce98 100644 --- a/cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go +++ b/cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go @@ -1,9 +1,5 @@ /* -<<<<<<<< HEAD:cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go Copyright The Kubernetes Authors. -======== -Copyright 2024 The Kubernetes Authors. ->>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -18,18 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -<<<<<<<< HEAD:cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go // Code generated by client-gen. DO NOT EDIT. package v1alpha1 type StorageVersionMigrationExpansion interface{} -======== -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:openapi-gen=true -// +k8s:prerelease-lifecycle-gen=true -// +groupName=storagemigration.k8s.io - -package v1alpha1 // import "k8s.io/api/storagemigration/v1alpha1" ->>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go diff --git a/cluster-api/providers/vsphere/vendor/modules.txt b/cluster-api/providers/vsphere/vendor/modules.txt index e9783dafd7c..2ca40442001 100644 --- a/cluster-api/providers/vsphere/vendor/modules.txt +++ b/cluster-api/providers/vsphere/vendor/modules.txt @@ -158,8 +158,8 @@ github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg -# github.com/onsi/gomega v1.34.1 -## explicit; go 1.20 +# github.com/onsi/gomega v1.34.2 +## explicit; go 1.22 github.com/onsi/gomega github.com/onsi/gomega/format github.com/onsi/gomega/internal @@ -322,7 +322,7 @@ go.uber.org/zap/zapcore golang.org/x/exp/constraints golang.org/x/exp/maps golang.org/x/exp/slices -# golang.org/x/net v0.28.0 +# golang.org/x/net v0.29.0 ## explicit; go 1.18 golang.org/x/net/html golang.org/x/net/html/atom @@ -341,13 +341,13 @@ golang.org/x/oauth2/internal # golang.org/x/sync v0.8.0 ## explicit; go 1.18 golang.org/x/sync/singleflight -# golang.org/x/sys v0.23.0 +# golang.org/x/sys v0.25.0 ## explicit; go 1.18 golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/term v0.23.0 +# golang.org/x/term v0.24.0 ## explicit; go 1.18 golang.org/x/term # golang.org/x/text v0.18.0 @@ -514,7 +514,7 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# k8s.io/api v0.30.3 +# k8s.io/api v0.30.5 ## explicit; go 1.22.0 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -572,11 +572,11 @@ k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 k8s.io/api/storagemigration/v1alpha1 -# k8s.io/apiextensions-apiserver v0.30.3 +# k8s.io/apiextensions-apiserver v0.30.5 ## explicit; go 1.22.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 -# k8s.io/apimachinery v0.30.3 +# k8s.io/apimachinery v0.30.5 ## explicit; go 1.22.0 k8s.io/apimachinery/pkg/api/apitesting k8s.io/apimachinery/pkg/api/apitesting/fuzzer @@ -637,7 +637,7 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.30.3 +# k8s.io/apiserver v0.30.5 ## explicit; go 1.22.0 k8s.io/apiserver/pkg/admission k8s.io/apiserver/pkg/apis/apiserver @@ -697,7 +697,7 @@ k8s.io/apiserver/pkg/warning k8s.io/apiserver/plugin/pkg/authenticator/token/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics -# k8s.io/client-go v0.30.3 +# k8s.io/client-go v0.30.5 ## explicit; go 1.22.0 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1 @@ -843,11 +843,11 @@ k8s.io/client-go/util/flowcontrol k8s.io/client-go/util/homedir k8s.io/client-go/util/keyutil k8s.io/client-go/util/workqueue -# k8s.io/cluster-bootstrap v0.30.3 +# k8s.io/cluster-bootstrap v0.30.5 ## explicit; go 1.22.0 k8s.io/cluster-bootstrap/token/api k8s.io/cluster-bootstrap/token/util -# k8s.io/component-base v0.30.3 +# k8s.io/component-base v0.30.5 ## explicit; go 1.22.0 k8s.io/component-base/cli/flag k8s.io/component-base/featuregate @@ -943,7 +943,7 @@ sigs.k8s.io/cluster-api/util/secret sigs.k8s.io/cluster-api/util/topology sigs.k8s.io/cluster-api/util/version sigs.k8s.io/cluster-api/version -# sigs.k8s.io/cluster-api-provider-vsphere v1.11.1 +# sigs.k8s.io/cluster-api-provider-vsphere v1.11.1 => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011142218-bfea6dcafeea ## explicit; go 1.22.0 sigs.k8s.io/cluster-api-provider-vsphere sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3 @@ -1045,3 +1045,4 @@ sigs.k8s.io/yaml/goyaml.v2 # sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.2 # github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 # github.com/vmware-tanzu/nsx-operator/pkg/apis => github.com/vmware-tanzu/nsx-operator/pkg/apis v0.0.0-20240827061921-8f0982975508 +# sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011142218-bfea6dcafeea diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/Makefile b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/Makefile index ac05f2a212c..cf667d1dad1 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/Makefile +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/Makefile @@ -369,7 +369,7 @@ generate-doctoc: TRACE=$(TRACE) ./hack/generate-doctoc.sh .PHONY: generate-e2e-templates -generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v1.9 v1.10 main) ## Generate test templates for all branches +generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v1.9 v1.10 v1.11 main) ## Generate test templates for all branches .PHONY: generate-e2e-templates-main generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the main branch @@ -414,6 +414,15 @@ generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the mai "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/fast-rollout" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-fast-rollout-supervisor.yaml" "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/ownerrefs-finalizers" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-ownerrefs-finalizers-supervisor.yaml" +.PHONY: generate-e2e-templates-v1.11 +generate-e2e-templates-v1.11: $(KUSTOMIZE) + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.11/clusterclass" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.11/clusterclass-quick-start.yaml" + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.11/workload" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.11/cluster-template-workload.yaml" + + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.11/clusterclass" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.11/clusterclass-quick-start-supervisor.yaml" + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.11/workload" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.11/cluster-template-workload-supervisor.yaml" + + .PHONY: generate-e2e-templates-v1.10 generate-e2e-templates-v1.10: $(KUSTOMIZE) "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.10/clusterclass" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.10/clusterclass-quick-start.yaml" diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/README.md b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/README.md index 72af760f099..a919dd6fe6e 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/README.md +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/README.md @@ -33,14 +33,12 @@ Check out the [getting started guide](./docs/getting_started.md) for launching a This provider's versions are compatible with the following versions of Cluster API: -| | Cluster API v1beta1 (v1.4) | Cluster API v1beta1 (v1.5) | Cluster API v1beta1 (v1.6) | Cluster API v1beta1 (v1.7) | +| | Cluster API v1beta1 (v1.5) | Cluster API v1beta1 (v1.6) | Cluster API v1beta1 (v1.7) | Cluster API v1beta1 (v1.8) | |----------------------|:--------------------------:|:--------------------------:|:--------------------------:|:--------------------------:| -| CAPV v1beta1 (v1.5) | ✓ | ☓ | ☓ | ☓ | -| CAPV v1beta1 (v1.6) | ✓ | ☓ | ☓ | ☓ | -| CAPV v1beta1 (v1.7) | ✓ | ☓ | ☓ | ☓ | -| CAPV v1beta1 (v1.8) | ☓ | ✓ | ☓ | ☓ | -| CAPV v1beta1 (v1.9) | ☓ | ☓ | ✓ | x | -| CAPV v1beta1 (v1.10) | ☓ | ☓ | x | ✓ | +| CAPV v1beta1 (v1.8) | ✓ | ☓ | ☓ | ☓ | +| CAPV v1beta1 (v1.9) | ☓ | ✓ | x | x | +| CAPV v1beta1 (v1.10) | ☓ | x | ✓ | x | +| CAPV v1beta1 (v1.11) | ☓ | x | x | ✓ | As CAPV doesn't dictate supported K8s versions, and it supports whatever CAPI supported, about the provider's compatibility with K8s versions, please refer to [CAPI Supported Kubernetes Versions](https://cluster-api.sigs.k8s.io/reference/versions.html). @@ -116,7 +114,7 @@ Participating in the project is governed by the Kubernetes code of conduct. Plea ### Implementer office hours -- Bi-weekly on [Zoom][zoom_meeting] on Thursdays @ 10:00am Pacific. [Convert to your time zone.][time_zone_converter] +- Bi-weekly on [Zoom][zoom_meeting] on Wednesdays @ 02:30 PM Central European Time. - Previous meetings: \[ [notes][meeting_notes] \] ### Other ways to communicate with the contributors @@ -175,8 +173,6 @@ We also use the issue tracker to track features. If you have an idea for a featu [zoom_meeting]: https://zoom.us/j/92253194848?pwd=cVVVNDMxeTl1QVJPUlpvLzNSVU1JZz09 -[time_zone_converter]: http://www.thetimezoneconverter.com/?t=08:00&tz=PT%20%28Pacific%20Time%29 - [vsphere_custom_resource_definitions]: https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-provider-vsphere [capi_custom_resource_definitions]: https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3/zz_generated.conversion.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3/zz_generated.conversion.go index 966195ccbb2..2d953c987c5 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3/zz_generated.conversion.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3/zz_generated.conversion.go @@ -1762,5 +1762,6 @@ func autoConvert_v1beta1_VirtualMachineCloneSpec_To_v1alpha3_VirtualMachineClone // WARNING: in.PciDevices requires manual conversion: does not exist in peer-type // WARNING: in.OS requires manual conversion: does not exist in peer-type // WARNING: in.HardwareVersion requires manual conversion: does not exist in peer-type + // WARNING: in.DataDisks requires manual conversion: does not exist in peer-type return nil } diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4/zz_generated.conversion.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4/zz_generated.conversion.go index 147c1a9894f..197b5b46671 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4/zz_generated.conversion.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4/zz_generated.conversion.go @@ -1916,5 +1916,6 @@ func autoConvert_v1beta1_VirtualMachineCloneSpec_To_v1alpha4_VirtualMachineClone // WARNING: in.PciDevices requires manual conversion: does not exist in peer-type // WARNING: in.OS requires manual conversion: does not exist in peer-type // WARNING: in.HardwareVersion requires manual conversion: does not exist in peer-type + // WARNING: in.DataDisks requires manual conversion: does not exist in peer-type return nil } diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go index e7b758df740..144392957b2 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go @@ -210,11 +210,6 @@ type VirtualMachineCloneSpec struct { // VSphereDisk describes additional disks for vSphere to be added to VM that are not part of the VM OVA template. type VSphereDisk struct { - // DeviceName is a name to be used to identify the disk definition. If deviceName is not specified, - // the disk will still be created. The deviceName should be unique so that it can be used to clearly - // identify purpose of the disk, but is not required to be unique. - // +optional - DeviceName string `json:"deviceName,omitempty"` // SizeGiB is the size of the disk (in GiB). // +kubebuilder:validation:Required SizeGiB int64 `json:"sizeGiB"` diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/zz_generated.deepcopy.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/zz_generated.deepcopy.go index 44d12a65fe4..584c92f93c7 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/zz_generated.deepcopy.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/zz_generated.deepcopy.go @@ -820,6 +820,21 @@ func (in *VSphereDeploymentZoneStatus) DeepCopy() *VSphereDeploymentZoneStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VSphereDisk) DeepCopyInto(out *VSphereDisk) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDisk. +func (in *VSphereDisk) DeepCopy() *VSphereDisk { + if in == nil { + return nil + } + out := new(VSphereDisk) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VSphereFailureDomain) DeepCopyInto(out *VSphereFailureDomain) { *out = *in @@ -1321,6 +1336,11 @@ func (in *VirtualMachineCloneSpec) DeepCopyInto(out *VirtualMachineCloneSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DataDisks != nil { + in, out := &in.DataDisks, &out.DataDisks + *out = make([]VSphereDisk, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineCloneSpec. diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/clusterctl-settings.json b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/clusterctl-settings.json index ed240d0ec0e..f91d971760a 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/clusterctl-settings.json +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/clusterctl-settings.json @@ -2,6 +2,6 @@ "name": "infrastructure-vsphere", "config": { "componentsFile": "infrastructure-components.yaml", - "nextVersion": "v1.11.99" + "nextVersion": "v1.12.99" } } diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/main.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/main.go index 4da1a7ded68..3685bcf30ba 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/main.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/main.go @@ -408,11 +408,11 @@ func setupSupervisorControllers(ctx context.Context, controllerCtx *capvcontext. return err } - if err := controllers.AddServiceAccountProviderControllerToManager(ctx, controllerCtx, mgr, tracker, concurrency(providerServiceAccountConcurrency)); err != nil { + if err := vmware.AddServiceAccountProviderControllerToManager(ctx, controllerCtx, mgr, tracker, concurrency(providerServiceAccountConcurrency)); err != nil { return err } - return controllers.AddServiceDiscoveryControllerToManager(ctx, controllerCtx, mgr, tracker, concurrency(serviceDiscoveryConcurrency)) + return vmware.AddServiceDiscoveryControllerToManager(ctx, controllerCtx, mgr, tracker, concurrency(serviceDiscoveryConcurrency)) } func setupChecks(mgr ctrlmgr.Manager) { diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/metadata.yaml b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/metadata.yaml index 5a959dabca3..b4c095f206d 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/metadata.yaml +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/metadata.yaml @@ -42,3 +42,6 @@ releaseSeries: - major: 1 minor: 11 contract: v1beta1 + - major: 1 + minor: 12 + contract: v1beta1 diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter/clone.go b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter/clone.go index 04897ed0af4..11c2ddfffb5 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter/clone.go +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter/clone.go @@ -143,6 +143,7 @@ func Clone(ctx context.Context, vmCtx *capvcontext.VMContext, bootstrapData []by if err != nil { return errors.Wrapf(err, "error getting disk spec for %q", ctx) } + log.Info("Got the following disks", "disk", diskSpecs) deviceSpecs = append(deviceSpecs, diskSpecs...) } @@ -342,7 +343,7 @@ func getDiskSpec(vmCtx *capvcontext.VMContext, devices object.VirtualDeviceList) } // There is at least one disk - var diskSpecs []types.BaseVirtualDeviceConfigSpec + diskSpecs := []types.BaseVirtualDeviceConfigSpec{} primaryDisk := disks[0].(*types.VirtualDisk) primaryCloneCapacityKB := int64(vmCtx.VSphereVM.Spec.DiskGiB) * 1024 * 1024 primaryDiskConfigSpec, err := getDiskConfigSpec(primaryDisk, primaryCloneCapacityKB) @@ -373,18 +374,48 @@ func getDiskSpec(vmCtx *capvcontext.VMContext, devices object.VirtualDeviceList) // Now if we have increased the disk size of any additional disks that were in the template, we can now add new disks // that are present in the additionalDisks list. - for i, dataDisk := range vmCtx.VSphereVM.Spec.DataDisks { + if len(vmCtx.VSphereVM.Spec.DataDisks) > 0 { + additionalDisks, diskErr := createAdditionalDisks(vmCtx.VSphereVM.Spec.DataDisks, primaryDisk, devices) + if diskErr != nil { + + } + diskSpecs = append(diskSpecs, additionalDisks...) + } + + return diskSpecs, nil +} + +func getDiskConfigSpec(disk *types.VirtualDisk, diskCloneCapacityKB int64) (types.BaseVirtualDeviceConfigSpec, error) { + switch { + case diskCloneCapacityKB == 0: + // No disk size specified for the clone. Default to the template disk capacity. + case diskCloneCapacityKB > 0 && diskCloneCapacityKB >= disk.CapacityInKB: + disk.CapacityInKB = diskCloneCapacityKB + case diskCloneCapacityKB > 0 && diskCloneCapacityKB < disk.CapacityInKB: + return nil, errors.Errorf( + "can't resize template disk down, initial capacity is larger: %dKiB > %dKiB", + disk.CapacityInKB, diskCloneCapacityKB) + } + + return &types.VirtualDeviceConfigSpec{ + Operation: types.VirtualDeviceConfigSpecOperationEdit, + Device: disk, + }, nil +} + +func createAdditionalDisks(disks []infrav1.VSphereDisk, primaryDisk *types.VirtualDisk, devices object.VirtualDeviceList) ([]types.BaseVirtualDeviceConfigSpec, error) { + additionalDisks := []types.BaseVirtualDeviceConfigSpec{} + unit := int32(1) + + for i, dataDisk := range disks { klog.InfoS("Adding disk", "spec", dataDisk) - // Need storage policy - // Need scsi controller - controller, err := devices.FindDiskController("scsi") - if err != nil { + // Get controller. Only supporting using same controller as primary disk at this time + controller, ok := devices.FindByKey(primaryDisk.ControllerKey).(types.BaseVirtualController) + if !ok { klog.Infof("Unable to get scsi controller") } - unit := int32(i + 1) - dev := &types.VirtualDisk{ VirtualDevice: types.VirtualDevice{ Key: devices.NewKey() - int32(i), @@ -393,15 +424,18 @@ func getDiskSpec(vmCtx *capvcontext.VMContext, devices object.VirtualDeviceList) ThinProvisioned: types.NewBool(true), VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ FileName: "", - //Datastore: types.NewReference(datastore.Reference()), }, }, - UnitNumber: &unit, + //UnitNumber: assignUnitNumber, ControllerKey: controller.GetVirtualController().Key, }, CapacityInKB: dataDisk.SizeGiB * 1024 * 1024, } + // Assign unit number to next slot on controller + assignUnitNumber(dev, devices, additionalDisks, controller, unit) + unit = *dev.UnitNumber + diskConfigSpec := types.VirtualDeviceConfigSpec{ Device: dev, Operation: types.VirtualDeviceConfigSpecOperationAdd, @@ -410,28 +444,58 @@ func getDiskSpec(vmCtx *capvcontext.VMContext, devices object.VirtualDeviceList) klog.InfoS("Generated device", "dev", dev) - diskSpecs = append(diskSpecs, &diskConfigSpec) + additionalDisks = append(additionalDisks, &diskConfigSpec) } - return diskSpecs, nil + return additionalDisks, nil } -func getDiskConfigSpec(disk *types.VirtualDisk, diskCloneCapacityKB int64) (types.BaseVirtualDeviceConfigSpec, error) { - switch { - case diskCloneCapacityKB == 0: - // No disk size specified for the clone. Default to the template disk capacity. - case diskCloneCapacityKB > 0 && diskCloneCapacityKB >= disk.CapacityInKB: - disk.CapacityInKB = diskCloneCapacityKB - case diskCloneCapacityKB > 0 && diskCloneCapacityKB < disk.CapacityInKB: - return nil, errors.Errorf( - "can't resize template disk down, initial capacity is larger: %dKiB > %dKiB", - disk.CapacityInKB, diskCloneCapacityKB) +// assignController assigns a device to a controller. +func assignUnitNumber(device types.BaseVirtualDevice, existingDevices object.VirtualDeviceList, newDevices []types.BaseVirtualDeviceConfigSpec, controller types.BaseVirtualController, offset int32) { + vd := device.GetVirtualDevice() + vd.ControllerKey = controller.GetVirtualController().Key + vd.UnitNumber = &offset + + units := make([]bool, 30) + + for i := 0; i < int(offset); i++ { + units[i] = true } - return &types.VirtualDeviceConfigSpec{ - Operation: types.VirtualDeviceConfigSpecOperationEdit, - Device: disk, - }, nil + switch sc := controller.(type) { + case types.BaseVirtualSCSIController: + // The SCSI controller sits on its own bus + klog.Infof("Marking SCSI Controller's unit number: %d", sc.GetVirtualSCSIController().ScsiCtlrUnitNumber) + units[sc.GetVirtualSCSIController().ScsiCtlrUnitNumber] = true + } + + key := controller.GetVirtualController().Key + + // Check all existing devices + for _, device := range existingDevices { + d := device.GetVirtualDevice() + + if d.ControllerKey == key && d.UnitNumber != nil { + units[int(*d.UnitNumber)] = true + } + } + + // Check new devices + for _, device := range newDevices { + d := device.GetVirtualDeviceConfigSpec().Device.GetVirtualDevice() + + if d.ControllerKey == key && d.UnitNumber != nil { + units[int(*d.UnitNumber)] = true + } + } + + for unit, used := range units { + if !used { + unit32 := int32(unit) + vd.UnitNumber = &unit32 + break + } + } } const ethCardType = "vmxnet3" diff --git a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/tilt-provider.yaml b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/tilt-provider.yaml index b8ec74a2b9e..11658655685 100644 --- a/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/tilt-provider.yaml +++ b/cluster-api/providers/vsphere/vendor/sigs.k8s.io/cluster-api-provider-vsphere/tilt-provider.yaml @@ -1,7 +1,7 @@ --- - name: vsphere config: - version: v1.11.99 + version: v1.12.99 image: gcr.io/k8s-staging-capi-vsphere/cluster-api-vsphere-controller live_reload_deps: - main.go @@ -15,7 +15,7 @@ label: CAPV - name: vsphere-supervisor config: - version: v1.11.99 + version: v1.12.99 image: gcr.io/k8s-staging-capi-vsphere/cluster-api-vsphere-controller live_reload_deps: - main.go diff --git a/data/data/cluster-api/vsphere-infrastructure-components.yaml b/data/data/cluster-api/vsphere-infrastructure-components.yaml index 9e3a20dc1ae..178c951e5ed 100644 --- a/data/data/cluster-api/vsphere-infrastructure-components.yaml +++ b/data/data/cluster-api/vsphere-infrastructure-components.yaml @@ -18,442 +18,442 @@ spec: group: infrastructure.cluster.x-k8s.io names: categories: - - cluster-api + - cluster-api kind: VSphereClusterIdentity listKind: VSphereClusterIdentityList plural: vsphereclusteridentities singular: vsphereclusteridentity scope: Cluster versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - VSphereClusterIdentity defines the account to be used for reconciling clusters - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - properties: - allowedNamespaces: - description: |- - AllowedNamespaces is used to identify which namespaces are allowed to use this account. - Namespaces can be selected with a label selector. - If this object is nil, no namespaces will be allowed - properties: - selector: - description: Selector is a standard Kubernetes LabelSelector. - A label query over a set of resources. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + - deprecated: true + name: v1alpha3 + schema: + openAPIV3Schema: + description: |- + VSphereClusterIdentity defines the account to be used for reconciling clusters + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + properties: + allowedNamespaces: + description: |- + AllowedNamespaces is used to identify which namespaces are allowed to use this account. + Namespaces can be selected with a label selector. + If this object is nil, no namespaces will be allowed + properties: + selector: + description: Selector is a standard Kubernetes LabelSelector. + A label query over a set of resources. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string + type: object + x-kubernetes-map-type: atomic + type: object + secretName: + description: SecretName references a Secret inside the controller + namespace with the credentials to use + minLength: 1 + type: string + type: object + status: + properties: + conditions: + description: Conditions defines current service state of the VSphereCluster. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - status + - type type: object - x-kubernetes-map-type: atomic - type: object - secretName: - description: SecretName references a Secret inside the controller - namespace with the credentials to use - minLength: 1 - type: string - type: object - status: - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + type: array + ready: + type: boolean + type: object + type: object + served: false + storage: false + subresources: + status: {} + - deprecated: true + name: v1alpha4 + schema: + openAPIV3Schema: + description: |- + VSphereClusterIdentity defines the account to be used for reconciling clusters + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + properties: + allowedNamespaces: + description: |- + AllowedNamespaces is used to identify which namespaces are allowed to use this account. + Namespaces can be selected with a label selector. + If this object is nil, no namespaces will be allowed properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - ready: - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - VSphereClusterIdentity defines the account to be used for reconciling clusters - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - properties: - allowedNamespaces: - description: |- - AllowedNamespaces is used to identify which namespaces are allowed to use this account. - Namespaces can be selected with a label selector. - If this object is nil, no namespaces will be allowed - properties: - selector: - description: Selector is a standard Kubernetes LabelSelector. - A label query over a set of resources. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + selector: + description: Selector is a standard Kubernetes LabelSelector. + A label query over a set of resources. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string + type: object + x-kubernetes-map-type: atomic + type: object + secretName: + description: SecretName references a Secret inside the controller + namespace with the credentials to use + minLength: 1 + type: string + type: object + status: + properties: + conditions: + description: Conditions defines current service state of the VSphereCluster. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - status + - type type: object - x-kubernetes-map-type: atomic - type: object - secretName: - description: SecretName references a Secret inside the controller - namespace with the credentials to use - minLength: 1 - type: string - type: object - status: - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + type: array + ready: + type: boolean + type: object + type: object + served: false + storage: false + subresources: + status: {} + - name: v1beta1 + schema: + openAPIV3Schema: + description: VSphereClusterIdentity defines the account to be used for reconciling + clusters. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereClusterIdentitySpec contains a secret reference and + a group of allowed namespaces. + properties: + allowedNamespaces: + description: |- + AllowedNamespaces is used to identify which namespaces are allowed to use this account. + Namespaces can be selected with a label selector. + If this object is nil, no namespaces will be allowed properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - ready: - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - name: v1beta1 - schema: - openAPIV3Schema: - description: VSphereClusterIdentity defines the account to be used for reconciling - clusters. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereClusterIdentitySpec contains a secret reference and - a group of allowed namespaces. - properties: - allowedNamespaces: - description: |- - AllowedNamespaces is used to identify which namespaces are allowed to use this account. - Namespaces can be selected with a label selector. - If this object is nil, no namespaces will be allowed - properties: - selector: - description: Selector is a standard Kubernetes LabelSelector. - A label query over a set of resources. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + selector: + description: Selector is a standard Kubernetes LabelSelector. + A label query over a set of resources. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string + type: object + x-kubernetes-map-type: atomic + type: object + secretName: + description: SecretName references a Secret inside the controller + namespace with the credentials to use + minLength: 1 + type: string + type: object + status: + description: VSphereClusterIdentityStatus contains the status of the VSphereClusterIdentity. + properties: + conditions: + description: Conditions defines current service state of the VSphereCluster. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type type: object - x-kubernetes-map-type: atomic - type: object - secretName: - description: SecretName references a Secret inside the controller - namespace with the credentials to use - minLength: 1 - type: string - type: object - status: - description: VSphereClusterIdentityStatus contains the status of the VSphereClusterIdentity. - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - lastTransitionTime - - status - - type - type: object - type: array - ready: - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} + type: array + ready: + type: boolean + type: object + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -475,220 +475,108 @@ spec: namespace: capv-system path: /convert conversionReviewVersions: - - v1 - - v1beta1 + - v1 + - v1beta1 group: infrastructure.cluster.x-k8s.io names: categories: - - cluster-api + - cluster-api kind: VSphereCluster listKind: VSphereClusterList plural: vsphereclusters singular: vspherecluster scope: Namespaced versions: - - additionalPrinterColumns: - - description: Cluster infrastructure is ready for VSphereMachine - jsonPath: .status.ready - name: Ready - type: string - - description: Server is the address of the vSphere endpoint - jsonPath: .spec.server - name: Server - type: string - - description: API Endpoint - jsonPath: .spec.controlPlaneEndpoint[0] - name: ControlPlaneEndpoint - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - VSphereCluster is the Schema for the vsphereclusters API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereClusterSpec defines the desired state of VSphereCluster. - properties: - cloudProviderConfiguration: - description: |- - CloudProviderConfiguration holds the cluster-wide configuration for the vSphere cloud provider. - - - Deprecated: will be removed in v1alpha4. - properties: - disk: - description: Disk is the vSphere cloud provider's disk configuration. - properties: - scsiControllerType: - description: SCSIControllerType defines SCSI controller to - be used. - type: string - type: object - global: - description: Global is the vSphere cloud provider's global configuration. - properties: - apiBindPort: - description: |- - APIBindPort configures the vSphere cloud controller manager API port. - Defaults to 43001. - type: string - apiDisable: - description: |- - APIDisable disables the vSphere cloud controller manager API. - Defaults to true. - type: boolean - caFile: - description: |- - CAFile Specifies the path to a CA certificate in PEM format. - If not configured, the system's CA certificates will be used. - type: string - datacenters: - description: Datacenters is a CSV string of the datacenters - in which VMs are located. - type: string - insecure: - description: Insecure is a flag that disables TLS peer verification. - type: boolean - password: - description: Password is the password used to access a vSphere - endpoint. - type: string - port: - description: |- - Port is the port on which the vSphere endpoint is listening. - Defaults to 443. - type: string - roundTripperCount: - description: |- - RoundTripperCount specifies the SOAP round tripper count - (retries = RoundTripper - 1) - format: int32 - type: integer - secretName: - description: |- - SecretName is the name of the Kubernetes secret in which the vSphere - credentials are located. - type: string - secretNamespace: - description: SecretNamespace is the namespace for SecretName. - type: string - secretsDirectory: - description: |- - SecretsDirectory is a directory in which secrets may be found. This - may used in the event that: - 1. It is not desirable to use the K8s API to watch changes to secrets - 2. The cloud controller manager is not running in a K8s environment, - such as DC/OS. For example, the container storage interface (CSI) is - container orcehstrator (CO) agnostic, and should support non-K8s COs. - Defaults to /etc/cloud/credentials. - type: string - serviceAccount: - description: |- - ServiceAccount is the Kubernetes service account used to launch the cloud - controller manager. - Defaults to cloud-controller-manager. - type: string - thumbprint: - description: |- - Thumbprint is the cryptographic thumbprint of the vSphere endpoint's - certificate. - type: string - username: - description: Username is the username used to access a vSphere - endpoint. - type: string - type: object - labels: - description: Labels is the vSphere cloud provider's zone and region - configuration. - properties: - region: - description: Region is the region in which VMs are created/located. - type: string - zone: - description: Zone is the zone in which VMs are created/located. - type: string - type: object - network: - description: Network is the vSphere cloud provider's network configuration. - properties: - name: - description: Name is the name of the network to which VMs - are connected. - type: string - type: object - providerConfig: - description: |- - CPIProviderConfig contains extra information used to configure the - vSphere cloud provider. - properties: - cloud: - properties: - controllerImage: - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs passes through extra arguments to the cloud provider. - The arguments here are passed to the cloud provider daemonset specification - type: object - type: object - storage: - properties: - attacherImage: - type: string - controllerImage: - type: string - livenessProbeImage: - type: string - metadataSyncerImage: - type: string - nodeDriverImage: - type: string - provisionerImage: - type: string - registrarImage: - type: string - type: object - type: object - virtualCenter: - additionalProperties: - description: CPIVCenterConfig is a vSphere cloud provider's - vCenter configuration. + - additionalPrinterColumns: + - description: Cluster infrastructure is ready for VSphereMachine + jsonPath: .status.ready + name: Ready + type: string + - description: Server is the address of the vSphere endpoint + jsonPath: .spec.server + name: Server + type: string + - description: API Endpoint + jsonPath: .spec.controlPlaneEndpoint[0] + name: ControlPlaneEndpoint + priority: 1 + type: string + - description: Time duration since creation of Machine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + deprecated: true + name: v1alpha3 + schema: + openAPIV3Schema: + description: |- + VSphereCluster is the Schema for the vsphereclusters API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereClusterSpec defines the desired state of VSphereCluster. + properties: + cloudProviderConfiguration: + description: |- + CloudProviderConfiguration holds the cluster-wide configuration for the vSphere cloud provider. + + + Deprecated: will be removed in v1alpha4. + properties: + disk: + description: Disk is the vSphere cloud provider's disk configuration. properties: - datacenters: - description: Datacenters is a CSV string of the datacenters - in which VMs are located. + scsiControllerType: + description: SCSIControllerType defines SCSI controller to + be used. type: string - password: - description: Password is the password used to access a vSphere + type: object + global: + description: Global is the vSphere cloud provider's global configuration. + properties: + apiBindPort: + description: |- + APIBindPort configures the vSphere cloud controller manager API port. + Defaults to 43001. + type: string + apiDisable: + description: |- + APIDisable disables the vSphere cloud controller manager API. + Defaults to true. + type: boolean + caFile: + description: |- + CAFile Specifies the path to a CA certificate in PEM format. + If not configured, the system's CA certificates will be used. + type: string + datacenters: + description: Datacenters is a CSV string of the datacenters + in which VMs are located. + type: string + insecure: + description: Insecure is a flag that disables TLS peer verification. + type: boolean + password: + description: Password is the password used to access a vSphere endpoint. type: string port: @@ -702,6 +590,30 @@ spec: (retries = RoundTripper - 1) format: int32 type: integer + secretName: + description: |- + SecretName is the name of the Kubernetes secret in which the vSphere + credentials are located. + type: string + secretNamespace: + description: SecretNamespace is the namespace for SecretName. + type: string + secretsDirectory: + description: |- + SecretsDirectory is a directory in which secrets may be found. This + may used in the event that: + 1. It is not desirable to use the K8s API to watch changes to secrets + 2. The cloud controller manager is not running in a K8s environment, + such as DC/OS. For example, the container storage interface (CSI) is + container orcehstrator (CO) agnostic, and should support non-K8s COs. + Defaults to /etc/cloud/credentials. + type: string + serviceAccount: + description: |- + ServiceAccount is the Kubernetes service account used to launch the cloud + controller manager. + Defaults to cloud-controller-manager. + type: string thumbprint: description: |- Thumbprint is the cryptographic thumbprint of the vSphere endpoint's @@ -712,637 +624,725 @@ spec: endpoint. type: string type: object - description: VCenter is a list of vCenter configurations. - type: object - workspace: - description: Workspace is the vSphere cloud provider's workspace - configuration. - properties: - datacenter: - description: Datacenter is the datacenter in which VMs are - created/located. - type: string - datastore: - description: Datastore is the datastore in which VMs are created/located. - type: string - folder: - description: Folder is the folder in which VMs are created/located. - type: string - resourcePool: - description: ResourcePool is the resource pool in which VMs - are created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere - endpoint. - type: string - type: object - type: object - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint used to - communicate with the control plane. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - identityRef: - description: |- - IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains - the identity to use when reconciling the cluster. - properties: - kind: - description: Kind of the identity. Can either be VSphereClusterIdentity - or Secret - enum: - - VSphereClusterIdentity - - Secret - type: string - name: - description: Name of the identity. - minLength: 1 - type: string - required: - - kind - - name - type: object - insecure: - description: |- - Insecure is a flag that controls whether to validate the - vSphere server's certificate. - - - Deprecated: will be removed in v1alpha4. - type: boolean - loadBalancerRef: - description: |- - LoadBalancerRef may be used to enable a control plane load balancer - for this cluster. - When a LoadBalancerRef is provided, the VSphereCluster.Status.Ready field - will not be true until the referenced resource is Status.Ready and has a - non-empty Status.Address value. - - - Deprecated: will be removed in v1alpha4. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - server: - description: Server is the address of the vSphere endpoint. - type: string - thumbprint: - description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When provided, Insecure should not be set to true - type: string - type: object - status: - description: VSphereClusterStatus defines the observed state of VSphereClusterSpec. - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: + labels: + description: Labels is the vSphere cloud provider's zone and region + configuration. + properties: + region: + description: Region is the region in which VMs are created/located. + type: string + zone: + description: Zone is the zone in which VMs are created/located. + type: string + type: object + network: + description: Network is the vSphere cloud provider's network configuration. + properties: + name: + description: Name is the name of the network to which VMs + are connected. + type: string + type: object + providerConfig: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. + CPIProviderConfig contains extra information used to configure the + vSphere cloud provider. + properties: + cloud: + properties: + controllerImage: + type: string + extraArgs: + additionalProperties: + type: string + description: |- + ExtraArgs passes through extra arguments to the cloud provider. + The arguments here are passed to the cloud provider daemonset specification + type: object + type: object + storage: + properties: + attacherImage: + type: string + controllerImage: + type: string + livenessProbeImage: + type: string + metadataSyncerImage: + type: string + nodeDriverImage: + type: string + provisionerImage: + type: string + registrarImage: + type: string + type: object + type: object + virtualCenter: + additionalProperties: + description: CPIVCenterConfig is a vSphere cloud provider's + vCenter configuration. + properties: + datacenters: + description: Datacenters is a CSV string of the datacenters + in which VMs are located. + type: string + password: + description: Password is the password used to access a vSphere + endpoint. + type: string + port: + description: |- + Port is the port on which the vSphere endpoint is listening. + Defaults to 443. + type: string + roundTripperCount: + description: |- + RoundTripperCount specifies the SOAP round tripper count + (retries = RoundTripper - 1) + format: int32 + type: integer + thumbprint: + description: |- + Thumbprint is the cryptographic thumbprint of the vSphere endpoint's + certificate. + type: string + username: + description: Username is the username used to access a vSphere + endpoint. + type: string + type: object + description: VCenter is a list of vCenter configurations. + type: object + workspace: + description: Workspace is the vSphere cloud provider's workspace + configuration. + properties: + datacenter: + description: Datacenter is the datacenter in which VMs are + created/located. + type: string + datastore: + description: Datastore is the datastore in which VMs are created/located. + type: string + folder: + description: Folder is the folder in which VMs are created/located. + type: string + resourcePool: + description: ResourcePool is the resource pool in which VMs + are created/located. + type: string + server: + description: Server is the IP address or FQDN of the vSphere + endpoint. + type: string + type: object + type: object + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint used to + communicate with the control plane. + properties: + host: + description: The hostname on which the API server is serving. type: string + port: + description: The port on which the API server is serving. + format: int32 + type: integer required: - - status - - type + - host + - port type: object - type: array - failureDomains: - additionalProperties: + identityRef: description: |- - FailureDomainSpec is the Schema for Cluster API failure domains. - It allows controllers to understand how many failure domains a cluster can optionally span across. + IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains + the identity to use when reconciling the cluster. properties: - attributes: - additionalProperties: - type: string - description: Attributes is a free form map of attributes an - infrastructure provider might use or require. - type: object - controlPlane: - description: ControlPlane determines if this failure domain - is suitable for use by control plane machines. - type: boolean + kind: + description: Kind of the identity. Can either be VSphereClusterIdentity + or Secret + enum: + - VSphereClusterIdentity + - Secret + type: string + name: + description: Name of the identity. + minLength: 1 + type: string + required: + - kind + - name type: object - description: FailureDomains is a list of failure domain objects synced - from the infrastructure provider. - type: object - ready: - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Cluster infrastructure is ready for VSphereMachine - jsonPath: .status.ready - name: Ready - type: string - - description: Server is the address of the vSphere endpoint - jsonPath: .spec.server - name: Server - type: string - - description: API Endpoint - jsonPath: .spec.controlPlaneEndpoint[0] - name: ControlPlaneEndpoint - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - VSphereCluster is the Schema for the vsphereclusters API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereClusterSpec defines the desired state of VSphereCluster - properties: - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint used to - communicate with the control plane. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - identityRef: - description: |- - IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains - the identity to use when reconciling the cluster. - properties: - kind: - description: Kind of the identity. Can either be VSphereClusterIdentity - or Secret - enum: - - VSphereClusterIdentity - - Secret - type: string - name: - description: Name of the identity. - minLength: 1 - type: string - required: - - kind - - name - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum of the - given vCenter server's host certificate - type: string - type: object - status: - description: VSphereClusterStatus defines the observed state of VSphereClusterSpec - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + insecure: + description: |- + Insecure is a flag that controls whether to validate the + vSphere server's certificate. + + + Deprecated: will be removed in v1alpha4. + type: boolean + loadBalancerRef: + description: |- + LoadBalancerRef may be used to enable a control plane load balancer + for this cluster. + When a LoadBalancerRef is provided, the VSphereCluster.Status.Ready field + will not be true until the referenced resource is Status.Ready and has a + non-empty Status.Address value. + + + Deprecated: will be removed in v1alpha4. properties: - lastTransitionTime: + apiVersion: + description: API version of the referent. + type: string + fieldPath: description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + TODO: this design is not final and this field is subject to change in the future. type: string - message: + kind: description: |- - A human readable message indicating details about the transition. - This field may be empty. + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string - reason: + name: description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - severity: + namespace: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ type: string - status: - description: Status of the condition, one of True, False, Unknown. + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency type: string - type: + uid: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - status - - type type: object - type: array - failureDomains: - additionalProperties: + x-kubernetes-map-type: atomic + server: + description: Server is the address of the vSphere endpoint. + type: string + thumbprint: description: |- - FailureDomainSpec is the Schema for Cluster API failure domains. - It allows controllers to understand how many failure domains a cluster can optionally span across. - properties: - attributes: - additionalProperties: + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When provided, Insecure should not be set to true + type: string + type: object + status: + description: VSphereClusterStatus defines the observed state of VSphereClusterSpec. + properties: + conditions: + description: Conditions defines current service state of the VSphereCluster. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time type: string - description: Attributes is a free form map of attributes an - infrastructure provider might use or require. - type: object - controlPlane: - description: ControlPlane determines if this failure domain - is suitable for use by control plane machines. - type: boolean + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - status + - type + type: object + type: array + failureDomains: + additionalProperties: + description: |- + FailureDomainSpec is the Schema for Cluster API failure domains. + It allows controllers to understand how many failure domains a cluster can optionally span across. + properties: + attributes: + additionalProperties: + type: string + description: Attributes is a free form map of attributes an + infrastructure provider might use or require. + type: object + controlPlane: + description: ControlPlane determines if this failure domain + is suitable for use by control plane machines. + type: boolean + type: object + description: FailureDomains is a list of failure domain objects synced + from the infrastructure provider. type: object - description: FailureDomains is a list of failure domain objects synced - from the infrastructure provider. - type: object - ready: - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Cluster infrastructure is ready for VSphereMachine - jsonPath: .status.ready - name: Ready - type: string - - description: Server is the address of the vSphere endpoint. - jsonPath: .spec.server - name: Server - type: string - - description: API Endpoint - jsonPath: .spec.controlPlaneEndpoint[0] - name: ControlPlaneEndpoint - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: VSphereCluster is the Schema for the vsphereclusters API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereClusterSpec defines the desired state of VSphereCluster. - properties: - clusterModules: - description: |- - ClusterModules hosts information regarding the anti-affinity vSphere constructs - for each of the objects responsible for creation of VM objects belonging to the cluster. - items: - description: |- - ClusterModule holds the anti affinity construct `ClusterModule` identifier - in use by the VMs owned by the object referred by the TargetObjectName field. + ready: + type: boolean + type: object + type: object + served: false + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster infrastructure is ready for VSphereMachine + jsonPath: .status.ready + name: Ready + type: string + - description: Server is the address of the vSphere endpoint + jsonPath: .spec.server + name: Server + type: string + - description: API Endpoint + jsonPath: .spec.controlPlaneEndpoint[0] + name: ControlPlaneEndpoint + priority: 1 + type: string + - description: Time duration since creation of Machine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + deprecated: true + name: v1alpha4 + schema: + openAPIV3Schema: + description: |- + VSphereCluster is the Schema for the vsphereclusters API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereClusterSpec defines the desired state of VSphereCluster + properties: + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint used to + communicate with the control plane. properties: - controlPlane: - description: |- - ControlPlane indicates whether the referred object is responsible for control plane nodes. - Currently, only the KubeadmControlPlane objects have this flag set to true. - Only a single object in the slice can have this value set to true. - type: boolean - moduleUUID: - description: ModuleUUID is the unique identifier of the `ClusterModule` - used by the object. + host: + description: The hostname on which the API server is serving. type: string - targetObjectName: - description: |- - TargetObjectName points to the object that uses the Cluster Module information to enforce - anti-affinity amongst its descendant VM objects. + port: + description: The port on which the API server is serving. + format: int32 + type: integer + required: + - host + - port + type: object + identityRef: + description: |- + IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains + the identity to use when reconciling the cluster. + properties: + kind: + description: Kind of the identity. Can either be VSphereClusterIdentity + or Secret + enum: + - VSphereClusterIdentity + - Secret + type: string + name: + description: Name of the identity. + minLength: 1 type: string required: - - controlPlane - - moduleUUID - - targetObjectName + - kind + - name type: object - type: array - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint used to - communicate with the control plane. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - failureDomainSelector: - description: |- - FailureDomainSelector is the label selector to use for failure domain selection - for the control plane nodes of the cluster. - If not set (`nil`), selecting failure domains will be disabled. - An empty value (`{}`) selects all existing failure domains. - A valid selector will select all failure domains which match the selector. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. + server: + description: Server is the address of the vSphere endpoint. + type: string + thumbprint: + description: Thumbprint is the colon-separated SHA-1 checksum of the + given vCenter server's host certificate + type: string + type: object + status: + description: VSphereClusterStatus defines the observed state of VSphereClusterSpec + properties: + conditions: + description: Conditions defines current service state of the VSphereCluster. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - status + - type + type: object + type: array + failureDomains: + additionalProperties: + description: |- + FailureDomainSpec is the Schema for Cluster API failure domains. + It allows controllers to understand how many failure domains a cluster can optionally span across. + properties: + attributes: + additionalProperties: type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string + description: Attributes is a free form map of attributes an + infrastructure provider might use or require. + type: object + controlPlane: + description: ControlPlane determines if this failure domain + is suitable for use by control plane machines. + type: boolean + type: object + description: FailureDomains is a list of failure domain objects synced + from the infrastructure provider. + type: object + ready: + type: boolean + type: object + type: object + served: false + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster infrastructure is ready for VSphereMachine + jsonPath: .status.ready + name: Ready + type: string + - description: Server is the address of the vSphere endpoint. + jsonPath: .spec.server + name: Server + type: string + - description: API Endpoint + jsonPath: .spec.controlPlaneEndpoint[0] + name: ControlPlaneEndpoint + priority: 1 + type: string + - description: Time duration since creation of Machine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: VSphereCluster is the Schema for the vsphereclusters API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereClusterSpec defines the desired state of VSphereCluster. + properties: + clusterModules: + description: |- + ClusterModules hosts information regarding the anti-affinity vSphere constructs + for each of the objects responsible for creation of VM objects belonging to the cluster. + items: description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. + ClusterModule holds the anti affinity construct `ClusterModule` identifier + in use by the VMs owned by the object referred by the TargetObjectName field. + properties: + controlPlane: + description: |- + ControlPlane indicates whether the referred object is responsible for control plane nodes. + Currently, only the KubeadmControlPlane objects have this flag set to true. + Only a single object in the slice can have this value set to true. + type: boolean + moduleUUID: + description: ModuleUUID is the unique identifier of the `ClusterModule` + used by the object. + type: string + targetObjectName: + description: |- + TargetObjectName points to the object that uses the Cluster Module information to enforce + anti-affinity amongst its descendant VM objects. + type: string + required: + - controlPlane + - moduleUUID + - targetObjectName type: object - type: object - x-kubernetes-map-type: atomic - identityRef: - description: |- - IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains - the identity to use when reconciling the cluster. - properties: - kind: - description: Kind of the identity. Can either be VSphereClusterIdentity - or Secret - enum: - - VSphereClusterIdentity - - Secret - type: string - name: - description: Name of the identity. - minLength: 1 - type: string - required: - - kind - - name - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum of the - given vCenter server's host certificate - type: string - type: object - status: - description: VSphereClusterStatus defines the observed state of VSphereClusterSpec. - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + type: array + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint used to + communicate with the control plane. properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. + host: + description: The hostname on which the API server is serving. type: string + port: + description: The port on which the API server is serving. + format: int32 + type: integer required: - - lastTransitionTime - - status - - type + - host + - port type: object - type: array - failureDomains: - additionalProperties: + failureDomainSelector: description: |- - FailureDomainSpec is the Schema for Cluster API failure domains. - It allows controllers to understand how many failure domains a cluster can optionally span across. + FailureDomainSelector is the label selector to use for failure domain selection + for the control plane nodes of the cluster. + If not set (`nil`), selecting failure domains will be disabled. + An empty value (`{}`) selects all existing failure domains. + A valid selector will select all failure domains which match the selector. properties: - attributes: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: additionalProperties: type: string - description: Attributes is a free form map of attributes an - infrastructure provider might use or require. + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - controlPlane: - description: ControlPlane determines if this failure domain - is suitable for use by control plane machines. - type: boolean type: object - description: FailureDomains is a list of failure domain objects synced - from the infrastructure provider. - type: object - ready: - type: boolean - vCenterVersion: - description: VCenterVersion defines the version of the vCenter server - defined in the spec. - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: capv-system/capv-serving-cert - controller-gen.kubebuilder.io/version: v0.15.0 - labels: - cluster.x-k8s.io/provider: infrastructure-vsphere - cluster.x-k8s.io/v1beta1: v1beta1 - name: vsphereclustertemplates.infrastructure.cluster.x-k8s.io -spec: - conversion: + x-kubernetes-map-type: atomic + identityRef: + description: |- + IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains + the identity to use when reconciling the cluster. + properties: + kind: + description: Kind of the identity. Can either be VSphereClusterIdentity + or Secret + enum: + - VSphereClusterIdentity + - Secret + type: string + name: + description: Name of the identity. + minLength: 1 + type: string + required: + - kind + - name + type: object + server: + description: Server is the address of the vSphere endpoint. + type: string + thumbprint: + description: Thumbprint is the colon-separated SHA-1 checksum of the + given vCenter server's host certificate + type: string + type: object + status: + description: VSphereClusterStatus defines the observed state of VSphereClusterSpec. + properties: + conditions: + description: Conditions defines current service state of the VSphereCluster. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureDomains: + additionalProperties: + description: |- + FailureDomainSpec is the Schema for Cluster API failure domains. + It allows controllers to understand how many failure domains a cluster can optionally span across. + properties: + attributes: + additionalProperties: + type: string + description: Attributes is a free form map of attributes an + infrastructure provider might use or require. + type: object + controlPlane: + description: ControlPlane determines if this failure domain + is suitable for use by control plane machines. + type: boolean + type: object + description: FailureDomains is a list of failure domain objects synced + from the infrastructure provider. + type: object + ready: + type: boolean + vCenterVersion: + description: VCenterVersion defines the version of the vCenter server + defined in the spec. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: capv-system/capv-serving-cert + controller-gen.kubebuilder.io/version: v0.15.0 + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + cluster.x-k8s.io/v1beta1: v1beta1 + name: vsphereclustertemplates.infrastructure.cluster.x-k8s.io +spec: + conversion: strategy: Webhook webhook: clientConfig: @@ -1351,271 +1351,271 @@ spec: namespace: capv-system path: /convert conversionReviewVersions: - - v1 - - v1beta1 + - v1 + - v1beta1 group: infrastructure.cluster.x-k8s.io names: categories: - - cluster-api + - cluster-api kind: VSphereClusterTemplate listKind: VSphereClusterTemplateList plural: vsphereclustertemplates singular: vsphereclustertemplate scope: Namespaced versions: - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - VSphereClusterTemplate is the Schema for the vsphereclustertemplates API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereClusterTemplateSpec defines the desired state of VSphereClusterTemplate - properties: - template: - properties: - spec: - description: VSphereClusterSpec defines the desired state of VSphereCluster - properties: - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint - used to communicate with the control plane. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - identityRef: - description: |- - IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains - the identity to use when reconciling the cluster. - properties: - kind: - description: Kind of the identity. Can either be VSphereClusterIdentity - or Secret - enum: - - VSphereClusterIdentity - - Secret - type: string - name: - description: Name of the identity. - minLength: 1 - type: string - required: - - kind - - name - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum - of the given vCenter server's host certificate - type: string - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: false - storage: false - - name: v1beta1 - schema: - openAPIV3Schema: - description: VSphereClusterTemplate is the Schema for the vsphereclustertemplates - API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereClusterTemplateSpec defines the desired state of VSphereClusterTemplate. - properties: - template: - description: VSphereClusterTemplateResource describes the data for - creating a VSphereCluster from a template. - properties: - spec: - description: VSphereClusterSpec defines the desired state of VSphereCluster. - properties: - clusterModules: - description: |- - ClusterModules hosts information regarding the anti-affinity vSphere constructs - for each of the objects responsible for creation of VM objects belonging to the cluster. - items: + - deprecated: true + name: v1alpha4 + schema: + openAPIV3Schema: + description: |- + VSphereClusterTemplate is the Schema for the vsphereclustertemplates API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereClusterTemplateSpec defines the desired state of VSphereClusterTemplate + properties: + template: + properties: + spec: + description: VSphereClusterSpec defines the desired state of VSphereCluster + properties: + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint + used to communicate with the control plane. + properties: + host: + description: The hostname on which the API server is serving. + type: string + port: + description: The port on which the API server is serving. + format: int32 + type: integer + required: + - host + - port + type: object + identityRef: description: |- - ClusterModule holds the anti affinity construct `ClusterModule` identifier - in use by the VMs owned by the object referred by the TargetObjectName field. + IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains + the identity to use when reconciling the cluster. properties: - controlPlane: - description: |- - ControlPlane indicates whether the referred object is responsible for control plane nodes. - Currently, only the KubeadmControlPlane objects have this flag set to true. - Only a single object in the slice can have this value set to true. - type: boolean - moduleUUID: - description: ModuleUUID is the unique identifier of - the `ClusterModule` used by the object. + kind: + description: Kind of the identity. Can either be VSphereClusterIdentity + or Secret + enum: + - VSphereClusterIdentity + - Secret type: string - targetObjectName: - description: |- - TargetObjectName points to the object that uses the Cluster Module information to enforce - anti-affinity amongst its descendant VM objects. + name: + description: Name of the identity. + minLength: 1 type: string required: - - controlPlane - - moduleUUID - - targetObjectName + - kind + - name type: object - type: array - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint - used to communicate with the control plane. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - failureDomainSelector: - description: |- - FailureDomainSelector is the label selector to use for failure domain selection - for the control plane nodes of the cluster. - If not set (`nil`), selecting failure domains will be disabled. - An empty value (`{}`) selects all existing failure domains. - A valid selector will select all failure domains which match the selector. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + server: + description: Server is the address of the vSphere endpoint. + type: string + thumbprint: + description: Thumbprint is the colon-separated SHA-1 checksum + of the given vCenter server's host certificate + type: string + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: false + storage: false + - name: v1beta1 + schema: + openAPIV3Schema: + description: VSphereClusterTemplate is the Schema for the vsphereclustertemplates + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereClusterTemplateSpec defines the desired state of VSphereClusterTemplate. + properties: + template: + description: VSphereClusterTemplateResource describes the data for + creating a VSphereCluster from a template. + properties: + spec: + description: VSphereClusterSpec defines the desired state of VSphereCluster. + properties: + clusterModules: + description: |- + ClusterModules hosts information regarding the anti-affinity vSphere constructs + for each of the objects responsible for creation of VM objects belonging to the cluster. + items: + description: |- + ClusterModule holds the anti affinity construct `ClusterModule` identifier + in use by the VMs owned by the object referred by the TargetObjectName field. + properties: + controlPlane: + description: |- + ControlPlane indicates whether the referred object is responsible for control plane nodes. + Currently, only the KubeadmControlPlane objects have this flag set to true. + Only a single object in the slice can have this value set to true. + type: boolean + moduleUUID: + description: ModuleUUID is the unique identifier of + the `ClusterModule` used by the object. + type: string + targetObjectName: + description: |- + TargetObjectName points to the object that uses the Cluster Module information to enforce + anti-affinity amongst its descendant VM objects. + type: string + required: + - controlPlane + - moduleUUID + - targetObjectName + type: object + type: array + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint + used to communicate with the control plane. + properties: + host: + description: The hostname on which the API server is serving. + type: string + port: + description: The port on which the API server is serving. + format: int32 + type: integer + required: + - host + - port + type: object + failureDomainSelector: + description: |- + FailureDomainSelector is the label selector to use for failure domain selection + for the control plane nodes of the cluster. + If not set (`nil`), selecting failure domains will be disabled. + An empty value (`{}`) selects all existing failure domains. + A valid selector will select all failure domains which match the selector. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: + type: object + x-kubernetes-map-type: atomic + identityRef: + description: |- + IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains + the identity to use when reconciling the cluster. + properties: + kind: + description: Kind of the identity. Can either be VSphereClusterIdentity + or Secret + enum: + - VSphereClusterIdentity + - Secret type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - identityRef: - description: |- - IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains - the identity to use when reconciling the cluster. - properties: - kind: - description: Kind of the identity. Can either be VSphereClusterIdentity - or Secret - enum: - - VSphereClusterIdentity - - Secret - type: string - name: - description: Name of the identity. - minLength: 1 - type: string - required: - - kind - - name - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum - of the given vCenter server's host certificate - type: string - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: true - storage: true + name: + description: Name of the identity. + minLength: 1 + type: string + required: + - kind + - name + type: object + server: + description: Server is the address of the vSphere endpoint. + type: string + thumbprint: + description: Thumbprint is the colon-separated SHA-1 checksum + of the given vCenter server's host certificate + type: string + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: true + storage: true --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -1637,796 +1637,367 @@ spec: namespace: capv-system path: /convert conversionReviewVersions: - - v1 - - v1beta1 + - v1 + - v1beta1 group: infrastructure.cluster.x-k8s.io names: categories: - - cluster-api + - cluster-api kind: VSphereDeploymentZone listKind: VSphereDeploymentZoneList plural: vspheredeploymentzones singular: vspheredeploymentzone scope: Cluster versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - VSphereDeploymentZone is the Schema for the vspheredeploymentzones API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone - properties: - controlPlane: - description: ControlPlane determines if this failure domain is suitable - for use by control plane machines. - type: boolean - failureDomain: - description: failureDomain is the name of the VSphereFailureDomain - used for this VSphereDeploymentZone - type: string - placementConstraint: - description: |- - PlacementConstraint encapsulates the placement constraints - used within this deployment zone. - properties: - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - required: - - placementConstraint - type: object - status: - properties: - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + - deprecated: true + name: v1alpha3 + schema: + openAPIV3Schema: + description: |- + VSphereDeploymentZone is the Schema for the vspheredeploymentzones API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone + properties: + controlPlane: + description: ControlPlane determines if this failure domain is suitable + for use by control plane machines. + type: boolean + failureDomain: + description: failureDomain is the name of the VSphereFailureDomain + used for this VSphereDeploymentZone + type: string + placementConstraint: + description: |- + PlacementConstraint encapsulates the placement constraints + used within this deployment zone. properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: + folder: description: |- - A human readable message indicating details about the transition. - This field may be empty. + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. type: string - reason: + resourcePool: description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type type: object - type: array - ready: - description: |- - Ready is true when the VSphereDeploymentZone resource is ready. - If set to false, it will be ignored by VSphereClusters - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - VSphereDeploymentZone is the Schema for the vspheredeploymentzones API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone - properties: - controlPlane: - description: ControlPlane determines if this failure domain is suitable - for use by control plane machines. - type: boolean - failureDomain: - description: FailureDomain is the name of the VSphereFailureDomain - used for this VSphereDeploymentZone - type: string - placementConstraint: - description: |- - PlacementConstraint encapsulates the placement constraints - used within this deployment zone. - properties: - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - required: - - placementConstraint - type: object - status: - properties: - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + server: + description: Server is the address of the vSphere endpoint. + type: string + required: + - placementConstraint + type: object + status: + properties: + conditions: + description: Conditions defines current service state of the VSphereMachine. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - status + - type + type: object + type: array + ready: + description: |- + Ready is true when the VSphereDeploymentZone resource is ready. + If set to false, it will be ignored by VSphereClusters + type: boolean + type: object + type: object + served: false + storage: false + subresources: + status: {} + - deprecated: true + name: v1alpha4 + schema: + openAPIV3Schema: + description: |- + VSphereDeploymentZone is the Schema for the vspheredeploymentzones API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone + properties: + controlPlane: + description: ControlPlane determines if this failure domain is suitable + for use by control plane machines. + type: boolean + failureDomain: + description: FailureDomain is the name of the VSphereFailureDomain + used for this VSphereDeploymentZone + type: string + placementConstraint: + description: |- + PlacementConstraint encapsulates the placement constraints + used within this deployment zone. properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: + folder: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. type: string - type: + resourcePool: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. type: string - required: - - status - - type type: object - type: array - ready: - description: |- - Ready is true when the VSphereDeploymentZone resource is ready. - If set to false, it will be ignored by VSphereClusters - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - name: v1beta1 - schema: - openAPIV3Schema: - description: VSphereDeploymentZone is the Schema for the vspheredeploymentzones - API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone. - properties: - controlPlane: - description: ControlPlane determines if this failure domain is suitable - for use by control plane machines. - type: boolean - failureDomain: - description: FailureDomain is the name of the VSphereFailureDomain - used for this VSphereDeploymentZone - type: string - placementConstraint: - description: |- - PlacementConstraint encapsulates the placement constraints - used within this deployment zone. - properties: - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - required: - - placementConstraint - type: object - status: - description: VSphereDeploymentZoneStatus contains the status for a VSphereDeploymentZone. - properties: - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + server: + description: Server is the address of the vSphere endpoint. + type: string + required: + - placementConstraint + type: object + status: + properties: + conditions: + description: Conditions defines current service state of the VSphereMachine. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - status + - type + type: object + type: array + ready: + description: |- + Ready is true when the VSphereDeploymentZone resource is ready. + If set to false, it will be ignored by VSphereClusters + type: boolean + type: object + type: object + served: false + storage: false + subresources: + status: {} + - name: v1beta1 + schema: + openAPIV3Schema: + description: VSphereDeploymentZone is the Schema for the vspheredeploymentzones + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone. + properties: + controlPlane: + description: ControlPlane determines if this failure domain is suitable + for use by control plane machines. + type: boolean + failureDomain: + description: FailureDomain is the name of the VSphereFailureDomain + used for this VSphereDeploymentZone + type: string + placementConstraint: + description: |- + PlacementConstraint encapsulates the placement constraints + used within this deployment zone. properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: + folder: description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. type: string - severity: + resourcePool: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - lastTransitionTime - - status - - type type: object - type: array - ready: - description: |- - Ready is true when the VSphereDeploymentZone resource is ready. - If set to false, it will be ignored by VSphereClusters - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: capv-system/capv-serving-cert - controller-gen.kubebuilder.io/version: v0.15.0 - labels: - cluster.x-k8s.io/provider: infrastructure-vsphere - cluster.x-k8s.io/v1beta1: v1beta1 - name: vspherefailuredomains.infrastructure.cluster.x-k8s.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /convert - conversionReviewVersions: - - v1 - - v1beta1 - group: infrastructure.cluster.x-k8s.io - names: - categories: - - cluster-api - kind: VSphereFailureDomain - listKind: VSphereFailureDomainList - plural: vspherefailuredomains - singular: vspherefailuredomain - scope: Cluster - versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - VSphereFailureDomain is the Schema for the vspherefailuredomains API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain - properties: - region: - description: Region defines the name and type of a region - properties: - autoConfigure: - description: AutoConfigure tags the Type which is specified in - the Topology - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - topology: - description: Topology is the what describes a given failure domain - using vSphere constructs - properties: - computeCluster: - description: ComputeCluster as the failure domain - type: string - datacenter: - description: |- - The underlying infrastructure for this failure domain - Datacenter as the failure domain - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - hosts: - description: Hosts has information required for placement of machines - on VSphere hosts. + server: + description: Server is the address of the vSphere endpoint. + type: string + required: + - placementConstraint + type: object + status: + description: VSphereDeploymentZoneStatus contains the status for a VSphereDeploymentZone. + properties: + conditions: + description: Conditions defines current service state of the VSphereMachine. + items: + description: Condition defines an observation of a Cluster API resource + operational state. properties: - hostGroupName: - description: HostGroupName is the name of the Host group + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time type: string - vmGroupName: - description: VMGroupName is the name of the VM group + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. type: string - required: - - hostGroupName - - vmGroupName - type: object - networks: - description: Networks is the list of networks within this failure - domain - items: - type: string - type: array - required: - - datacenter - type: object - zone: - description: Zone defines the name and type of a zone - properties: - autoConfigure: - description: AutoConfigure tags the Type which is specified in - the Topology - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - required: - - region - - topology - - zone - type: object - type: object - served: false - storage: false - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - VSphereFailureDomain is the Schema for the vspherefailuredomains API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain - properties: - region: - description: Region defines the name and type of a region - properties: - autoConfigure: - description: AutoConfigure tags the Type which is specified in - the Topology - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - topology: - description: Topology describes a given failure domain using vSphere - constructs - properties: - computeCluster: - description: ComputeCluster as the failure domain - type: string - datacenter: - description: |- - The underlying infrastructure for this failure domain - Datacenter as the failure domain - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - hosts: - description: Hosts has information required for placement of machines - on VSphere hosts. - properties: - hostGroupName: - description: HostGroupName is the name of the Host group + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. type: string - vmGroupName: - description: VMGroupName is the name of the VM group + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. type: string - required: - - hostGroupName - - vmGroupName - type: object - networks: - description: Networks is the list of networks within this failure - domain - items: - type: string - type: array - required: - - datacenter - type: object - zone: - description: Zone defines the name and type of a zone - properties: - autoConfigure: - description: AutoConfigure tags the Type which is specified in - the Topology - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - required: - - region - - topology - - zone - type: object - type: object - served: false - storage: false - - name: v1beta1 - schema: - openAPIV3Schema: - description: VSphereFailureDomain is the Schema for the vspherefailuredomains - API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain. - properties: - region: - description: Region defines the name and type of a region - properties: - autoConfigure: - description: |- - AutoConfigure tags the Type which is specified in the Topology - - - Deprecated: This field is going to be removed in a future release. - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - topology: - description: Topology describes a given failure domain using vSphere - constructs - properties: - computeCluster: - description: ComputeCluster as the failure domain - type: string - datacenter: - description: Datacenter as the failure domain. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - hosts: - description: Hosts has information required for placement of machines - on VSphere hosts. - properties: - hostGroupName: - description: HostGroupName is the name of the Host group + status: + description: Status of the condition, one of True, False, Unknown. type: string - vmGroupName: - description: VMGroupName is the name of the VM group + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. type: string required: - - hostGroupName - - vmGroupName + - lastTransitionTime + - status + - type type: object - networks: - description: Networks is the list of networks within this failure - domain - items: - type: string - type: array - required: - - datacenter - type: object - zone: - description: Zone defines the name and type of a zone - properties: - autoConfigure: - description: |- - AutoConfigure tags the Type which is specified in the Topology - - - Deprecated: This field is going to be removed in a future release. - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - required: - - region - - topology - - zone - type: object - type: object - served: true - storage: true + type: array + ready: + description: |- + Ready is true when the VSphereDeploymentZone resource is ready. + If set to false, it will be ignored by VSphereClusters + type: boolean + type: object + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -2437,7 +2008,7 @@ metadata: labels: cluster.x-k8s.io/provider: infrastructure-vsphere cluster.x-k8s.io/v1beta1: v1beta1 - name: vspheremachines.infrastructure.cluster.x-k8s.io + name: vspherefailuredomains.infrastructure.cluster.x-k8s.io spec: conversion: strategy: Webhook @@ -2448,1612 +2019,414 @@ spec: namespace: capv-system path: /convert conversionReviewVersions: - - v1 - - v1beta1 + - v1 + - v1beta1 group: infrastructure.cluster.x-k8s.io names: categories: - - cluster-api - kind: VSphereMachine - listKind: VSphereMachineList - plural: vspheremachines - singular: vspheremachine - scope: Namespaced + - cluster-api + kind: VSphereFailureDomain + listKind: VSphereFailureDomainList + plural: vspherefailuredomains + singular: vspherefailuredomain + scope: Cluster versions: - - additionalPrinterColumns: - - description: Cluster to which this VSphereMachine belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - type: string - - description: Machine ready status - jsonPath: .status.ready - name: Ready - type: string - - description: VSphereMachine instance ID - jsonPath: .spec.providerID - name: ProviderID - type: string - - description: Machine object which owns this VSphereMachine - jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name - name: Machine - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - VSphereMachine is the Schema for the vspheremachines API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereMachineSpec defines the desired state of VSphereMachine - properties: - cloneMode: - description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: |- - FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. - For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. - type: string - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - memoryMiB: - description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. - properties: - deviceName: - description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. - type: string - dhcp4: - description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - gateway4: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. - type: string - ipAddrs: - description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 - type: integer - nameservers: - description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine - type: string - routes: - description: |- - Routes is a list of optional, static routes applied to the virtual - machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: |- - NumCPUs is the number of virtual processors in a virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - providerID: - description: |- - ProviderID is the virtual machine's BIOS UUID formated as - vsphere://12345678-1234-1234-1234-123456789abc - type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - server: - description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - template: - description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 - type: string - thumbprint: - description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereMachineStatus defines the observed state of VSphereMachine - properties: - addresses: - description: Addresses contains the VSphere instance associated addresses. - items: - description: MachineAddress contains information for the node's - address. + - deprecated: true + name: v1alpha3 + schema: + openAPIV3Schema: + description: |- + VSphereFailureDomain is the Schema for the vspherefailuredomains API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain + properties: + region: + description: Region defines the name and type of a region properties: - address: - description: The machine address. + autoConfigure: + description: AutoConfigure tags the Type which is specified in + the Topology + type: boolean + name: + description: Name is the name of the tag that represents this + failure domain + type: string + tagCategory: + description: TagCategory is the category used for the tag type: string type: - description: Machine address type, one of Hostname, ExternalIP - or InternalIP. + description: Type is the type of failure domain, the current values + are "Datacenter", "ComputeCluster" and "HostGroup" + enum: + - Datacenter + - ComputeCluster + - HostGroup type: string required: - - address - - type + - name + - tagCategory + - type type: object - type: array - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + topology: + description: Topology is the what describes a given failure domain + using vSphere constructs properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time + computeCluster: + description: ComputeCluster as the failure domain type: string - message: + datacenter: description: |- - A human readable message indicating details about the transition. - This field may be empty. + The underlying infrastructure for this failure domain + Datacenter as the failure domain type: string - reason: + datastore: description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. + hosts: + description: Hosts has information required for placement of machines + on VSphere hosts. + properties: + hostGroupName: + description: HostGroupName is the name of the Host group + type: string + vmGroupName: + description: VMGroupName is the name of the VM group + type: string + required: + - hostGroupName + - vmGroupName + type: object + networks: + description: Networks is the list of networks within this failure + domain + items: + type: string + type: array + required: + - datacenter + type: object + zone: + description: Zone defines the name and type of a zone + properties: + autoConfigure: + description: AutoConfigure tags the Type which is specified in + the Topology + type: boolean + name: + description: Name is the name of the tag that represents this + failure domain type: string - status: - description: Status of the condition, one of True, False, Unknown. + tagCategory: + description: TagCategory is the category used for the tag type: string type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. + description: Type is the type of failure domain, the current values + are "Datacenter", "ComputeCluster" and "HostGroup" + enum: + - Datacenter + - ComputeCluster + - HostGroup type: string required: - - status - - type + - name + - tagCategory + - type type: object - type: array - failureMessage: - description: |- - FailureMessage will be set in the event that there is a terminal problem - reconciling the Machine and will contain a more verbose string suitable - for logging and human consumption. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - failureReason: - description: |- - FailureReason will be set in the event that there is a terminal problem - reconciling the Machine and will contain a succinct value suitable - for machine interpretation. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - network: - description: |- - Network returns the network status for each of the machine's configured - network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. + required: + - region + - topology + - zone + type: object + type: object + served: false + storage: false + - deprecated: true + name: v1alpha4 + schema: + openAPIV3Schema: + description: |- + VSphereFailureDomain is the Schema for the vspherefailuredomains API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain + properties: + region: + description: Region defines the name and type of a region properties: - connected: - description: |- - Connected is a flag that indicates whether this network is currently - connected to the VM. + autoConfigure: + description: AutoConfigure tags the Type which is specified in + the Topology type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. + name: + description: Name is the name of the tag that represents this + failure domain type: string - networkName: - description: NetworkName is the name of the network. + tagCategory: + description: TagCategory is the category used for the tag + type: string + type: + description: Type is the type of failure domain, the current values + are "Datacenter", "ComputeCluster" and "HostGroup" + enum: + - Datacenter + - ComputeCluster + - HostGroup type: string required: - - macAddr + - name + - tagCategory + - type type: object - type: array - ready: - description: Ready is true when the provider resource is ready. - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Cluster to which this VSphereMachine belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - type: string - - description: Machine ready status - jsonPath: .status.ready - name: Ready - type: string - - description: VSphereMachine instance ID - jsonPath: .spec.providerID - name: ProviderID - type: string - - description: Machine object which owns this VSphereMachine - jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name - name: Machine - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - VSphereMachine is the Schema for the vspheremachines API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereMachineSpec defines the desired state of VSphereMachine - properties: - cloneMode: - description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: |- - FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. - For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. - type: string - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - memoryMiB: - description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name - items: + topology: + description: Topology describes a given failure domain using vSphere + constructs + properties: + computeCluster: + description: ComputeCluster as the failure domain + type: string + datacenter: description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. - properties: - deviceName: - description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. - type: string - dhcp4: - description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - gateway4: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. - type: string - ipAddrs: - description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 - type: integer - nameservers: - description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine - type: string - routes: - description: |- - Routes is a list of optional, static routes applied to the virtual - machine. - items: - description: NetworkRouteSpec defines a static network route. + The underlying infrastructure for this failure domain + Datacenter as the failure domain + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + hosts: + description: Hosts has information required for placement of machines + on VSphere hosts. properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. + hostGroupName: + description: HostGroupName is the name of the Host group type: string - via: - description: Via is an IPv4 or IPv6 address. + vmGroupName: + description: VMGroupName is the name of the VM group type: string required: - - metric - - to - - via + - hostGroupName + - vmGroupName type: object - type: array - required: - - devices - type: object - numCPUs: - description: |- - NumCPUs is the number of virtual processors in a virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - providerID: - description: |- - ProviderID is the virtual machine's BIOS UUID formated as - vsphere://12345678-1234-1234-1234-123456789abc - type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - server: - description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - template: - description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 - type: string - thumbprint: - description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereMachineStatus defines the observed state of VSphereMachine - properties: - addresses: - description: Addresses contains the VSphere instance associated addresses. - items: - description: MachineAddress contains information for the node's - address. + networks: + description: Networks is the list of networks within this failure + domain + items: + type: string + type: array + required: + - datacenter + type: object + zone: + description: Zone defines the name and type of a zone properties: - address: - description: The machine address. + autoConfigure: + description: AutoConfigure tags the Type which is specified in + the Topology + type: boolean + name: + description: Name is the name of the tag that represents this + failure domain + type: string + tagCategory: + description: TagCategory is the category used for the tag type: string type: - description: Machine address type, one of Hostname, ExternalIP - or InternalIP. + description: Type is the type of failure domain, the current values + are "Datacenter", "ComputeCluster" and "HostGroup" + enum: + - Datacenter + - ComputeCluster + - HostGroup type: string required: - - address - - type + - name + - tagCategory + - type type: object - type: array - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + required: + - region + - topology + - zone + type: object + type: object + served: false + storage: false + - name: v1beta1 + schema: + openAPIV3Schema: + description: VSphereFailureDomain is the Schema for the vspherefailuredomains + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain. + properties: + region: + description: Region defines the name and type of a region properties: - lastTransitionTime: + autoConfigure: description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time + AutoConfigure tags the Type which is specified in the Topology + + + Deprecated: This field is going to be removed in a future release. + type: boolean + name: + description: Name is the name of the tag that represents this + failure domain type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. + tagCategory: + description: TagCategory is the category used for the tag type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + type: + description: Type is the type of failure domain, the current values + are "Datacenter", "ComputeCluster" and "HostGroup" + enum: + - Datacenter + - ComputeCluster + - HostGroup type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. + required: + - name + - tagCategory + - type + type: object + topology: + description: Topology describes a given failure domain using vSphere + constructs + properties: + computeCluster: + description: ComputeCluster as the failure domain type: string - status: - description: Status of the condition, one of True, False, Unknown. + datacenter: + description: Datacenter as the failure domain. type: string - type: + datastore: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. type: string + hosts: + description: Hosts has information required for placement of machines + on VSphere hosts. + properties: + hostGroupName: + description: HostGroupName is the name of the Host group + type: string + vmGroupName: + description: VMGroupName is the name of the VM group + type: string + required: + - hostGroupName + - vmGroupName + type: object + networks: + description: Networks is the list of networks within this failure + domain + items: + type: string + type: array required: - - status - - type + - datacenter type: object - type: array - failureMessage: - description: |- - FailureMessage will be set in the event that there is a terminal problem - reconciling the Machine and will contain a more verbose string suitable - for logging and human consumption. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - failureReason: - description: |- - FailureReason will be set in the event that there is a terminal problem - reconciling the Machine and will contain a succinct value suitable - for machine interpretation. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - network: - description: |- - Network returns the network status for each of the machine's configured - network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. + zone: + description: Zone defines the name and type of a zone properties: - connected: + autoConfigure: description: |- - Connected is a flag that indicates whether this network is currently - connected to the VM. + AutoConfigure tags the Type which is specified in the Topology + + + Deprecated: This field is going to be removed in a future release. type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. + name: + description: Name is the name of the tag that represents this + failure domain type: string - networkName: - description: NetworkName is the name of the network. + tagCategory: + description: TagCategory is the category used for the tag + type: string + type: + description: Type is the type of failure domain, the current values + are "Datacenter", "ComputeCluster" and "HostGroup" + enum: + - Datacenter + - ComputeCluster + - HostGroup type: string required: - - macAddr + - name + - tagCategory + - type type: object - type: array - ready: - description: Ready is true when the provider resource is ready. - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Cluster to which this VSphereMachine belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - type: string - - description: Machine ready status - jsonPath: .status.ready - name: Ready - type: string - - description: VSphereMachine instance ID - jsonPath: .spec.providerID - name: ProviderID - type: string - - description: Machine object which owns with this VSphereMachine - jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name - name: Machine - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: VSphereMachine is the Schema for the vspheremachines API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereMachineSpec defines the desired state of VSphereMachine. - properties: - additionalDisksGiB: - description: |- - AdditionalDisksGiB holds the sizes of additional disks of the virtual machine, in GiB - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - items: - format: int32 - type: integer - type: array - cloneMode: - description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - Defaults to * which selects the default datacenter. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: |- - FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. - For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. - type: string - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - guestSoftPowerOffTimeout: - description: |- - GuestSoftPowerOffTimeout sets the wait timeout for shutdown in the VM guest. - The VM will be powered off forcibly after the timeout if the VM is still - up and running when the PowerOffMode is set to trySoft. - - - This parameter only applies when the PowerOffMode is set to trySoft. - - - If omitted, the timeout defaults to 5 minutes. - type: string - hardwareVersion: - description: |- - HardwareVersion is the hardware version of the virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Check the compatibility with the ESXi version before setting the value. - type: string - memoryMiB: - description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. - properties: - addressesFromPools: - description: |- - AddressesFromPools is a list of IPAddressPools that should be assigned - to IPAddressClaims. The machine's cloud-init metadata will be populated - with IPAddresses fulfilled by an IPAM provider. - items: - description: |- - TypedLocalObjectReference contains enough information to let you locate the - typed referenced object inside the same namespace. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - type: array - deviceName: - description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. - type: string - dhcp4: - description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp4Overrides: - description: |- - DHCP4Overrides allows for the control over several DHCP behaviors. - Overrides will only be applied when the corresponding DHCP flag is set. - Only configured values will be sent, omitted values will default to - distribution defaults. - Dependent on support in the network stack for your distribution. - For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) - properties: - hostname: - description: |- - Hostname is the name which will be sent to the DHCP server instead of - the machine's hostname. - type: string - routeMetric: - description: |- - RouteMetric is used to prioritize routes for devices. A lower metric for - an interface will have a higher priority. - type: integer - sendHostname: - description: |- - SendHostname when `true`, the hostname of the machine will be sent to the - DHCP server. - type: boolean - useDNS: - description: |- - UseDNS when `true`, the DNS servers in the DHCP server will be used and - take precedence. - type: boolean - useDomains: - description: |- - UseDomains can take the values `true`, `false`, or `route`. When `true`, - the domain name from the DHCP server will be used as the DNS search - domain for this device. When `route`, the domain name from the DHCP - response will be used for routing DNS only, not for searching. - type: string - useHostname: - description: |- - UseHostname when `true`, the hostname from the DHCP server will be set - as the transient hostname of the machine. - type: boolean - useMTU: - description: |- - UseMTU when `true`, the MTU from the DHCP server will be set as the - MTU of the device. - type: boolean - useNTP: - description: |- - UseNTP when `true`, the NTP servers from the DHCP server will be used - by systemd-timesyncd and take precedence. - type: boolean - useRoutes: - description: |- - UseRoutes when `true`, the routes from the DHCP server will be installed - in the routing table. - type: string - type: object - dhcp6: - description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - dhcp6Overrides: - description: |- - DHCP6Overrides allows for the control over several DHCP behaviors. - Overrides will only be applied when the corresponding DHCP flag is set. - Only configured values will be sent, omitted values will default to - distribution defaults. - Dependent on support in the network stack for your distribution. - For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) - properties: - hostname: - description: |- - Hostname is the name which will be sent to the DHCP server instead of - the machine's hostname. - type: string - routeMetric: - description: |- - RouteMetric is used to prioritize routes for devices. A lower metric for - an interface will have a higher priority. - type: integer - sendHostname: - description: |- - SendHostname when `true`, the hostname of the machine will be sent to the - DHCP server. - type: boolean - useDNS: - description: |- - UseDNS when `true`, the DNS servers in the DHCP server will be used and - take precedence. - type: boolean - useDomains: - description: |- - UseDomains can take the values `true`, `false`, or `route`. When `true`, - the domain name from the DHCP server will be used as the DNS search - domain for this device. When `route`, the domain name from the DHCP - response will be used for routing DNS only, not for searching. - type: string - useHostname: - description: |- - UseHostname when `true`, the hostname from the DHCP server will be set - as the transient hostname of the machine. - type: boolean - useMTU: - description: |- - UseMTU when `true`, the MTU from the DHCP server will be set as the - MTU of the device. - type: boolean - useNTP: - description: |- - UseNTP when `true`, the NTP servers from the DHCP server will be used - by systemd-timesyncd and take precedence. - type: boolean - useRoutes: - description: |- - UseRoutes when `true`, the routes from the DHCP server will be installed - in the routing table. - type: string - type: object - gateway4: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by this device. - type: string - ipAddrs: - description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4, DHCP6 and SkipIPAllocation are false. - items: - type: string - type: array - macAddr: - description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 - type: integer - nameservers: - description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. - items: - type: string - type: array - skipIPAllocation: - description: |- - SkipIPAllocation allows the device to not have IP address or DHCP configured. - This is suitable for devices for which IP allocation is handled externally, eg. using Multus CNI. - If true, CAPV will not verify IP address allocation. - type: boolean - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine - - - Deprecated: This field is going to be removed in a future release. - type: string - routes: - description: |- - Routes is a list of optional, static routes applied to the virtual - machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: |- - NumCPUs is the number of virtual processors in a virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - os: - description: |- - OS is the Operating System of the virtual machine - Defaults to Linux - type: string - pciDevices: - description: PciDevices is the list of pci devices used by the virtual - machine. - items: - description: PCIDeviceSpec defines virtual machine's PCI configuration. - properties: - customLabel: - description: |- - CustomLabel is the hardware label of a virtual machine's PCI device. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - type: string - deviceId: - description: |- - DeviceID is the device ID of a virtual machine's PCI, in integer. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - format: int32 - type: integer - vGPUProfile: - description: |- - VGPUProfile is the profile name of a virtual machine's vGPU, in string. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with DeviceID and VendorID as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - type: string - vendorId: - description: |- - VendorId is the vendor ID of a virtual machine's PCI, in integer. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - format: int32 - type: integer - type: object - type: array - powerOffMode: - default: hard - description: |- - PowerOffMode describes the desired behavior when powering off a VM. - - - There are three, supported power off modes: hard, soft, and - trySoft. The first mode, hard, is the equivalent of a physical - system's power cord being ripped from the wall. The soft mode - requires the VM's guest to have VM Tools installed and attempts to - gracefully shut down the VM. Its variant, trySoft, first attempts - a graceful shutdown, and if that fails or the VM is not in a powered off - state after reaching the GuestSoftPowerOffTimeout, the VM is halted. - - - If omitted, the mode defaults to hard. - enum: - - hard - - soft - - trySoft - type: string - providerID: - description: |- - ProviderID is the virtual machine's BIOS UUID formated as - vsphere://12345678-1234-1234-1234-123456789abc - type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - server: - description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - tagIDs: - description: |- - TagIDs is an optional set of tags to add to an instance. Specified tagIDs - must use URN-notation instead of display names. - items: - type: string - type: array - template: - description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 - type: string - thumbprint: - description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereMachineStatus defines the observed state of VSphereMachine. - properties: - addresses: - description: Addresses contains the VSphere instance associated addresses. - items: - description: MachineAddress contains information for the node's - address. - properties: - address: - description: The machine address. - type: string - type: - description: Machine address type, one of Hostname, ExternalIP, - InternalIP, ExternalDNS or InternalDNS. - type: string - required: - - address - - type - type: object - type: array - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - lastTransitionTime - - status - - type - type: object - type: array - failureMessage: - description: |- - FailureMessage will be set in the event that there is a terminal problem - reconciling the Machine and will contain a more verbose string suitable - for logging and human consumption. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - failureReason: - description: |- - FailureReason will be set in the event that there is a terminal problem - reconciling the Machine and will contain a succinct value suitable - for machine interpretation. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - network: - description: |- - Network returns the network status for each of the machine's configured - network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. - properties: - connected: - description: |- - Connected is a flag that indicates whether this network is currently - connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. - type: string - networkName: - description: NetworkName is the name of the network. - type: string - required: - - macAddr - type: object - type: array - ready: - description: Ready is true when the provider resource is ready. - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} + required: + - region + - topology + - zone + type: object + type: object + served: true + storage: true --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -4064,7 +2437,7 @@ metadata: labels: cluster.x-k8s.io/provider: infrastructure-vsphere cluster.x-k8s.io/v1beta1: v1beta1 - name: vspheremachinetemplates.infrastructure.cluster.x-k8s.io + name: vspheremachines.infrastructure.cluster.x-k8s.io spec: conversion: strategy: Webhook @@ -4075,683 +2448,650 @@ spec: namespace: capv-system path: /convert conversionReviewVersions: - - v1 - - v1beta1 + - v1 + - v1beta1 group: infrastructure.cluster.x-k8s.io names: categories: - - cluster-api - kind: VSphereMachineTemplate - listKind: VSphereMachineTemplateList - plural: vspheremachinetemplates - singular: vspheremachinetemplate + - cluster-api + kind: VSphereMachine + listKind: VSphereMachineList + plural: vspheremachines + singular: vspheremachine scope: Namespaced versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - VSphereMachineTemplate is the Schema for the vspheremachinetemplates API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate - properties: - template: - description: VSphereMachineTemplateResource describes the data needed - to create a VSphereMachine from a template - properties: - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - generateName: - description: |- - GenerateName is an optional prefix, used by the server, to generate a unique - name ONLY IF the Name field has not been provided. - If this field is used, the name returned to the client will be different - than the name passed. This value will also be combined with a unique suffix. - The provided value has the same validation rules as the Name field, - and may be truncated by the length of the suffix required to make the value - unique on the server. - - - If this field is specified and the generated name exists, the server will - NOT return a 409 - instead, it will either return 201 Created or 500 with Reason - ServerTimeout indicating a unique name could not be found in the time allotted, and the client - should retry (optionally after the time indicated in the Retry-After header). - - - Applied only if Name is not specified. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - labels: - additionalProperties: - type: string - description: |- - Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/identifiers#names - - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - namespace: - description: |- - Namespace defines the space within each name must be unique. An empty namespace is - equivalent to the "default" namespace, but "default" is the canonical representation. - Not all objects are required to be scoped to a namespace - the value of this field for - those objects will be empty. - - - Must be a DNS_LABEL. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces - - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - ownerReferences: + - additionalPrinterColumns: + - description: Cluster to which this VSphereMachine belongs + jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name + name: Cluster + type: string + - description: Machine ready status + jsonPath: .status.ready + name: Ready + type: string + - description: VSphereMachine instance ID + jsonPath: .spec.providerID + name: ProviderID + type: string + - description: Machine object which owns this VSphereMachine + jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name + name: Machine + priority: 1 + type: string + - description: Time duration since creation of Machine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + deprecated: true + name: v1alpha3 + schema: + openAPIV3Schema: + description: |- + VSphereMachine is the Schema for the vspheremachines API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereMachineSpec defines the desired state of VSphereMachine + properties: + cloneMode: + description: |- + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. + type: string + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + datacenter: + description: |- + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + diskGiB: + description: |- + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + failureDomain: + description: |- + FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. + For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. + type: string + folder: + description: |- + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. + type: string + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: |- + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: description: |- - List of objects depended by this object. If ALL objects in the list have - been deleted, this object will be garbage collected. If this object is managed by a controller, - then an entry in this list will point to this controller, with the controller field set to true. - There cannot be more than one managing controller. - - - Deprecated: This field has no function and is going to be removed in a next release. - items: - description: |- - OwnerReference contains enough information to let you identify an owning - object. An owning object must be in the same namespace as the dependent, or - be cluster-scoped, so there is no namespace field. - properties: - apiVersion: - description: API version of the referent. - type: string - blockOwnerDeletion: - description: |- - If true, AND if the owner has the "foregroundDeletion" finalizer, then - the owner cannot be deleted from the key-value store until this - reference is removed. - See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - for how the garbage collector interacts with this field and enforces the foreground deletion. - Defaults to false. - To set this field, a user needs "delete" permission of the owner, - otherwise 422 (Unprocessable Entity) will be returned. - type: boolean - controller: - description: If true, this reference points to the managing - controller. - type: boolean - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. + properties: + deviceName: + description: |- + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. + type: string + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + gateway4: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4 and DHCP6 are both false. + items: type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids + type: array + macAddr: + description: |- + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: type: string - required: - - apiVersion - - kind - - name - - uid - type: object - x-kubernetes-map-type: atomic - type: array - type: object - spec: - description: Spec is the specification of the desired behavior - of the machine. - properties: - cloneMode: - description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: |- - FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. - For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. - type: string - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - memoryMiB: - description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this - machine's VM. - properties: - devices: + type: array + networkName: description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. items: - description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. + description: NetworkRouteSpec defines a static network + route. properties: - deviceName: - description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. type: string - dhcp4: - description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - gateway4: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. - type: string - ipAddrs: - description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission - Unit size in bytes. - format: int64 - type: integer - nameservers: - description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. + via: + description: Via is an IPv4 or IPv6 address. type: string - routes: - description: Routes is a list of optional, static - routes applied to the device. - items: - description: NetworkRouteSpec defines a static - network route. - properties: - metric: - description: Metric is the weight/priority - of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. - items: - type: string - type: array required: - - networkName + - metric + - to + - via type: object type: array - preferredAPIServerCidr: - description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine - type: string - routes: + searchDomains: description: |- - Routes is a list of optional, static routes applied to the virtual - machine. + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object + type: string type: array required: - - devices + - networkName type: object - numCPUs: - description: |- - NumCPUs is the number of virtual processors in a virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - providerID: - description: |- - ProviderID is the virtual machine's BIOS UUID formated as - vsphere://12345678-1234-1234-1234-123456789abc + type: array + preferredAPIServerCidr: + description: |- + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + type: string + routes: + description: |- + Routes is a list of optional, static routes applied to the virtual + machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: |- + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: |- + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + providerID: + description: |- + ProviderID is the virtual machine's BIOS UUID formated as + vsphere://12345678-1234-1234-1234-123456789abc + type: string + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: + description: |- + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 + type: string + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. + type: string + required: + - network + - template + type: object + status: + description: VSphereMachineStatus defines the observed state of VSphereMachine + properties: + addresses: + description: Addresses contains the VSphere instance associated addresses. + items: + description: MachineAddress contains information for the node's + address. + properties: + address: + description: The machine address. type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. + type: + description: Machine address type, one of Hostname, ExternalIP + or InternalIP. type: string - server: + required: + - address + - type + type: object + type: array + conditions: + description: Conditions defines current service state of the VSphereMachine. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time type: string - snapshot: + message: description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. + A human readable message indicating details about the transition. + This field may be empty. type: string - storagePolicyName: + reason: description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. type: string - template: + severity: description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. type: string - thumbprint: + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. type: string required: - - network - - template - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: false - storage: false - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - VSphereMachineTemplate is the Schema for the vspheremachinetemplates API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate - properties: - template: - description: VSphereMachineTemplateResource describes the data needed - to create a VSphereMachine from a template - properties: - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object + - status + - type type: object - spec: - description: Spec is the specification of the desired behavior - of the machine. + type: array + failureMessage: + description: |- + FailureMessage will be set in the event that there is a terminal problem + reconciling the Machine and will contain a more verbose string suitable + for logging and human consumption. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the Machine's spec or the configuration of + the controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the controller, or the + responsible controller itself being critically misconfigured. + + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the Machine object and/or logged in the + controller's output. + type: string + failureReason: + description: |- + FailureReason will be set in the event that there is a terminal problem + reconciling the Machine and will contain a succinct value suitable + for machine interpretation. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the Machine's spec or the configuration of + the controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the controller, or the + responsible controller itself being critically misconfigured. + + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the Machine object and/or logged in the + controller's output. + type: string + network: + description: |- + Network returns the network status for each of the machine's configured + network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. properties: - cloneMode: + connected: description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: + Connected is a flag that indicates whether this network is currently + connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. + items: type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: |- - FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. - For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. + type: array + macAddr: + description: MACAddr is the MAC address of the network device. type: string - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. + networkName: + description: NetworkName is the name of the network. type: string - memoryMiB: + required: + - macAddr + type: object + type: array + ready: + description: Ready is true when the provider resource is ready. + type: boolean + type: object + type: object + served: false + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster to which this VSphereMachine belongs + jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name + name: Cluster + type: string + - description: Machine ready status + jsonPath: .status.ready + name: Ready + type: string + - description: VSphereMachine instance ID + jsonPath: .spec.providerID + name: ProviderID + type: string + - description: Machine object which owns this VSphereMachine + jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name + name: Machine + priority: 1 + type: string + - description: Time duration since creation of Machine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + deprecated: true + name: v1alpha4 + schema: + openAPIV3Schema: + description: |- + VSphereMachine is the Schema for the vspheremachines API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereMachineSpec defines the desired state of VSphereMachine + properties: + cloneMode: + description: |- + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. + type: string + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + datacenter: + description: |- + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + diskGiB: + description: |- + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + failureDomain: + description: |- + FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. + For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. + type: string + folder: + description: |- + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. + type: string + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: |- + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this - machine's VM. + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. properties: - devices: + deviceName: + description: |- + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. + type: string + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + gateway4: description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4 and DHCP6 are both false. items: - description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. - properties: - deviceName: - description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. - type: string - dhcp4: - description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - gateway4: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. - type: string - ipAddrs: - description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission - Unit size in bytes. - format: int64 - type: integer - nameservers: - description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. - type: string - routes: - description: Routes is a list of optional, static - routes applied to the device. - items: - description: NetworkRouteSpec defines a static - network route. - properties: - metric: - description: Metric is the weight/priority - of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object + type: string type: array - preferredAPIServerCidr: + macAddr: description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. type: string - routes: + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: description: |- - Routes is a list of optional, static routes applied to the virtual - machine. + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. items: description: NetworkRouteSpec defines a static network route. @@ -4768,492 +3108,624 @@ spec: description: Via is an IPv4 or IPv6 address. type: string required: - - metric - - to - - via + - metric + - to + - via type: object type: array + searchDomains: + description: |- + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. + items: + type: string + type: array required: - - devices + - networkName type: object - numCPUs: - description: |- - NumCPUs is the number of virtual processors in a virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - providerID: - description: |- - ProviderID is the virtual machine's BIOS UUID formated as - vsphere://12345678-1234-1234-1234-123456789abc + type: array + preferredAPIServerCidr: + description: |- + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + type: string + routes: + description: |- + Routes is a list of optional, static routes applied to the virtual + machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: |- + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: |- + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + providerID: + description: |- + ProviderID is the virtual machine's BIOS UUID formated as + vsphere://12345678-1234-1234-1234-123456789abc + type: string + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: + description: |- + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 + type: string + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. + type: string + required: + - network + - template + type: object + status: + description: VSphereMachineStatus defines the observed state of VSphereMachine + properties: + addresses: + description: Addresses contains the VSphere instance associated addresses. + items: + description: MachineAddress contains information for the node's + address. + properties: + address: + description: The machine address. type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. + type: + description: Machine address type, one of Hostname, ExternalIP + or InternalIP. type: string - server: + required: + - address + - type + type: object + type: array + conditions: + description: Conditions defines current service state of the VSphereMachine. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time type: string - snapshot: + message: description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. + A human readable message indicating details about the transition. + This field may be empty. type: string - storagePolicyName: + reason: description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. type: string - template: + severity: description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. type: string - thumbprint: + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. type: string required: - - network - - template - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: false - storage: false - - name: v1beta1 - schema: - openAPIV3Schema: - description: VSphereMachineTemplate is the Schema for the vspheremachinetemplates - API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate. - properties: - template: - description: VSphereMachineTemplateResource describes the data needed - to create a VSphereMachine from a template. - properties: - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object + - status + - type type: object - spec: - description: Spec is the specification of the desired behavior - of the machine. + type: array + failureMessage: + description: |- + FailureMessage will be set in the event that there is a terminal problem + reconciling the Machine and will contain a more verbose string suitable + for logging and human consumption. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the Machine's spec or the configuration of + the controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the controller, or the + responsible controller itself being critically misconfigured. + + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the Machine object and/or logged in the + controller's output. + type: string + failureReason: + description: |- + FailureReason will be set in the event that there is a terminal problem + reconciling the Machine and will contain a succinct value suitable + for machine interpretation. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the Machine's spec or the configuration of + the controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the controller, or the + responsible controller itself being critically misconfigured. + + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the Machine object and/or logged in the + controller's output. + type: string + network: + description: |- + Network returns the network status for each of the machine's configured + network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. properties: - additionalDisksGiB: + connected: description: |- - AdditionalDisksGiB holds the sizes of additional disks of the virtual machine, in GiB - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. + Connected is a flag that indicates whether this network is currently + connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. items: - format: int32 - type: integer - type: array - cloneMode: - description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - Defaults to * which selects the default datacenter. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: |- - FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. - For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. - type: string - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. + type: array + macAddr: + description: MACAddr is the MAC address of the network device. type: string - guestSoftPowerOffTimeout: - description: |- - GuestSoftPowerOffTimeout sets the wait timeout for shutdown in the VM guest. - The VM will be powered off forcibly after the timeout if the VM is still - up and running when the PowerOffMode is set to trySoft. - - - This parameter only applies when the PowerOffMode is set to trySoft. - - - If omitted, the timeout defaults to 5 minutes. + networkName: + description: NetworkName is the name of the network. type: string - hardwareVersion: + required: + - macAddr + type: object + type: array + ready: + description: Ready is true when the provider resource is ready. + type: boolean + type: object + type: object + served: false + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster to which this VSphereMachine belongs + jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name + name: Cluster + type: string + - description: Machine ready status + jsonPath: .status.ready + name: Ready + type: string + - description: VSphereMachine instance ID + jsonPath: .spec.providerID + name: ProviderID + type: string + - description: Machine object which owns with this VSphereMachine + jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name + name: Machine + priority: 1 + type: string + - description: Time duration since creation of Machine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: VSphereMachine is the Schema for the vspheremachines API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereMachineSpec defines the desired state of VSphereMachine. + properties: + additionalDisksGiB: + description: |- + AdditionalDisksGiB holds the sizes of additional disks of the virtual machine, in GiB + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + items: + format: int32 + type: integer + type: array + cloneMode: + description: |- + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. + type: string + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + dataDisks: + description: DataDisks holds information for additional disks to add + to the VM that are not part of the VM's OVA template. + items: + description: VSphereDisk describes additional disks for vSphere + to be added to VM that are not part of the VM OVA template. + properties: + deviceName: description: |- - HardwareVersion is the hardware version of the virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Check the compatibility with the ESXi version before setting the value. + DeviceName is a name to be used to identify the disk definition. If deviceName is not specified, + the disk will still be created. The deviceName should be unique so that it can be used to clearly + identify purpose of the disk, but is not required to be unique. type: string - memoryMiB: - description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. + sizeGiB: + description: SizeGiB is the size of the disk (in GiB). format: int64 type: integer - network: - description: Network is the network configuration for this - machine's VM. + required: + - sizeGiB + type: object + type: array + datacenter: + description: |- + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. + Defaults to * which selects the default datacenter. + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + diskGiB: + description: |- + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + failureDomain: + description: |- + FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. + For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. + type: string + folder: + description: |- + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. + type: string + guestSoftPowerOffTimeout: + description: |- + GuestSoftPowerOffTimeout sets the wait timeout for shutdown in the VM guest. + The VM will be powered off forcibly after the timeout if the VM is still + up and running when the PowerOffMode is set to trySoft. + + + This parameter only applies when the PowerOffMode is set to trySoft. + + + If omitted, the timeout defaults to 5 minutes. + type: string + hardwareVersion: + description: |- + HardwareVersion is the hardware version of the virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Check the compatibility with the ESXi version before setting the value. + type: string + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: |- + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: |- + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. properties: - devices: + addressesFromPools: description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name + AddressesFromPools is a list of IPAddressPools that should be assigned + to IPAddressClaims. The machine's cloud-init metadata will be populated + with IPAddresses fulfilled by an IPAM provider. items: description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. + TypedLocalObjectReference contains enough information to let you locate the + typed referenced object inside the same namespace. properties: - addressesFromPools: - description: |- - AddressesFromPools is a list of IPAddressPools that should be assigned - to IPAddressClaims. The machine's cloud-init metadata will be populated - with IPAddresses fulfilled by an IPAM provider. - items: - description: |- - TypedLocalObjectReference contains enough information to let you locate the - typed referenced object inside the same namespace. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - type: array - deviceName: - description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. - type: string - dhcp4: - description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp4Overrides: - description: |- - DHCP4Overrides allows for the control over several DHCP behaviors. - Overrides will only be applied when the corresponding DHCP flag is set. - Only configured values will be sent, omitted values will default to - distribution defaults. - Dependent on support in the network stack for your distribution. - For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) - properties: - hostname: - description: |- - Hostname is the name which will be sent to the DHCP server instead of - the machine's hostname. - type: string - routeMetric: - description: |- - RouteMetric is used to prioritize routes for devices. A lower metric for - an interface will have a higher priority. - type: integer - sendHostname: - description: |- - SendHostname when `true`, the hostname of the machine will be sent to the - DHCP server. - type: boolean - useDNS: - description: |- - UseDNS when `true`, the DNS servers in the DHCP server will be used and - take precedence. - type: boolean - useDomains: - description: |- - UseDomains can take the values `true`, `false`, or `route`. When `true`, - the domain name from the DHCP server will be used as the DNS search - domain for this device. When `route`, the domain name from the DHCP - response will be used for routing DNS only, not for searching. - type: string - useHostname: - description: |- - UseHostname when `true`, the hostname from the DHCP server will be set - as the transient hostname of the machine. - type: boolean - useMTU: - description: |- - UseMTU when `true`, the MTU from the DHCP server will be set as the - MTU of the device. - type: boolean - useNTP: - description: |- - UseNTP when `true`, the NTP servers from the DHCP server will be used - by systemd-timesyncd and take precedence. - type: boolean - useRoutes: - description: |- - UseRoutes when `true`, the routes from the DHCP server will be installed - in the routing table. - type: string - type: object - dhcp6: - description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - dhcp6Overrides: - description: |- - DHCP6Overrides allows for the control over several DHCP behaviors. - Overrides will only be applied when the corresponding DHCP flag is set. - Only configured values will be sent, omitted values will default to - distribution defaults. - Dependent on support in the network stack for your distribution. - For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) - properties: - hostname: - description: |- - Hostname is the name which will be sent to the DHCP server instead of - the machine's hostname. - type: string - routeMetric: - description: |- - RouteMetric is used to prioritize routes for devices. A lower metric for - an interface will have a higher priority. - type: integer - sendHostname: - description: |- - SendHostname when `true`, the hostname of the machine will be sent to the - DHCP server. - type: boolean - useDNS: - description: |- - UseDNS when `true`, the DNS servers in the DHCP server will be used and - take precedence. - type: boolean - useDomains: - description: |- - UseDomains can take the values `true`, `false`, or `route`. When `true`, - the domain name from the DHCP server will be used as the DNS search - domain for this device. When `route`, the domain name from the DHCP - response will be used for routing DNS only, not for searching. - type: string - useHostname: - description: |- - UseHostname when `true`, the hostname from the DHCP server will be set - as the transient hostname of the machine. - type: boolean - useMTU: - description: |- - UseMTU when `true`, the MTU from the DHCP server will be set as the - MTU of the device. - type: boolean - useNTP: - description: |- - UseNTP when `true`, the NTP servers from the DHCP server will be used - by systemd-timesyncd and take precedence. - type: boolean - useRoutes: - description: |- - UseRoutes when `true`, the routes from the DHCP server will be installed - in the routing table. - type: string - type: object - gateway4: + apiGroup: description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by - this device. + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. type: string - ipAddrs: - description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4, DHCP6 and SkipIPAllocation are false. - items: - type: string - type: array - macAddr: - description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. + kind: + description: Kind is the type of resource being referenced type: string - mtu: - description: MTU is the device’s Maximum Transmission - Unit size in bytes. - format: int64 - type: integer - nameservers: - description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. + name: + description: Name is the name of resource being referenced type: string - routes: - description: Routes is a list of optional, static - routes applied to the device. - items: - description: NetworkRouteSpec defines a static - network route. - properties: - metric: - description: Metric is the weight/priority - of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. - items: - type: string - type: array - skipIPAllocation: - description: |- - SkipIPAllocation allows the device to not have IP address or DHCP configured. - This is suitable for devices for which IP allocation is handled externally, eg. using Multus CNI. - If true, CAPV will not verify IP address allocation. - type: boolean required: - - networkName + - kind + - name type: object + x-kubernetes-map-type: atomic type: array - preferredAPIServerCidr: + deviceName: description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine - - - Deprecated: This field is going to be removed in a future release. + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. type: string - routes: + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp4Overrides: + description: |- + DHCP4Overrides allows for the control over several DHCP behaviors. + Overrides will only be applied when the corresponding DHCP flag is set. + Only configured values will be sent, omitted values will default to + distribution defaults. + Dependent on support in the network stack for your distribution. + For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) + properties: + hostname: + description: |- + Hostname is the name which will be sent to the DHCP server instead of + the machine's hostname. + type: string + routeMetric: + description: |- + RouteMetric is used to prioritize routes for devices. A lower metric for + an interface will have a higher priority. + type: integer + sendHostname: + description: |- + SendHostname when `true`, the hostname of the machine will be sent to the + DHCP server. + type: boolean + useDNS: + description: |- + UseDNS when `true`, the DNS servers in the DHCP server will be used and + take precedence. + type: boolean + useDomains: + description: |- + UseDomains can take the values `true`, `false`, or `route`. When `true`, + the domain name from the DHCP server will be used as the DNS search + domain for this device. When `route`, the domain name from the DHCP + response will be used for routing DNS only, not for searching. + type: string + useHostname: + description: |- + UseHostname when `true`, the hostname from the DHCP server will be set + as the transient hostname of the machine. + type: boolean + useMTU: + description: |- + UseMTU when `true`, the MTU from the DHCP server will be set as the + MTU of the device. + type: boolean + useNTP: + description: |- + UseNTP when `true`, the NTP servers from the DHCP server will be used + by systemd-timesyncd and take precedence. + type: boolean + useRoutes: + description: |- + UseRoutes when `true`, the routes from the DHCP server will be installed + in the routing table. + type: string + type: object + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + dhcp6Overrides: + description: |- + DHCP6Overrides allows for the control over several DHCP behaviors. + Overrides will only be applied when the corresponding DHCP flag is set. + Only configured values will be sent, omitted values will default to + distribution defaults. + Dependent on support in the network stack for your distribution. + For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) + properties: + hostname: + description: |- + Hostname is the name which will be sent to the DHCP server instead of + the machine's hostname. + type: string + routeMetric: + description: |- + RouteMetric is used to prioritize routes for devices. A lower metric for + an interface will have a higher priority. + type: integer + sendHostname: + description: |- + SendHostname when `true`, the hostname of the machine will be sent to the + DHCP server. + type: boolean + useDNS: + description: |- + UseDNS when `true`, the DNS servers in the DHCP server will be used and + take precedence. + type: boolean + useDomains: + description: |- + UseDomains can take the values `true`, `false`, or `route`. When `true`, + the domain name from the DHCP server will be used as the DNS search + domain for this device. When `route`, the domain name from the DHCP + response will be used for routing DNS only, not for searching. + type: string + useHostname: + description: |- + UseHostname when `true`, the hostname from the DHCP server will be set + as the transient hostname of the machine. + type: boolean + useMTU: + description: |- + UseMTU when `true`, the MTU from the DHCP server will be set as the + MTU of the device. + type: boolean + useNTP: + description: |- + UseNTP when `true`, the NTP servers from the DHCP server will be used + by systemd-timesyncd and take precedence. + type: boolean + useRoutes: + description: |- + UseRoutes when `true`, the routes from the DHCP server will be installed + in the routing table. + type: string + type: object + gateway4: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: Gateway4 is the IPv4 gateway used by this device. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4, DHCP6 and SkipIPAllocation are false. + items: + type: string + type: array + macAddr: + description: |- + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: description: |- - Routes is a list of optional, static routes applied to the virtual - machine. + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. items: description: NetworkRouteSpec defines a static network route. @@ -5270,155 +3742,339 @@ spec: description: Via is an IPv4 or IPv6 address. type: string required: - - metric - - to - - via + - metric + - to + - via type: object type: array + searchDomains: + description: |- + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. + items: + type: string + type: array + skipIPAllocation: + description: |- + SkipIPAllocation allows the device to not have IP address or DHCP configured. + This is suitable for devices for which IP allocation is handled externally, eg. using Multus CNI. + If true, CAPV will not verify IP address allocation. + type: boolean + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: |- + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + + + Deprecated: This field is going to be removed in a future release. + type: string + routes: + description: |- + Routes is a list of optional, static routes applied to the virtual + machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string required: - - devices + - metric + - to + - via type: object - numCPUs: + type: array + required: + - devices + type: object + numCPUs: + description: |- + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: |- + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + os: + description: |- + OS is the Operating System of the virtual machine + Defaults to Linux + type: string + pciDevices: + description: PciDevices is the list of pci devices used by the virtual + machine. + items: + description: PCIDeviceSpec defines virtual machine's PCI configuration. + properties: + customLabel: + description: |- + CustomLabel is the hardware label of a virtual machine's PCI device. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + type: string + deviceId: description: |- - NumCPUs is the number of virtual processors in a virtual machine. + DeviceID is the device ID of a virtual machine's PCI, in integer. Defaults to the eponymous property value in the template from which the virtual machine is cloned. + Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. format: int32 type: integer - numCoresPerSocket: + vGPUProfile: + description: |- + VGPUProfile is the profile name of a virtual machine's vGPU, in string. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Mutually exclusive with DeviceID and VendorID as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. + type: string + vendorId: description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. + VendorId is the vendor ID of a virtual machine's PCI, in integer. Defaults to the eponymous property value in the template from which the virtual machine is cloned. + Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. format: int32 type: integer - os: + type: object + type: array + powerOffMode: + default: hard + description: |- + PowerOffMode describes the desired behavior when powering off a VM. + + + There are three, supported power off modes: hard, soft, and + trySoft. The first mode, hard, is the equivalent of a physical + system's power cord being ripped from the wall. The soft mode + requires the VM's guest to have VM Tools installed and attempts to + gracefully shut down the VM. Its variant, trySoft, first attempts + a graceful shutdown, and if that fails or the VM is not in a powered off + state after reaching the GuestSoftPowerOffTimeout, the VM is halted. + + + If omitted, the mode defaults to hard. + enum: + - hard + - soft + - trySoft + type: string + providerID: + description: |- + ProviderID is the virtual machine's BIOS UUID formated as + vsphere://12345678-1234-1234-1234-123456789abc + type: string + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: + description: |- + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + tagIDs: + description: |- + TagIDs is an optional set of tags to add to an instance. Specified tagIDs + must use URN-notation instead of display names. + items: + type: string + type: array + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 + type: string + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. + type: string + required: + - network + - template + type: object + status: + description: VSphereMachineStatus defines the observed state of VSphereMachine. + properties: + addresses: + description: Addresses contains the VSphere instance associated addresses. + items: + description: MachineAddress contains information for the node's + address. + properties: + address: + description: The machine address. + type: string + type: + description: Machine address type, one of Hostname, ExternalIP, + InternalIP, ExternalDNS or InternalDNS. + type: string + required: + - address + - type + type: object + type: array + conditions: + description: Conditions defines current service state of the VSphereMachine. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: description: |- - OS is the Operating System of the virtual machine - Defaults to Linux + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time type: string - pciDevices: - description: PciDevices is the list of pci devices used by - the virtual machine. - items: - description: PCIDeviceSpec defines virtual machine's PCI - configuration. - properties: - customLabel: - description: |- - CustomLabel is the hardware label of a virtual machine's PCI device. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - type: string - deviceId: - description: |- - DeviceID is the device ID of a virtual machine's PCI, in integer. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - format: int32 - type: integer - vGPUProfile: - description: |- - VGPUProfile is the profile name of a virtual machine's vGPU, in string. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with DeviceID and VendorID as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - type: string - vendorId: - description: |- - VendorId is the vendor ID of a virtual machine's PCI, in integer. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - format: int32 - type: integer - type: object - type: array - powerOffMode: - default: hard - description: |- - PowerOffMode describes the desired behavior when powering off a VM. - - - There are three, supported power off modes: hard, soft, and - trySoft. The first mode, hard, is the equivalent of a physical - system's power cord being ripped from the wall. The soft mode - requires the VM's guest to have VM Tools installed and attempts to - gracefully shut down the VM. Its variant, trySoft, first attempts - a graceful shutdown, and if that fails or the VM is not in a powered off - state after reaching the GuestSoftPowerOffTimeout, the VM is halted. - - - If omitted, the mode defaults to hard. - enum: - - hard - - soft - - trySoft - type: string - providerID: + message: description: |- - ProviderID is the virtual machine's BIOS UUID formated as - vsphere://12345678-1234-1234-1234-123456789abc + A human readable message indicating details about the transition. + This field may be empty. type: string - resourcePool: + reason: description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. type: string - server: + severity: description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. + status: + description: Status of the condition, one of True, False, Unknown. type: string - storagePolicyName: + type: description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. type: string - tagIDs: + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureMessage: + description: |- + FailureMessage will be set in the event that there is a terminal problem + reconciling the Machine and will contain a more verbose string suitable + for logging and human consumption. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the Machine's spec or the configuration of + the controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the controller, or the + responsible controller itself being critically misconfigured. + + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the Machine object and/or logged in the + controller's output. + type: string + failureReason: + description: |- + FailureReason will be set in the event that there is a terminal problem + reconciling the Machine and will contain a succinct value suitable + for machine interpretation. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the Machine's spec or the configuration of + the controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the controller, or the + responsible controller itself being critically misconfigured. + + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the Machine object and/or logged in the + controller's output. + type: string + network: + description: |- + Network returns the network status for each of the machine's configured + network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. + properties: + connected: description: |- - TagIDs is an optional set of tags to add to an instance. Specified tagIDs - must use URN-notation instead of display names. + Connected is a flag that indicates whether this network is currently + connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. items: type: string type: array - template: - description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 + macAddr: + description: MACAddr is the MAC address of the network device. type: string - thumbprint: - description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. + networkName: + description: NetworkName is the name of the network. type: string required: - - network - - template + - macAddr type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: true - storage: true + type: array + ready: + description: Ready is true when the provider resource is ready. + type: boolean + type: object + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -5429,7 +4085,7 @@ metadata: labels: cluster.x-k8s.io/provider: infrastructure-vsphere cluster.x-k8s.io/v1beta1: v1beta1 - name: vspherevms.infrastructure.cluster.x-k8s.io + name: vspheremachinetemplates.infrastructure.cluster.x-k8s.io spec: conversion: strategy: Webhook @@ -5440,1720 +4096,3128 @@ spec: namespace: capv-system path: /convert conversionReviewVersions: - - v1 - - v1beta1 + - v1 + - v1beta1 group: infrastructure.cluster.x-k8s.io names: categories: - - cluster-api - kind: VSphereVM - listKind: VSphereVMList - plural: vspherevms - singular: vspherevm + - cluster-api + kind: VSphereMachineTemplate + listKind: VSphereMachineTemplateList + plural: vspheremachinetemplates + singular: vspheremachinetemplate scope: Namespaced versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - VSphereVM is the Schema for the vspherevms API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereVMSpec defines the desired state of VSphereVM. - properties: - biosUUID: - description: |- - BiosUUID is the VM's BIOS UUID that is assigned at runtime after - the VM has been created. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - type: string - bootstrapRef: - description: |- - BootstrapRef is a reference to a bootstrap provider-specific resource - that holds configuration details. - This field is optional in case no bootstrap data is required to create - a VM. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - cloneMode: - description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - memoryMiB: - description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name - items: + - deprecated: true + name: v1alpha3 + schema: + openAPIV3Schema: + description: |- + VSphereMachineTemplate is the Schema for the vspheremachinetemplates API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate + properties: + template: + description: VSphereMachineTemplateResource describes the data needed + to create a VSphereMachine from a template + properties: + metadata: description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. + Standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata properties: - deviceName: + annotations: + additionalProperties: + type: string description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. - type: string - dhcp4: + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + generateName: description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp6: + GenerateName is an optional prefix, used by the server, to generate a unique + name ONLY IF the Name field has not been provided. + If this field is used, the name returned to the client will be different + than the name passed. This value will also be combined with a unique suffix. + The provided value has the same validation rules as the Name field, + and may be truncated by the length of the suffix required to make the value + unique on the server. + + + If this field is specified and the generated name exists, the server will + NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + ServerTimeout indicating a unique name could not be found in the time allotted, and the client + should retry (optionally after the time indicated in the Retry-After header). + + + Applied only if Name is not specified. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency + + + Deprecated: This field has no function and is going to be removed in a next release. + type: string + labels: + additionalProperties: + type: string description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - gateway4: + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + name: description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. + Name must be unique within a namespace. Is required when creating resources, although + some resources may allow a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence and configuration + definition. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/identifiers#names + + + Deprecated: This field has no function and is going to be removed in a next release. type: string - gateway6: + namespace: description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. + Namespace defines the space within each name must be unique. An empty namespace is + equivalent to the "default" namespace, but "default" is the canonical representation. + Not all objects are required to be scoped to a namespace - the value of this field for + those objects will be empty. + + + Must be a DNS_LABEL. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces + + + Deprecated: This field has no function and is going to be removed in a next release. type: string - ipAddrs: + ownerReferences: description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4 and DHCP6 are both false. + List of objects depended by this object. If ALL objects in the list have + been deleted, this object will be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, with the controller field set to true. + There cannot be more than one managing controller. + + + Deprecated: This field has no function and is going to be removed in a next release. items: - type: string + description: |- + OwnerReference contains enough information to let you identify an owning + object. An owning object must be in the same namespace as the dependent, or + be cluster-scoped, so there is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: |- + If true, AND if the owner has the "foregroundDeletion" finalizer, then + the owner cannot be deleted from the key-value store until this + reference is removed. + See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion + for how the garbage collector interacts with this field and enforces the foreground deletion. + Defaults to false. + To set this field, a user needs "delete" permission of the owner, + otherwise 422 (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing + controller. + type: boolean + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + x-kubernetes-map-type: atomic type: array - macAddr: + type: object + spec: + description: Spec is the specification of the desired behavior + of the machine. + properties: + cloneMode: description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + datacenter: + description: |- + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + diskGiB: + description: |- + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 type: integer - nameservers: + failureDomain: description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: + FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. + For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. + type: string + folder: description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this + machine's VM. + properties: + devices: + description: |- + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: |- + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. + properties: + deviceName: + description: |- + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. + type: string + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + gateway4: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: |- + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission + Unit size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: |- + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static + routes applied to the device. + items: + description: NetworkRouteSpec defines a static + network route. + properties: + metric: + description: Metric is the weight/priority + of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: |- + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: |- + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + type: string + routes: + description: |- + Routes is a list of optional, static routes applied to the virtual + machine. + items: + description: NetworkRouteSpec defines a static network route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine - type: string - routes: - description: |- - Routes is a list of optional, static routes applied to the virtual - machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. format: int32 type: integer - to: - description: To is an IPv4 or IPv6 address. + numCoresPerSocket: + description: |- + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + providerID: + description: |- + ProviderID is the virtual machine's BIOS UUID formated as + vsphere://12345678-1234-1234-1234-123456789abc type: string - via: - description: Via is an IPv4 or IPv6 address. + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: + description: |- + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 + type: string + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. type: string required: - - metric - - to - - via + - network + - template type: object - type: array - required: - - devices - type: object - numCPUs: - description: |- - NumCPUs is the number of virtual processors in a virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - server: - description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - template: - description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 - type: string - thumbprint: - description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereVMStatus defines the observed state of VSphereVM - properties: - addresses: - description: |- - Addresses is a list of the VM's IP addresses. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - items: - type: string - type: array - cloneMode: - description: |- - CloneMode is the type of clone operation used to clone this VM. Since - LinkedMode is the default but fails gracefully if the source of the - clone has no snapshots, this field may be used to determine the actual - type of clone operation used to create this VM. - type: string - conditions: - description: Conditions defines current service state of the VSphereVM. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string required: - - status - - type + - spec type: object - type: array - failureMessage: - description: |- - FailureMessage will be set in the event that there is a terminal problem - reconciling the vspherevm and will contain a more verbose string suitable - for logging and human consumption. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the vm. - - - Any transient errors that occur during the reconciliation of vspherevms - can be added as events to the vspherevm object and/or logged in the - controller's output. - type: string - failureReason: - description: |- - FailureReason will be set in the event that there is a terminal problem - reconciling the vspherevm and will contain a succinct value suitable - for vm interpretation. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the vm. - - - Any transient errors that occur during the reconciliation of vspherevms - can be added as events to the vspherevm object and/or logged in the - controller's output. - type: string - network: - description: |- - Network returns the network status for each of the machine's configured - network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. + required: + - template + type: object + type: object + served: false + storage: false + - deprecated: true + name: v1alpha4 + schema: + openAPIV3Schema: + description: |- + VSphereMachineTemplate is the Schema for the vspheremachinetemplates API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate + properties: + template: + description: VSphereMachineTemplateResource describes the data needed + to create a VSphereMachine from a template properties: - connected: - description: |- - Connected is a flag that indicates whether this network is currently - connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. - type: string - networkName: - description: NetworkName is the name of the network. - type: string - required: - - macAddr - type: object - type: array - ready: - description: |- - Ready is true when the provider resource is ready. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - type: boolean - retryAfter: - description: RetryAfter tracks the time we can retry queueing a task - format: date-time - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which the VM was cloned if - LinkedMode is enabled. - type: string - taskRef: - description: |- - TaskRef is a managed object reference to a Task related to the machine. - This value is set automatically at runtime and should not be set or - modified by users. - type: string - type: object - type: object - served: false - storage: false - subresources: - status: {} - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - VSphereVM is the Schema for the vspherevms API - - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereVMSpec defines the desired state of VSphereVM. - properties: - biosUUID: - description: |- - BiosUUID is the VM's BIOS UUID that is assigned at runtime after - the VM has been created. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - type: string - bootstrapRef: - description: |- - BootstrapRef is a reference to a bootstrap provider-specific resource - that holds configuration details. - This field is optional in case no bootstrap data is required to create - a VM. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - cloneMode: - description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - memoryMiB: - description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name - items: + metadata: description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. + Standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata properties: - deviceName: + annotations: + additionalProperties: + type: string description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. - type: string - dhcp4: + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp6: + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + spec: + description: Spec is the specification of the desired behavior + of the machine. + properties: + cloneMode: description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - gateway4: + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. + type: string + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + datacenter: description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. type: string - gateway6: + datastore: description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. type: string - ipAddrs: + diskGiB: description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + failureDomain: description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. + FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. + For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. + folder: + description: |- + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. + type: string + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. format: int64 type: integer - nameservers: + network: + description: Network is the network configuration for this + machine's VM. + properties: + devices: + description: |- + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: |- + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. + properties: + deviceName: + description: |- + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. + type: string + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + gateway4: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: |- + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission + Unit size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: |- + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static + routes applied to the device. + items: + description: NetworkRouteSpec defines a static + network route. + properties: + metric: + description: Metric is the weight/priority + of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: |- + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: |- + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + type: string + routes: + description: |- + Routes is a list of optional, static routes applied to the virtual + machine. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: |- + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + providerID: description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. + ProviderID is the virtual machine's BIOS UUID formated as + vsphere://12345678-1234-1234-1234-123456789abc type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: + description: |- + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 + type: string + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. + type: string + required: + - network + - template + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: false + storage: false + - name: v1beta1 + schema: + openAPIV3Schema: + description: VSphereMachineTemplate is the Schema for the vspheremachinetemplates + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate. + properties: + template: + description: VSphereMachineTemplateResource describes the data needed + to create a VSphereMachine from a template. + properties: + metadata: + description: |- + Standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + spec: + description: Spec is the specification of the desired behavior + of the machine. + properties: + additionalDisksGiB: + description: |- + AdditionalDisksGiB holds the sizes of additional disks of the virtual machine, in GiB + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. items: - description: NetworkRouteSpec defines a static network - route. + format: int32 + type: integer + type: array + cloneMode: + description: |- + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. + type: string + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + dataDisks: + description: DataDisks holds information for additional disks + to add to the VM that are not part of the VM's OVA template. + items: + description: VSphereDisk describes additional disks for + vSphere to be added to VM that are not part of the VM + OVA template. properties: - metric: - description: Metric is the weight/priority of the + deviceName: + description: |- + DeviceName is a name to be used to identify the disk definition. If deviceName is not specified, + the disk will still be created. The deviceName should be unique so that it can be used to clearly + identify purpose of the disk, but is not required to be unique. + type: string + sizeGiB: + description: SizeGiB is the size of the disk (in GiB). + format: int64 + type: integer + required: + - sizeGiB + type: object + type: array + datacenter: + description: |- + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. + Defaults to * which selects the default datacenter. + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + diskGiB: + description: |- + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + failureDomain: + description: |- + FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. + For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. + type: string + folder: + description: |- + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. + type: string + guestSoftPowerOffTimeout: + description: |- + GuestSoftPowerOffTimeout sets the wait timeout for shutdown in the VM guest. + The VM will be powered off forcibly after the timeout if the VM is still + up and running when the PowerOffMode is set to trySoft. + + + This parameter only applies when the PowerOffMode is set to trySoft. + + + If omitted, the timeout defaults to 5 minutes. + type: string + hardwareVersion: + description: |- + HardwareVersion is the hardware version of the virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Check the compatibility with the ESXi version before setting the value. + type: string + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this + machine's VM. + properties: + devices: + description: |- + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: |- + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. + properties: + addressesFromPools: + description: |- + AddressesFromPools is a list of IPAddressPools that should be assigned + to IPAddressClaims. The machine's cloud-init metadata will be populated + with IPAddresses fulfilled by an IPAM provider. + items: + description: |- + TypedLocalObjectReference contains enough information to let you locate the + typed referenced object inside the same namespace. + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + deviceName: + description: |- + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. + type: string + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp4Overrides: + description: |- + DHCP4Overrides allows for the control over several DHCP behaviors. + Overrides will only be applied when the corresponding DHCP flag is set. + Only configured values will be sent, omitted values will default to + distribution defaults. + Dependent on support in the network stack for your distribution. + For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) + properties: + hostname: + description: |- + Hostname is the name which will be sent to the DHCP server instead of + the machine's hostname. + type: string + routeMetric: + description: |- + RouteMetric is used to prioritize routes for devices. A lower metric for + an interface will have a higher priority. + type: integer + sendHostname: + description: |- + SendHostname when `true`, the hostname of the machine will be sent to the + DHCP server. + type: boolean + useDNS: + description: |- + UseDNS when `true`, the DNS servers in the DHCP server will be used and + take precedence. + type: boolean + useDomains: + description: |- + UseDomains can take the values `true`, `false`, or `route`. When `true`, + the domain name from the DHCP server will be used as the DNS search + domain for this device. When `route`, the domain name from the DHCP + response will be used for routing DNS only, not for searching. + type: string + useHostname: + description: |- + UseHostname when `true`, the hostname from the DHCP server will be set + as the transient hostname of the machine. + type: boolean + useMTU: + description: |- + UseMTU when `true`, the MTU from the DHCP server will be set as the + MTU of the device. + type: boolean + useNTP: + description: |- + UseNTP when `true`, the NTP servers from the DHCP server will be used + by systemd-timesyncd and take precedence. + type: boolean + useRoutes: + description: |- + UseRoutes when `true`, the routes from the DHCP server will be installed + in the routing table. + type: string + type: object + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + dhcp6Overrides: + description: |- + DHCP6Overrides allows for the control over several DHCP behaviors. + Overrides will only be applied when the corresponding DHCP flag is set. + Only configured values will be sent, omitted values will default to + distribution defaults. + Dependent on support in the network stack for your distribution. + For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) + properties: + hostname: + description: |- + Hostname is the name which will be sent to the DHCP server instead of + the machine's hostname. + type: string + routeMetric: + description: |- + RouteMetric is used to prioritize routes for devices. A lower metric for + an interface will have a higher priority. + type: integer + sendHostname: + description: |- + SendHostname when `true`, the hostname of the machine will be sent to the + DHCP server. + type: boolean + useDNS: + description: |- + UseDNS when `true`, the DNS servers in the DHCP server will be used and + take precedence. + type: boolean + useDomains: + description: |- + UseDomains can take the values `true`, `false`, or `route`. When `true`, + the domain name from the DHCP server will be used as the DNS search + domain for this device. When `route`, the domain name from the DHCP + response will be used for routing DNS only, not for searching. + type: string + useHostname: + description: |- + UseHostname when `true`, the hostname from the DHCP server will be set + as the transient hostname of the machine. + type: boolean + useMTU: + description: |- + UseMTU when `true`, the MTU from the DHCP server will be set as the + MTU of the device. + type: boolean + useNTP: + description: |- + UseNTP when `true`, the NTP servers from the DHCP server will be used + by systemd-timesyncd and take precedence. + type: boolean + useRoutes: + description: |- + UseRoutes when `true`, the routes from the DHCP server will be installed + in the routing table. + type: string + type: object + gateway4: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: Gateway4 is the IPv4 gateway used by + this device. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4, DHCP6 and SkipIPAllocation are false. + items: + type: string + type: array + macAddr: + description: |- + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission + Unit size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: |- + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static + routes applied to the device. + items: + description: NetworkRouteSpec defines a static + network route. + properties: + metric: + description: Metric is the weight/priority + of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: |- + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. + items: + type: string + type: array + skipIPAllocation: + description: |- + SkipIPAllocation allows the device to not have IP address or DHCP configured. + This is suitable for devices for which IP allocation is handled externally, eg. using Multus CNI. + If true, CAPV will not verify IP address allocation. + type: boolean + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: |- + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + + + Deprecated: This field is going to be removed in a future release. + type: string + routes: + description: |- + Routes is a list of optional, static routes applied to the virtual + machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: |- + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: |- + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + os: + description: |- + OS is the Operating System of the virtual machine + Defaults to Linux + type: string + pciDevices: + description: PciDevices is the list of pci devices used by + the virtual machine. + items: + description: PCIDeviceSpec defines virtual machine's PCI + configuration. + properties: + customLabel: + description: |- + CustomLabel is the hardware label of a virtual machine's PCI device. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + type: string + deviceId: + description: |- + DeviceID is the device ID of a virtual machine's PCI, in integer. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. format: int32 type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. + vGPUProfile: + description: |- + VGPUProfile is the profile name of a virtual machine's vGPU, in string. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Mutually exclusive with DeviceID and VendorID as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. type: string - required: - - metric - - to - - via + vendorId: + description: |- + VendorId is the vendor ID of a virtual machine's PCI, in integer. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. + format: int32 + type: integer type: object type: array - searchDomains: + powerOffMode: + default: hard + description: |- + PowerOffMode describes the desired behavior when powering off a VM. + + + There are three, supported power off modes: hard, soft, and + trySoft. The first mode, hard, is the equivalent of a physical + system's power cord being ripped from the wall. The soft mode + requires the VM's guest to have VM Tools installed and attempts to + gracefully shut down the VM. Its variant, trySoft, first attempts + a graceful shutdown, and if that fails or the VM is not in a powered off + state after reaching the GuestSoftPowerOffTimeout, the VM is halted. + + + If omitted, the mode defaults to hard. + enum: + - hard + - soft + - trySoft + type: string + providerID: + description: |- + ProviderID is the virtual machine's BIOS UUID formated as + vsphere://12345678-1234-1234-1234-123456789abc + type: string + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + tagIDs: + description: |- + TagIDs is an optional set of tags to add to an instance. Specified tagIDs + must use URN-notation instead of display names. items: type: string type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine - type: string - routes: - description: |- - Routes is a list of optional, static routes applied to the virtual - machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 type: string - via: - description: Via is an IPv4 or IPv6 address. + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. type: string required: - - metric - - to - - via + - network + - template type: object - type: array - required: - - devices - type: object - numCPUs: - description: |- - NumCPUs is the number of virtual processors in a virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - server: - description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - template: - description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 - type: string - thumbprint: - description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereVMStatus defines the observed state of VSphereVM - properties: - addresses: - description: |- - Addresses is a list of the VM's IP addresses. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - items: + required: + - spec + type: object + required: + - template + type: object + type: object + served: true + storage: true +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: capv-system/capv-serving-cert + controller-gen.kubebuilder.io/version: v0.15.0 + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + cluster.x-k8s.io/v1beta1: v1beta1 + name: vspherevms.infrastructure.cluster.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /convert + conversionReviewVersions: + - v1 + - v1beta1 + group: infrastructure.cluster.x-k8s.io + names: + categories: + - cluster-api + kind: VSphereVM + listKind: VSphereVMList + plural: vspherevms + singular: vspherevm + scope: Namespaced + versions: + - deprecated: true + name: v1alpha3 + schema: + openAPIV3Schema: + description: |- + VSphereVM is the Schema for the vspherevms API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereVMSpec defines the desired state of VSphereVM. + properties: + biosUUID: + description: |- + BiosUUID is the VM's BIOS UUID that is assigned at runtime after + the VM has been created. + This field is required at runtime for other controllers that read + this CRD as unstructured data. + type: string + bootstrapRef: + description: |- + BootstrapRef is a reference to a bootstrap provider-specific resource + that holds configuration details. + This field is optional in case no bootstrap data is required to create + a VM. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + TODO: this design is not final and this field is subject to change in the future. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + cloneMode: + description: |- + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. + type: string + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + datacenter: + description: |- + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + diskGiB: + description: |- + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + folder: + description: |- + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. + type: string + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: |- + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: |- + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. + properties: + deviceName: + description: |- + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. + type: string + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + gateway4: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: |- + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: |- + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: |- + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: |- + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + type: string + routes: + description: |- + Routes is a list of optional, static routes applied to the virtual + machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: |- + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: |- + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: + description: |- + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 + type: string + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. + type: string + required: + - network + - template + type: object + status: + description: VSphereVMStatus defines the observed state of VSphereVM + properties: + addresses: + description: |- + Addresses is a list of the VM's IP addresses. + This field is required at runtime for other controllers that read + this CRD as unstructured data. + items: + type: string + type: array + cloneMode: + description: |- + CloneMode is the type of clone operation used to clone this VM. Since + LinkedMode is the default but fails gracefully if the source of the + clone has no snapshots, this field may be used to determine the actual + type of clone operation used to create this VM. + type: string + conditions: + description: Conditions defines current service state of the VSphereVM. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - status + - type + type: object + type: array + failureMessage: + description: |- + FailureMessage will be set in the event that there is a terminal problem + reconciling the vspherevm and will contain a more verbose string suitable + for logging and human consumption. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the vm. + + + Any transient errors that occur during the reconciliation of vspherevms + can be added as events to the vspherevm object and/or logged in the + controller's output. + type: string + failureReason: + description: |- + FailureReason will be set in the event that there is a terminal problem + reconciling the vspherevm and will contain a succinct value suitable + for vm interpretation. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the vm. + + + Any transient errors that occur during the reconciliation of vspherevms + can be added as events to the vspherevm object and/or logged in the + controller's output. + type: string + network: + description: |- + Network returns the network status for each of the machine's configured + network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. + properties: + connected: + description: |- + Connected is a flag that indicates whether this network is currently + connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address of the network device. + type: string + networkName: + description: NetworkName is the name of the network. + type: string + required: + - macAddr + type: object + type: array + ready: + description: |- + Ready is true when the provider resource is ready. + This field is required at runtime for other controllers that read + this CRD as unstructured data. + type: boolean + retryAfter: + description: RetryAfter tracks the time we can retry queueing a task + format: date-time + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which the VM was cloned if + LinkedMode is enabled. + type: string + taskRef: + description: |- + TaskRef is a managed object reference to a Task related to the machine. + This value is set automatically at runtime and should not be set or + modified by users. + type: string + type: object + type: object + served: false + storage: false + subresources: + status: {} + - deprecated: true + name: v1alpha4 + schema: + openAPIV3Schema: + description: |- + VSphereVM is the Schema for the vspherevms API + + + Deprecated: This type will be removed in one of the next releases. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereVMSpec defines the desired state of VSphereVM. + properties: + biosUUID: + description: |- + BiosUUID is the VM's BIOS UUID that is assigned at runtime after + the VM has been created. + This field is required at runtime for other controllers that read + this CRD as unstructured data. + type: string + bootstrapRef: + description: |- + BootstrapRef is a reference to a bootstrap provider-specific resource + that holds configuration details. + This field is optional in case no bootstrap data is required to create + a VM. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + TODO: this design is not final and this field is subject to change in the future. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + cloneMode: + description: |- + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. + type: string + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + datacenter: + description: |- + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + diskGiB: + description: |- + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + folder: + description: |- + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. + type: string + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: |- + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: |- + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. + properties: + deviceName: + description: |- + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. + type: string + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + gateway4: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: |- + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: |- + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: |- + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: |- + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + type: string + routes: + description: |- + Routes is a list of optional, static routes applied to the virtual + machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: |- + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: |- + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: + description: |- + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 + type: string + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. + type: string + required: + - network + - template + type: object + status: + description: VSphereVMStatus defines the observed state of VSphereVM + properties: + addresses: + description: |- + Addresses is a list of the VM's IP addresses. + This field is required at runtime for other controllers that read + this CRD as unstructured data. + items: + type: string + type: array + cloneMode: + description: |- + CloneMode is the type of clone operation used to clone this VM. Since + LinkedMode is the default but fails gracefully if the source of the + clone has no snapshots, this field may be used to determine the actual + type of clone operation used to create this VM. + type: string + conditions: + description: Conditions defines current service state of the VSphereVM. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - status + - type + type: object + type: array + failureMessage: + description: |- + FailureMessage will be set in the event that there is a terminal problem + reconciling the vspherevm and will contain a more verbose string suitable + for logging and human consumption. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the vm. + + + Any transient errors that occur during the reconciliation of vspherevms + can be added as events to the vspherevm object and/or logged in the + controller's output. + type: string + failureReason: + description: |- + FailureReason will be set in the event that there is a terminal problem + reconciling the vspherevm and will contain a succinct value suitable + for vm interpretation. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the vm. + + + Any transient errors that occur during the reconciliation of vspherevms + can be added as events to the vspherevm object and/or logged in the + controller's output. + type: string + network: + description: |- + Network returns the network status for each of the machine's configured + network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. + properties: + connected: + description: |- + Connected is a flag that indicates whether this network is currently + connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address of the network device. + type: string + networkName: + description: NetworkName is the name of the network. + type: string + required: + - macAddr + type: object + type: array + ready: + description: |- + Ready is true when the provider resource is ready. + This field is required at runtime for other controllers that read + this CRD as unstructured data. + type: boolean + retryAfter: + description: RetryAfter tracks the time we can retry queueing a task + format: date-time + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which the VM was cloned if + LinkedMode is enabled. + type: string + taskRef: + description: |- + TaskRef is a managed object reference to a Task related to the machine. + This value is set automatically at runtime and should not be set or + modified by users. + type: string + type: object + type: object + served: false + storage: false + subresources: + status: {} + - name: v1beta1 + schema: + openAPIV3Schema: + description: VSphereVM is the Schema for the vspherevms API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + 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 + metadata: + type: object + spec: + description: VSphereVMSpec defines the desired state of VSphereVM. + properties: + additionalDisksGiB: + description: |- + AdditionalDisksGiB holds the sizes of additional disks of the virtual machine, in GiB + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + items: + format: int32 + type: integer + type: array + biosUUID: + description: |- + BiosUUID is the VM's BIOS UUID that is assigned at runtime after + the VM has been created. + This field is required at runtime for other controllers that read + this CRD as unstructured data. type: string - type: array - cloneMode: - description: |- - CloneMode is the type of clone operation used to clone this VM. Since - LinkedMode is the default but fails gracefully if the source of the - clone has no snapshots, this field may be used to determine the actual - type of clone operation used to create this VM. - type: string - conditions: - description: Conditions defines current service state of the VSphereVM. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + bootstrapRef: + description: |- + BootstrapRef is a reference to a bootstrap provider-specific resource + that holds configuration details. + This field is optional in case no bootstrap data is required to create + a VM. properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time + apiVersion: + description: API version of the referent. type: string - message: + fieldPath: description: |- - A human readable message indicating details about the transition. - This field may be empty. + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + TODO: this design is not final and this field is subject to change in the future. type: string - reason: + kind: description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string - severity: + name: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: + namespace: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: |- - FailureMessage will be set in the event that there is a terminal problem - reconciling the vspherevm and will contain a more verbose string suitable - for logging and human consumption. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the vm. - - - Any transient errors that occur during the reconciliation of vspherevms - can be added as events to the vspherevm object and/or logged in the - controller's output. - type: string - failureReason: - description: |- - FailureReason will be set in the event that there is a terminal problem - reconciling the vspherevm and will contain a succinct value suitable - for vm interpretation. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the vm. - - - Any transient errors that occur during the reconciliation of vspherevms - can be added as events to the vspherevm object and/or logged in the - controller's output. - type: string - network: - description: |- - Network returns the network status for each of the machine's configured - network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. - properties: - connected: + resourceVersion: description: |- - Connected is a flag that indicates whether this network is currently - connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency type: string - networkName: - description: NetworkName is the name of the network. + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - macAddr type: object - type: array - ready: - description: |- - Ready is true when the provider resource is ready. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - type: boolean - retryAfter: - description: RetryAfter tracks the time we can retry queueing a task - format: date-time - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which the VM was cloned if - LinkedMode is enabled. - type: string - taskRef: - description: |- - TaskRef is a managed object reference to a Task related to the machine. - This value is set automatically at runtime and should not be set or - modified by users. - type: string - type: object - type: object - served: false - storage: false - subresources: - status: {} - - name: v1beta1 - schema: - openAPIV3Schema: - description: VSphereVM is the Schema for the vspherevms API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - 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 - metadata: - type: object - spec: - description: VSphereVMSpec defines the desired state of VSphereVM. - properties: - additionalDisksGiB: - description: |- - AdditionalDisksGiB holds the sizes of additional disks of the virtual machine, in GiB - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - items: + x-kubernetes-map-type: atomic + cloneMode: + description: |- + 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 LinkedClone, but fails gracefully to FullClone if the source + of the clone operation has no snapshots. + type: string + customVMXKeys: + additionalProperties: + type: string + description: |- + CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM + Defaults to empty map + type: object + dataDisks: + description: DataDisks holds information for additional disks to add + to the VM that are not part of the VM's OVA template. + items: + description: VSphereDisk describes additional disks for vSphere + to be added to VM that are not part of the VM OVA template. + properties: + deviceName: + description: |- + DeviceName is a name to be used to identify the disk definition. If deviceName is not specified, + the disk will still be created. The deviceName should be unique so that it can be used to clearly + identify purpose of the disk, but is not required to be unique. + type: string + sizeGiB: + description: SizeGiB is the size of the disk (in GiB). + format: int64 + type: integer + required: + - sizeGiB + type: object + type: array + datacenter: + description: |- + Datacenter is the name or inventory path of the datacenter in which the + virtual machine is created/located. + Defaults to * which selects the default datacenter. + type: string + datastore: + description: |- + Datastore is the name or inventory path of the datastore in which the + virtual machine is created/located. + type: string + diskGiB: + description: |- + DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. format: int32 type: integer - type: array - biosUUID: - description: |- - BiosUUID is the VM's BIOS UUID that is assigned at runtime after - the VM has been created. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - type: string - bootstrapRef: - description: |- - BootstrapRef is a reference to a bootstrap provider-specific resource - that holds configuration details. - This field is optional in case no bootstrap data is required to create - a VM. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - cloneMode: - description: |- - 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 LinkedClone, but fails gracefully to FullClone if the source - of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: + folder: + description: |- + Folder is the name or inventory path of the folder in which the + virtual machine is created/located. type: string - description: |- - CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - Defaults to empty map - type: object - datacenter: - description: |- - Datacenter is the name or inventory path of the datacenter in which the - virtual machine is created/located. - Defaults to * which selects the default datacenter. - type: string - datastore: - description: |- - Datastore is the name or inventory path of the datastore in which the - virtual machine is created/located. - type: string - diskGiB: - description: |- - DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - folder: - description: |- - Folder is the name or inventory path of the folder in which the - virtual machine is created/located. - type: string - guestSoftPowerOffTimeout: - description: |- - GuestSoftPowerOffTimeout sets the wait timeout for shutdown in the VM guest. - The VM will be powered off forcibly after the timeout if the VM is still - up and running when the PowerOffMode is set to trySoft. - - - This parameter only applies when the PowerOffMode is set to trySoft. - - - If omitted, the timeout defaults to 5 minutes. - type: string - hardwareVersion: - description: |- - HardwareVersion is the hardware version of the virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Check the compatibility with the ESXi version before setting the value. - type: string - memoryMiB: - description: |- - MemoryMiB is the size of a virtual machine's memory, in MiB. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: |- - Devices is the list of network devices used by the virtual machine. - TODO(akutz) Make sure at least one network matches the - ClusterSpec.CloudProviderConfiguration.Network.Name - items: + guestSoftPowerOffTimeout: + description: |- + GuestSoftPowerOffTimeout sets the wait timeout for shutdown in the VM guest. + The VM will be powered off forcibly after the timeout if the VM is still + up and running when the PowerOffMode is set to trySoft. + + + This parameter only applies when the PowerOffMode is set to trySoft. + + + If omitted, the timeout defaults to 5 minutes. + type: string + hardwareVersion: + description: |- + HardwareVersion is the hardware version of the virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Check the compatibility with the ESXi version before setting the value. + type: string + memoryMiB: + description: |- + MemoryMiB is the size of a virtual machine's memory, in MiB. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: description: |- - NetworkDeviceSpec defines the network configuration for a virtual machine's - network device. - properties: - addressesFromPools: - description: |- - AddressesFromPools is a list of IPAddressPools that should be assigned - to IPAddressClaims. The machine's cloud-init metadata will be populated - with IPAddresses fulfilled by an IPAM provider. - items: + Devices is the list of network devices used by the virtual machine. + TODO(akutz) Make sure at least one network matches the + ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: |- + NetworkDeviceSpec defines the network configuration for a virtual machine's + network device. + properties: + addressesFromPools: + description: |- + AddressesFromPools is a list of IPAddressPools that should be assigned + to IPAddressClaims. The machine's cloud-init metadata will be populated + with IPAddresses fulfilled by an IPAM provider. + items: + description: |- + TypedLocalObjectReference contains enough information to let you locate the + typed referenced object inside the same namespace. + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + deviceName: + description: |- + DeviceName may be used to explicitly assign a name to the network device + as it exists in the guest operating system. + type: string + dhcp4: + description: |- + DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 + on this device. + If true then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp4Overrides: description: |- - TypedLocalObjectReference contains enough information to let you locate the - typed referenced object inside the same namespace. + DHCP4Overrides allows for the control over several DHCP behaviors. + Overrides will only be applied when the corresponding DHCP flag is set. + Only configured values will be sent, omitted values will default to + distribution defaults. + Dependent on support in the network stack for your distribution. + For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) properties: - apiGroup: + hostname: description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. + Hostname is the name which will be sent to the DHCP server instead of + the machine's hostname. type: string - kind: - description: Kind is the type of resource being referenced + routeMetric: + description: |- + RouteMetric is used to prioritize routes for devices. A lower metric for + an interface will have a higher priority. + type: integer + sendHostname: + description: |- + SendHostname when `true`, the hostname of the machine will be sent to the + DHCP server. + type: boolean + useDNS: + description: |- + UseDNS when `true`, the DNS servers in the DHCP server will be used and + take precedence. + type: boolean + useDomains: + description: |- + UseDomains can take the values `true`, `false`, or `route`. When `true`, + the domain name from the DHCP server will be used as the DNS search + domain for this device. When `route`, the domain name from the DHCP + response will be used for routing DNS only, not for searching. type: string - name: - description: Name is the name of resource being referenced + useHostname: + description: |- + UseHostname when `true`, the hostname from the DHCP server will be set + as the transient hostname of the machine. + type: boolean + useMTU: + description: |- + UseMTU when `true`, the MTU from the DHCP server will be set as the + MTU of the device. + type: boolean + useNTP: + description: |- + UseNTP when `true`, the NTP servers from the DHCP server will be used + by systemd-timesyncd and take precedence. + type: boolean + useRoutes: + description: |- + UseRoutes when `true`, the routes from the DHCP server will be installed + in the routing table. type: string - required: - - kind - - name type: object - x-kubernetes-map-type: atomic - type: array - deviceName: - description: |- - DeviceName may be used to explicitly assign a name to the network device - as it exists in the guest operating system. - type: string - dhcp4: - description: |- - DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - on this device. - If true then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp4Overrides: - description: |- - DHCP4Overrides allows for the control over several DHCP behaviors. - Overrides will only be applied when the corresponding DHCP flag is set. - Only configured values will be sent, omitted values will default to - distribution defaults. - Dependent on support in the network stack for your distribution. - For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) - properties: - hostname: - description: |- - Hostname is the name which will be sent to the DHCP server instead of - the machine's hostname. - type: string - routeMetric: - description: |- - RouteMetric is used to prioritize routes for devices. A lower metric for - an interface will have a higher priority. - type: integer - sendHostname: - description: |- - SendHostname when `true`, the hostname of the machine will be sent to the - DHCP server. - type: boolean - useDNS: - description: |- - UseDNS when `true`, the DNS servers in the DHCP server will be used and - take precedence. - type: boolean - useDomains: - description: |- - UseDomains can take the values `true`, `false`, or `route`. When `true`, - the domain name from the DHCP server will be used as the DNS search - domain for this device. When `route`, the domain name from the DHCP - response will be used for routing DNS only, not for searching. - type: string - useHostname: - description: |- - UseHostname when `true`, the hostname from the DHCP server will be set - as the transient hostname of the machine. - type: boolean - useMTU: - description: |- - UseMTU when `true`, the MTU from the DHCP server will be set as the - MTU of the device. - type: boolean - useNTP: - description: |- - UseNTP when `true`, the NTP servers from the DHCP server will be used - by systemd-timesyncd and take precedence. - type: boolean - useRoutes: - description: |- - UseRoutes when `true`, the routes from the DHCP server will be installed - in the routing table. - type: string - type: object - dhcp6: - description: |- - DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - on this device. - If true then IPAddrs should not contain any IPv6 addresses. - type: boolean - dhcp6Overrides: - description: |- - DHCP6Overrides allows for the control over several DHCP behaviors. - Overrides will only be applied when the corresponding DHCP flag is set. - Only configured values will be sent, omitted values will default to - distribution defaults. - Dependent on support in the network stack for your distribution. - For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) - properties: - hostname: - description: |- - Hostname is the name which will be sent to the DHCP server instead of - the machine's hostname. - type: string - routeMetric: - description: |- - RouteMetric is used to prioritize routes for devices. A lower metric for - an interface will have a higher priority. - type: integer - sendHostname: - description: |- - SendHostname when `true`, the hostname of the machine will be sent to the - DHCP server. - type: boolean - useDNS: - description: |- - UseDNS when `true`, the DNS servers in the DHCP server will be used and - take precedence. - type: boolean - useDomains: - description: |- - UseDomains can take the values `true`, `false`, or `route`. When `true`, - the domain name from the DHCP server will be used as the DNS search - domain for this device. When `route`, the domain name from the DHCP - response will be used for routing DNS only, not for searching. - type: string - useHostname: - description: |- - UseHostname when `true`, the hostname from the DHCP server will be set - as the transient hostname of the machine. - type: boolean - useMTU: - description: |- - UseMTU when `true`, the MTU from the DHCP server will be set as the - MTU of the device. - type: boolean - useNTP: - description: |- - UseNTP when `true`, the NTP servers from the DHCP server will be used - by systemd-timesyncd and take precedence. - type: boolean - useRoutes: - description: |- - UseRoutes when `true`, the routes from the DHCP server will be installed - in the routing table. - type: string - type: object - gateway4: - description: |- - Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by this device. - type: string - ipAddrs: - description: |- - IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - to this device. IP addresses must also specify the segment length in - CIDR notation. - Required when DHCP4, DHCP6 and SkipIPAllocation are false. - items: - type: string - type: array - macAddr: - description: |- - MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow a MAC address - to be generated. - Please note that this value must use the VMware OUI to work with the - in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 - type: integer - nameservers: - description: |- - Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - nameservers. - Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: |- - NetworkName is the name of the vSphere network to which the device - will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. + dhcp6: + description: |- + DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 + on this device. + If true then IPAddrs should not contain any IPv6 addresses. + type: boolean + dhcp6Overrides: + description: |- + DHCP6Overrides allows for the control over several DHCP behaviors. + Overrides will only be applied when the corresponding DHCP flag is set. + Only configured values will be sent, omitted values will default to + distribution defaults. + Dependent on support in the network stack for your distribution. + For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides) properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 + hostname: + description: |- + Hostname is the name which will be sent to the DHCP server instead of + the machine's hostname. + type: string + routeMetric: + description: |- + RouteMetric is used to prioritize routes for devices. A lower metric for + an interface will have a higher priority. type: integer - to: - description: To is an IPv4 or IPv6 address. + sendHostname: + description: |- + SendHostname when `true`, the hostname of the machine will be sent to the + DHCP server. + type: boolean + useDNS: + description: |- + UseDNS when `true`, the DNS servers in the DHCP server will be used and + take precedence. + type: boolean + useDomains: + description: |- + UseDomains can take the values `true`, `false`, or `route`. When `true`, + the domain name from the DHCP server will be used as the DNS search + domain for this device. When `route`, the domain name from the DHCP + response will be used for routing DNS only, not for searching. type: string - via: - description: Via is an IPv4 or IPv6 address. + useHostname: + description: |- + UseHostname when `true`, the hostname from the DHCP server will be set + as the transient hostname of the machine. + type: boolean + useMTU: + description: |- + UseMTU when `true`, the MTU from the DHCP server will be set as the + MTU of the device. + type: boolean + useNTP: + description: |- + UseNTP when `true`, the NTP servers from the DHCP server will be used + by systemd-timesyncd and take precedence. + type: boolean + useRoutes: + description: |- + UseRoutes when `true`, the routes from the DHCP server will be installed + in the routing table. type: string - required: - - metric - - to - - via type: object - type: array - searchDomains: - description: |- - SearchDomains is a list of search domains used when resolving IP - addresses with DNS. - items: + gateway4: + description: |- + Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. type: string - type: array - skipIPAllocation: - description: |- - SkipIPAllocation allows the device to not have IP address or DHCP configured. - This is suitable for devices for which IP allocation is handled externally, eg. using Multus CNI. - If true, CAPV will not verify IP address allocation. - type: boolean - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: |- - PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - server endpoint on this machine - - - Deprecated: This field is going to be removed in a future release. - type: string - routes: - description: |- - Routes is a list of optional, static routes applied to the virtual - machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: |- - NumCPUs is the number of virtual processors in a virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: |- - NumCPUs is the number of cores among which to distribute CPUs in this - virtual machine. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - os: - description: |- - OS is the Operating System of the virtual machine - Defaults to Linux - type: string - pciDevices: - description: PciDevices is the list of pci devices used by the virtual - machine. - items: - description: PCIDeviceSpec defines virtual machine's PCI configuration. - properties: - customLabel: - description: |- - CustomLabel is the hardware label of a virtual machine's PCI device. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - type: string - deviceId: - description: |- - DeviceID is the device ID of a virtual machine's PCI, in integer. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - format: int32 - type: integer - vGPUProfile: - description: |- - VGPUProfile is the profile name of a virtual machine's vGPU, in string. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with DeviceID and VendorID as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - type: string - vendorId: - description: |- - VendorId is the vendor ID of a virtual machine's PCI, in integer. - Defaults to the eponymous property value in the template from which the - virtual machine is cloned. - Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID - are two independent ways to define PCI devices. - format: int32 - type: integer - type: object - type: array - powerOffMode: - default: hard - description: |- - PowerOffMode describes the desired behavior when powering off a VM. - - - There are three, supported power off modes: hard, soft, and - trySoft. The first mode, hard, is the equivalent of a physical - system's power cord being ripped from the wall. The soft mode - requires the VM's guest to have VM Tools installed and attempts to - gracefully shut down the VM. Its variant, trySoft, first attempts - a graceful shutdown, and if that fails or the VM is not in a powered off - state after reaching the GuestSoftPowerOffTimeout, the VM is halted. - - - If omitted, the mode defaults to hard. - enum: - - hard - - soft - - trySoft - type: string - resourcePool: - description: |- - ResourcePool is the name or inventory path of the resource pool in which - the virtual machine is created/located. - type: string - server: - description: |- - Server is the IP address or FQDN of the vSphere server on which - the virtual machine is created/located. - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which to create a linked clone. - This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: |- - StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - tagIDs: - description: |- - TagIDs is an optional set of tags to add to an instance. Specified tagIDs - must use URN-notation instead of display names. - items: - type: string - type: array - template: - description: |- - Template is the name or inventory path of the template used to clone - the virtual machine. - minLength: 1 - type: string - thumbprint: - description: |- - Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - When this is set to empty, this VirtualMachine would be created - without TLS certificate validation of the communication between Cluster API Provider vSphere - and the VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereVMStatus defines the observed state of VSphereVM. - properties: - addresses: - description: |- - Addresses is a list of the VM's IP addresses. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - items: - type: string - type: array - cloneMode: - description: |- - CloneMode is the type of clone operation used to clone this VM. Since - LinkedMode is the default but fails gracefully if the source of the - clone has no snapshots, this field may be used to determine the actual - type of clone operation used to create this VM. - type: string - conditions: - description: Conditions defines current service state of the VSphereVM. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - Last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: + gateway6: + description: Gateway4 is the IPv4 gateway used by this device. + type: string + ipAddrs: + description: |- + IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign + to this device. IP addresses must also specify the segment length in + CIDR notation. + Required when DHCP4, DHCP6 and SkipIPAllocation are false. + items: + type: string + type: array + macAddr: + description: |- + MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow a MAC address + to be generated. + Please note that this value must use the VMware OUI to work with the + in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: |- + Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS + nameservers. + Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: |- + NetworkName is the name of the vSphere network to which the device + will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: |- + SearchDomains is a list of search domains used when resolving IP + addresses with DNS. + items: + type: string + type: array + skipIPAllocation: + description: |- + SkipIPAllocation allows the device to not have IP address or DHCP configured. + This is suitable for devices for which IP allocation is handled externally, eg. using Multus CNI. + If true, CAPV will not verify IP address allocation. + type: boolean + required: + - networkName + type: object + type: array + preferredAPIServerCidr: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. + PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API + server endpoint on this machine + + + Deprecated: This field is going to be removed in a future release. type: string - required: - - lastTransitionTime - - status - - type - type: object - type: array - failureMessage: - description: |- - FailureMessage will be set in the event that there is a terminal problem - reconciling the vspherevm and will contain a more verbose string suitable - for logging and human consumption. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the vm. - - - Any transient errors that occur during the reconciliation of vspherevms - can be added as events to the vspherevm object and/or logged in the - controller's output. - type: string - failureReason: - description: |- - FailureReason will be set in the event that there is a terminal problem - reconciling the vspherevm and will contain a succinct value suitable - for vm interpretation. - - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the vm. - - - Any transient errors that occur during the reconciliation of vspherevms - can be added as events to the vspherevm object and/or logged in the - controller's output. - type: string - host: - description: |- - Host describes the hostname or IP address of the infrastructure host - that the VSphereVM is residing on. - type: string - moduleUUID: - description: |- - ModuleUUID is the unique identifier for the vCenter cluster module construct - which is used to configure anti-affinity. Objects with the same ModuleUUID - will be anti-affined, meaning that the vCenter DRS will best effort schedule - the VMs on separate hosts. - type: string - network: - description: |- - Network returns the network status for each of the machine's configured - network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. - properties: - connected: + routes: description: |- - Connected is a flag that indicates whether this network is currently - connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. + Routes is a list of optional, static routes applied to the virtual + machine. items: - type: string + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object type: array - macAddr: - description: MACAddr is the MAC address of the network device. - type: string - networkName: - description: NetworkName is the name of the network. - type: string required: - - macAddr + - devices type: object - type: array - ready: - description: |- - Ready is true when the provider resource is ready. - This field is required at runtime for other controllers that read - this CRD as unstructured data. - type: boolean - retryAfter: - description: RetryAfter tracks the time we can retry queueing a task - format: date-time - type: string - snapshot: - description: |- - Snapshot is the name of the snapshot from which the VM was cloned if - LinkedMode is enabled. - type: string - taskRef: - description: |- - TaskRef is a managed object reference to a Task related to the machine. - This value is set automatically at runtime and should not be set or - modified by users. - type: string - vmRef: - description: |- - VMRef is the VM's Managed Object Reference on vSphere. It can be used by consumers - to programatically get this VM representation on vSphere in case of the need to retrieve informations. - This field is set once the machine is created and should not be changed - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} + numCPUs: + description: |- + NumCPUs is the number of virtual processors in a virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: |- + NumCPUs is the number of cores among which to distribute CPUs in this + virtual machine. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + os: + description: |- + OS is the Operating System of the virtual machine + Defaults to Linux + type: string + pciDevices: + description: PciDevices is the list of pci devices used by the virtual + machine. + items: + description: PCIDeviceSpec defines virtual machine's PCI configuration. + properties: + customLabel: + description: |- + CustomLabel is the hardware label of a virtual machine's PCI device. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + type: string + deviceId: + description: |- + DeviceID is the device ID of a virtual machine's PCI, in integer. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. + format: int32 + type: integer + vGPUProfile: + description: |- + VGPUProfile is the profile name of a virtual machine's vGPU, in string. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Mutually exclusive with DeviceID and VendorID as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. + type: string + vendorId: + description: |- + VendorId is the vendor ID of a virtual machine's PCI, in integer. + Defaults to the eponymous property value in the template from which the + virtual machine is cloned. + Mutually exclusive with VGPUProfile as VGPUProfile and DeviceID + VendorID + are two independent ways to define PCI devices. + format: int32 + type: integer + type: object + type: array + powerOffMode: + default: hard + description: |- + PowerOffMode describes the desired behavior when powering off a VM. + + + There are three, supported power off modes: hard, soft, and + trySoft. The first mode, hard, is the equivalent of a physical + system's power cord being ripped from the wall. The soft mode + requires the VM's guest to have VM Tools installed and attempts to + gracefully shut down the VM. Its variant, trySoft, first attempts + a graceful shutdown, and if that fails or the VM is not in a powered off + state after reaching the GuestSoftPowerOffTimeout, the VM is halted. + + + If omitted, the mode defaults to hard. + enum: + - hard + - soft + - trySoft + type: string + resourcePool: + description: |- + ResourcePool is the name or inventory path of the resource pool in which + the virtual machine is created/located. + type: string + server: + description: |- + Server is the IP address or FQDN of the vSphere server on which + the virtual machine is created/located. + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which to create a linked clone. + This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + storagePolicyName: + description: |- + StoragePolicyName of the storage policy to use with this + Virtual Machine + type: string + tagIDs: + description: |- + TagIDs is an optional set of tags to add to an instance. Specified tagIDs + must use URN-notation instead of display names. + items: + type: string + type: array + template: + description: |- + Template is the name or inventory path of the template used to clone + the virtual machine. + minLength: 1 + type: string + thumbprint: + description: |- + Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate + When this is set to empty, this VirtualMachine would be created + without TLS certificate validation of the communication between Cluster API Provider vSphere + and the VMware vCenter server. + type: string + required: + - network + - template + type: object + status: + description: VSphereVMStatus defines the observed state of VSphereVM. + properties: + addresses: + description: |- + Addresses is a list of the VM's IP addresses. + This field is required at runtime for other controllers that read + this CRD as unstructured data. + items: + type: string + type: array + cloneMode: + description: |- + CloneMode is the type of clone operation used to clone this VM. Since + LinkedMode is the default but fails gracefully if the source of the + clone has no snapshots, this field may be used to determine the actual + type of clone operation used to create this VM. + type: string + conditions: + description: Conditions defines current service state of the VSphereVM. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureMessage: + description: |- + FailureMessage will be set in the event that there is a terminal problem + reconciling the vspherevm and will contain a more verbose string suitable + for logging and human consumption. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the vm. + + + Any transient errors that occur during the reconciliation of vspherevms + can be added as events to the vspherevm object and/or logged in the + controller's output. + type: string + failureReason: + description: |- + FailureReason will be set in the event that there is a terminal problem + reconciling the vspherevm and will contain a succinct value suitable + for vm interpretation. + + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the vm. + + + Any transient errors that occur during the reconciliation of vspherevms + can be added as events to the vspherevm object and/or logged in the + controller's output. + type: string + host: + description: |- + Host describes the hostname or IP address of the infrastructure host + that the VSphereVM is residing on. + type: string + moduleUUID: + description: |- + ModuleUUID is the unique identifier for the vCenter cluster module construct + which is used to configure anti-affinity. Objects with the same ModuleUUID + will be anti-affined, meaning that the vCenter DRS will best effort schedule + the VMs on separate hosts. + type: string + network: + description: |- + Network returns the network status for each of the machine's configured + network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. + properties: + connected: + description: |- + Connected is a flag that indicates whether this network is currently + connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address of the network device. + type: string + networkName: + description: NetworkName is the name of the network. + type: string + required: + - macAddr + type: object + type: array + ready: + description: |- + Ready is true when the provider resource is ready. + This field is required at runtime for other controllers that read + this CRD as unstructured data. + type: boolean + retryAfter: + description: RetryAfter tracks the time we can retry queueing a task + format: date-time + type: string + snapshot: + description: |- + Snapshot is the name of the snapshot from which the VM was cloned if + LinkedMode is enabled. + type: string + taskRef: + description: |- + TaskRef is a managed object reference to a Task related to the machine. + This value is set automatically at runtime and should not be set or + modified by users. + type: string + vmRef: + description: |- + VMRef is the VM's Managed Object Reference on vSphere. It can be used by consumers + to programatically get this VM representation on vSphere in case of the need to retrieve informations. + This field is set once the machine is created and should not be changed + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -7163,49 +7227,49 @@ metadata: name: capv-leader-election-role namespace: capv-system rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch -- apiGroups: - - "" - resources: - - events - verbs: - - create -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete --- aggregationRule: clusterRoleSelectors: - - matchLabels: - capv.infrastucture.cluster.x-k8s.io/aggregate-to-manager: "true" + - matchLabels: + capv.infrastucture.cluster.x-k8s.io/aggregate-to-manager: "true" apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -7224,546 +7288,546 @@ metadata: kubeadm.controlplane.cluster.x-k8s.io/aggregate-to-manager: "true" name: capv-manager-role rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - configmaps - - events - - nodes - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - patch - - update -- apiGroups: - - "" - resources: - - events - verbs: - - create - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - persistentvolumeclaims - verbs: - - create - - delete - - get - - list - - update - - watch -- apiGroups: - - "" - resources: - - persistentvolumeclaims/status - verbs: - - get - - patch - - update -- apiGroups: - - "" - resources: - - secrets - verbs: - - get -- apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - services/status - verbs: - - get -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create -- apiGroups: - - cluster.x-k8s.io - resources: - - clusters - - clusters/status - verbs: - - get - - list - - watch -- apiGroups: - - cluster.x-k8s.io - resources: - - machinedeployments - verbs: - - get - - list - - watch -- apiGroups: - - cluster.x-k8s.io - resources: - - machinedeployments - - machinesets - verbs: - - get - - list - - watch -- apiGroups: - - cluster.x-k8s.io - resources: - - machines - verbs: - - get - - list - - patch - - watch -- apiGroups: - - cluster.x-k8s.io - resources: - - machines/status - verbs: - - get - - list - - watch -- apiGroups: - - controlplane.cluster.x-k8s.io - resources: - - kubeadmcontrolplanes - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - nodes - verbs: - - delete - - get - - list -- apiGroups: - - "" - resources: - - secrets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - crd.nsx.vmware.com - resources: - - subnetsets - - subnetsets/status - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vsphereclusteridentities - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vsphereclusteridentities/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vsphereclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vsphereclusters/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vspheredeploymentzones - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vspheredeploymentzones/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vspherefailuredomains - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vspheremachines - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vspheremachines/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vspheremachinetemplates - verbs: - - get - - list - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vspherevms - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - vspherevms/status - verbs: - - get - - patch - - update -- apiGroups: - - ipam.cluster.x-k8s.io - resources: - - ipaddressclaims - verbs: - - create - - get - - list - - patch - - update - - watch -- apiGroups: - - ipam.cluster.x-k8s.io - resources: - - ipaddresses - verbs: - - get - - list - - watch -- apiGroups: - - netoperator.vmware.com - resources: - - networks - verbs: - - get - - list - - watch -- apiGroups: - - rbac.authorization.k8s.io - resources: - - rolebindings - - roles - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - topology.tanzu.vmware.com - resources: - - availabilityzones - verbs: - - get - - list - - watch -- apiGroups: - - topology.tanzu.vmware.com - resources: - - availabilityzones/status - verbs: - - get - - list - - watch -- apiGroups: - - topology.tanzu.vmware.com - resources: - - zones - verbs: - - get - - list - - watch -- apiGroups: - - vmoperator.vmware.com - resources: - - virtualmachineclasses - verbs: - - get - - list - - watch -- apiGroups: - - vmoperator.vmware.com - resources: - - virtualmachineimages - - virtualmachineimages/status - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmoperator.vmware.com - resources: - - virtualmachines - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmoperator.vmware.com - resources: - - virtualmachineservices - - virtualmachineservices/status - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmoperator.vmware.com - resources: - - virtualmachinesetresourcepolicies - - virtualmachinesetresourcepolicies/status - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmware.com - resources: - - virtualnetworks - - virtualnetworks/status - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - providerserviceaccounts - verbs: - - get - - list - - watch -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - providerserviceaccounts/status - verbs: - - get - - patch - - update -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - vsphereclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - vsphereclusters/status - verbs: - - get - - patch - - update -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - vsphereclustertemplates - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - vspheremachines - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - vspheremachines/status - verbs: - - get - - patch - - update -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - vspheremachinetemplates - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - vmware.infrastructure.cluster.x-k8s.io - resources: - - vspheremachinetemplates/status - verbs: - - get - - patch - - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - configmaps + - events + - nodes + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - patch + - update + - apiGroups: + - "" + resources: + - events + verbs: + - create + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list + - update + - watch + - apiGroups: + - "" + resources: + - persistentvolumeclaims/status + verbs: + - get + - patch + - update + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - services/status + verbs: + - get + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create + - apiGroups: + - cluster.x-k8s.io + resources: + - clusters + - clusters/status + verbs: + - get + - list + - watch + - apiGroups: + - cluster.x-k8s.io + resources: + - machinedeployments + verbs: + - get + - list + - watch + - apiGroups: + - cluster.x-k8s.io + resources: + - machinedeployments + - machinesets + verbs: + - get + - list + - watch + - apiGroups: + - cluster.x-k8s.io + resources: + - machines + verbs: + - get + - list + - patch + - watch + - apiGroups: + - cluster.x-k8s.io + resources: + - machines/status + verbs: + - get + - list + - watch + - apiGroups: + - controlplane.cluster.x-k8s.io + resources: + - kubeadmcontrolplanes + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - nodes + verbs: + - delete + - get + - list + - apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - crd.nsx.vmware.com + resources: + - subnetsets + - subnetsets/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vsphereclusteridentities + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vsphereclusteridentities/status + verbs: + - get + - patch + - update + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vsphereclusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vsphereclusters/status + verbs: + - get + - patch + - update + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspheredeploymentzones + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspheredeploymentzones/status + verbs: + - get + - patch + - update + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspherefailuredomains + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspheremachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspheremachines/status + verbs: + - get + - patch + - update + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspheremachinetemplates + verbs: + - get + - list + - watch + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspherevms + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspherevms/status + verbs: + - get + - patch + - update + - apiGroups: + - ipam.cluster.x-k8s.io + resources: + - ipaddressclaims + verbs: + - create + - get + - list + - patch + - update + - watch + - apiGroups: + - ipam.cluster.x-k8s.io + resources: + - ipaddresses + verbs: + - get + - list + - watch + - apiGroups: + - netoperator.vmware.com + resources: + - networks + verbs: + - get + - list + - watch + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + - roles + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - topology.tanzu.vmware.com + resources: + - availabilityzones + verbs: + - get + - list + - watch + - apiGroups: + - topology.tanzu.vmware.com + resources: + - availabilityzones/status + verbs: + - get + - list + - watch + - apiGroups: + - topology.tanzu.vmware.com + resources: + - zones + verbs: + - get + - list + - watch + - apiGroups: + - vmoperator.vmware.com + resources: + - virtualmachineclasses + verbs: + - get + - list + - watch + - apiGroups: + - vmoperator.vmware.com + resources: + - virtualmachineimages + - virtualmachineimages/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmoperator.vmware.com + resources: + - virtualmachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmoperator.vmware.com + resources: + - virtualmachineservices + - virtualmachineservices/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmoperator.vmware.com + resources: + - virtualmachinesetresourcepolicies + - virtualmachinesetresourcepolicies/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmware.com + resources: + - virtualnetworks + - virtualnetworks/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - providerserviceaccounts + verbs: + - get + - list + - watch + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - providerserviceaccounts/status + verbs: + - get + - patch + - update + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - vsphereclusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - vsphereclusters/status + verbs: + - get + - patch + - update + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - vsphereclustertemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - vspheremachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - vspheremachines/status + verbs: + - get + - patch + - update + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - vspheremachinetemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - vmware.infrastructure.cluster.x-k8s.io + resources: + - vspheremachinetemplates/status + verbs: + - get + - patch + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -7777,9 +7841,9 @@ roleRef: kind: Role name: capv-leader-election-role subjects: -- kind: ServiceAccount - name: default - namespace: capv-system + - kind: ServiceAccount + name: default + namespace: capv-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -7792,9 +7856,9 @@ roleRef: kind: ClusterRole name: capv-aggregated-manager-role subjects: -- kind: ServiceAccount - name: default - namespace: capv-system + - kind: ServiceAccount + name: default + namespace: capv-system --- apiVersion: v1 kind: Secret @@ -7818,8 +7882,8 @@ metadata: namespace: capv-system spec: ports: - - port: 443 - targetPort: webhook-server + - port: 443 + targetPort: webhook-server selector: cluster.x-k8s.io/provider: infrastructure-vsphere --- @@ -7844,79 +7908,79 @@ spec: control-plane: controller-manager spec: containers: - - args: - - --leader-elect - - --diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443} - - --insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false} - - --v=4 - - --feature-gates=NodeAntiAffinity=${EXP_NODE_ANTI_AFFINITY:=false},NamespaceScopedZones=${EXP_NAMESPACE_SCOPED_ZONES:=false} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_UID - valueFrom: - fieldRef: - fieldPath: metadata.uid - image: gcr.io/k8s-staging-capi-vsphere/cluster-api-vsphere-controller:main - imagePullPolicy: Always - livenessProbe: - httpGet: - path: /healthz - port: healthz - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - - containerPort: 9440 - name: healthz - protocol: TCP - - containerPort: 8443 - name: metrics - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: healthz - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - runAsGroup: 65532 - runAsUser: 65532 - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - - mountPath: /etc/capv - name: manager-bootstrap-credentials - readOnly: true + - args: + - --leader-elect + - --diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443} + - --insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false} + - --v=4 + - --feature-gates=NodeAntiAffinity=${EXP_NODE_ANTI_AFFINITY:=false},NamespaceScopedZones=${EXP_NAMESPACE_SCOPED_ZONES:=false} + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_UID + valueFrom: + fieldRef: + fieldPath: metadata.uid + image: gcr.io/k8s-staging-capi-vsphere/cluster-api-vsphere-controller:main + imagePullPolicy: Always + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + - containerPort: 9440 + name: healthz + protocol: TCP + - containerPort: 8443 + name: metrics + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsGroup: 65532 + runAsUser: 65532 + terminationMessagePolicy: FallbackToLogsOnError + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + - mountPath: /etc/capv + name: manager-bootstrap-credentials + readOnly: true securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault terminationGracePeriodSeconds: 10 tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - effect: NoSchedule - key: node-role.kubernetes.io/control-plane + - effect: NoSchedule + key: node-role.kubernetes.io/master + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane volumes: - - name: cert - secret: - defaultMode: 420 - secretName: capv-webhook-service-cert - - name: manager-bootstrap-credentials - secret: - secretName: capv-manager-bootstrap-credentials + - name: cert + secret: + defaultMode: 420 + secretName: capv-webhook-service-cert + - name: manager-bootstrap-credentials + secret: + secretName: capv-manager-bootstrap-credentials --- apiVersion: cert-manager.io/v1 kind: Certificate @@ -7927,8 +7991,8 @@ metadata: namespace: capv-system spec: dnsNames: - - capv-webhook-service.capv-system.svc - - capv-webhook-service.capv-system.svc.cluster.local + - capv-webhook-service.capv-system.svc + - capv-webhook-service.capv-system.svc.cluster.local issuerRef: kind: Issuer name: capv-selfsigned-issuer @@ -7953,90 +8017,90 @@ metadata: cluster.x-k8s.io/provider: infrastructure-vsphere name: capv-mutating-webhook-configuration webhooks: -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspheredeploymentzone - failurePolicy: Fail - matchPolicy: Equivalent - name: default.vspheredeploymentzone.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vspheredeploymentzones - sideEffects: None -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspherefailuredomain - failurePolicy: Fail - matchPolicy: Equivalent - name: default.vspherefailuredomain.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vspherefailuredomains - sideEffects: None -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspheremachine - failurePolicy: Fail - matchPolicy: Equivalent - name: default.vspheremachine.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vspheremachines - sideEffects: None -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspherevm - failurePolicy: Fail - matchPolicy: Equivalent - name: default.vspherevm.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vspherevms - sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspheredeploymentzone + failurePolicy: Fail + matchPolicy: Equivalent + name: default.vspheredeploymentzone.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vspheredeploymentzones + sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspherefailuredomain + failurePolicy: Fail + matchPolicy: Equivalent + name: default.vspherefailuredomain.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vspherefailuredomains + sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspheremachine + failurePolicy: Fail + matchPolicy: Equivalent + name: default.vspheremachine.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vspheremachines + sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspherevm + failurePolicy: Fail + matchPolicy: Equivalent + name: default.vspherevm.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vspherevms + sideEffects: None --- apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration @@ -8047,108 +8111,108 @@ metadata: cluster.x-k8s.io/provider: infrastructure-vsphere name: capv-validating-webhook-configuration webhooks: -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vsphereclustertemplate - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.vsphereclustertemplate.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vsphereclustertemplates - sideEffects: None -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vspherefailuredomain - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.vspherefailuredomain.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vspherefailuredomains - sideEffects: None -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vspheremachine - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.vspheremachine.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vspheremachines - sideEffects: None -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vspheremachinetemplate - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.vspheremachinetemplate.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vspheremachinetemplates - sideEffects: None -- admissionReviewVersions: - - v1beta1 - clientConfig: - service: - name: capv-webhook-service - namespace: capv-system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vspherevm - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.vspherevm.infrastructure.cluster.x-k8s.io - rules: - - apiGroups: - - infrastructure.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - vspherevms - sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vsphereclustertemplate + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.vsphereclustertemplate.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vsphereclustertemplates + sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vspherefailuredomain + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.vspherefailuredomain.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vspherefailuredomains + sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vspheremachine + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.vspheremachine.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vspheremachines + sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vspheremachinetemplate + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.vspheremachinetemplate.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vspheremachinetemplates + sideEffects: None + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: capv-webhook-service + namespace: capv-system + path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-vspherevm + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.vspherevm.infrastructure.cluster.x-k8s.io + rules: + - apiGroups: + - infrastructure.cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vspherevms + sideEffects: None diff --git a/go.mod b/go.mod index 3d99a029c71..5d92760a6a3 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/microsoftgraph/msgraph-sdk-go v0.59.0 github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.3.3-0.20240416171357-98239ba02cb2 github.com/nutanix-cloud-native/prism-go-client v0.3.4 - github.com/onsi/gomega v1.34.1 + github.com/onsi/gomega v1.34.2 github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6 github.com/openshift/assisted-service/api v0.0.0 @@ -103,7 +103,7 @@ require ( github.com/vincent-petithory/dataurl v1.0.0 github.com/vmware/govmomi v0.43.0 golang.org/x/crypto v0.27.0 - golang.org/x/oauth2 v0.21.0 + golang.org/x/oauth2 v0.23.0 golang.org/x/sync v0.8.0 golang.org/x/sys v0.25.0 golang.org/x/term v0.24.0 @@ -113,7 +113,7 @@ require ( gopkg.in/ini.v1 v1.67.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.31.1 - k8s.io/apiextensions-apiserver v0.31.0 + k8s.io/apiextensions-apiserver v0.31.1 k8s.io/apimachinery v0.31.1 k8s.io/client-go v0.31.1 k8s.io/cloud-provider-vsphere v1.31.0 @@ -188,7 +188,7 @@ require ( github.com/go-openapi/validate v0.24.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/gobuffalo/flect v1.0.2 // indirect + github.com/gobuffalo/flect v1.0.3 // indirect github.com/gofrs/uuid/v5 v5.2.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect @@ -277,11 +277,11 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/mod v0.20.0 // indirect + golang.org/x/mod v0.21.0 // indirect golang.org/x/net v0.29.0 // indirect golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/tools v0.25.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/genproto v0.0.0-20240722135656-d784300faade // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade // indirect @@ -294,7 +294,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect gorm.io/gorm v1.24.5 // indirect k8s.io/cli-runtime v0.31.1 // indirect - k8s.io/cluster-bootstrap v0.30.3 // indirect + k8s.io/cluster-bootstrap v0.31.1 // indirect k8s.io/component-base v0.31.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/kubectl v0.31.1 // indirect @@ -327,6 +327,12 @@ replace github.com/containerd/containerd => github.com/containerd/containerd v1. replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 -replace github.com/openshift/api => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 +//replace k8s.io/api => k8s.io/api v0.30.5 -replace sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074 +// github.com/vr4manta/api@vsphere_disk +replace github.com/openshift/api => github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491 + +//replace github.com/openshift/api => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 + +// github.com/vr4manta/cluster-api-provider-vsphere@multi_disk +replace sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e diff --git a/go.sum b/go.sum index 2e4ed75cdd4..0e44266754f 100644 --- a/go.sum +++ b/go.sum @@ -395,8 +395,8 @@ github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSC github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= -github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= +github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4= +github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= @@ -508,8 +508,8 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -751,8 +751,8 @@ github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042 github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= -github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= +github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -760,16 +760,14 @@ github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f h1:ya1OmyZm3LIIxI3U9VE9Nyx3ehCHgBwxyFUPflYPWls= -github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6 h1:U6ve+dnHlHhAELoxX+rdFOHVhoaYl0l9qtxwYtsO6C0= github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6/go.mod h1:o2H5VwQhUD8P6XsK6dRmKpCCJqVvv12KJQZBXmcCXCU= github.com/openshift/assisted-service v1.0.10-0.20230830164851-6573b5d7021d h1:CKw2Y4EdaFsMoqAdr2Tq0nlYTaaXmCRdP0gOu7pN64U= @@ -930,10 +928,12 @@ github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/govmomi v0.43.0 h1:7Kg3Bkdly+TrE67BYXzRq7ZrDnn7xqpKX95uEh2f9Go= github.com/vmware/govmomi v0.43.0/go.mod h1:IOv5nTXCPqH9qVJAlRuAGffogaLsNs8aF+e7vLgsHJU= -github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 h1:WDXPgFYRTEmlo3wKeo3/9idb42JbckSd75GyfjpgLPU= -github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM= -github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074 h1:7LvmgO6YNMEEpH6dkJgM6ZkDGIiC4d3JvtHw8O2HRxs= -github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241001154255-1469f6482074/go.mod h1:9WD2xjNc8mGctPk03kMS0t8NH0eaFBnAkO+cIcS0qr0= +github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491 h1:y5rPWGT+4crYj5P3whPZIjReT1NYk/4gAvB60AlgI6k= +github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e h1:SujnNpUXXymTABi5hP83tb3eiEJXBXUiLxxptigsXkA= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e/go.mod h1:ZlRvroJDwXiQIgUfCP5ldHysETeH/1KvEZx+Vj+Q+Qg= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -1066,8 +1066,8 @@ golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1134,8 +1134,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1328,8 +1328,8 @@ golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= +golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1504,8 +1504,8 @@ k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= -k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= +k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= +k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.24.3/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= @@ -1518,8 +1518,8 @@ k8s.io/cli-runtime v0.31.1/go.mod h1:pKv1cDIaq7ehWGuXQ+A//1OIF+7DI+xudXtExMCbe9U k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= -k8s.io/cluster-bootstrap v0.30.3 h1:MgxyxMkpaC6mu0BKWJ8985XCOnKU+eH3Iy+biwtDXRk= -k8s.io/cluster-bootstrap v0.30.3/go.mod h1:h8BoLDfdD7XEEIXy7Bx9FcMzxHwz29jsYYi34bM5DKU= +k8s.io/cluster-bootstrap v0.31.1 h1:lS5aJi2r6WEKnjO5UhbYsz8e3xmEfoF4Hiob/gnB/Nk= +k8s.io/cluster-bootstrap v0.31.1/go.mod h1:dxroRr4eQ0ekxis/kzGa1qODprQXAxQZrgDLfTk8Pug= k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= @@ -1563,8 +1563,6 @@ sigs.k8s.io/cluster-api-provider-ibmcloud v0.9.0-alpha.0.0.20240913094112-c6bcd3 sigs.k8s.io/cluster-api-provider-ibmcloud v0.9.0-alpha.0.0.20240913094112-c6bcd313bce0/go.mod h1:jcaJz8PmXE8vTGr5KGV8ArlZjZmZVWoUGlmvDuQSs5c= sigs.k8s.io/cluster-api-provider-openstack v0.10.3 h1:nVIIOHVbMfvcI6buc4MTqiRtkzZIjZkxixbYNN49rYU= sigs.k8s.io/cluster-api-provider-openstack v0.10.3/go.mod h1:/3VAIzFoAxX77QykzyE6tnHD9aC8lYiQVKbfKPoX20w= -sigs.k8s.io/cluster-api-provider-vsphere v1.11.1 h1:hwQEMOiC0zNIRNl5qG1x+IyAAoN32WhQrXo2ANjD+CQ= -sigs.k8s.io/cluster-api-provider-vsphere v1.11.1/go.mod h1:YU5i6KB5MnjuyI4ushaDOwdX1rscnSaJmnF3SlrnLPU= sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/controller-tools v0.12.0 h1:TY6CGE6+6hzO7hhJFte65ud3cFmmZW947jajXkuDfBw= diff --git a/pkg/asset/machines/vsphere/capimachines.go b/pkg/asset/machines/vsphere/capimachines.go index 9ff7f40e613..a3a296e231f 100644 --- a/pkg/asset/machines/vsphere/capimachines.go +++ b/pkg/asset/machines/vsphere/capimachines.go @@ -150,12 +150,11 @@ func GenerateMachines(ctx context.Context, clusterID string, config *types.Insta } // If we have additional disks to add to VM, lets iterate through them and add to CAPV machine - if len(providerSpec.Disks) > 0 { + if len(providerSpec.DataDisks) > 0 { dataDisks := []capv.VSphereDisk{} - for _, disk := range providerSpec.Disks { + for _, disk := range providerSpec.DataDisks { newDisk := capv.VSphereDisk{ - DeviceName: disk.DeviceName, - SizeGiB: disk.SizeGiB, + SizeGiB: disk.SizeGiB, } dataDisks = append(dataDisks, newDisk) } diff --git a/pkg/asset/machines/vsphere/machines.go b/pkg/asset/machines/vsphere/machines.go index 89191746376..36c3fd2cc5c 100644 --- a/pkg/asset/machines/vsphere/machines.go +++ b/pkg/asset/machines/vsphere/machines.go @@ -335,14 +335,12 @@ func provider(clusterID string, vcenter *vsphere.VCenter, failureDomain vsphere. networkDeviceSpec[i] = machineapi.NetworkDeviceSpec{NetworkName: network} } - additionalDisks := []machineapi.VSphereDisk{} - for i, curDisk := range mpool.AdditionalDisks { - diskName := fmt.Sprintf("Disk_%d", (i + 1)) + dataDisks := []machineapi.VSphereDisk{} + for _, curDisk := range mpool.DataDisks { newDisk := machineapi.VSphereDisk{ - DeviceName: diskName, - SizeGiB: int64(curDisk.DiskSizeGB), + SizeGiB: int64(curDisk.DiskSizeGiB), } - additionalDisks = append(additionalDisks, newDisk) + dataDisks = append(dataDisks, newDisk) } return &machineapi.VSphereMachineProviderSpec{ @@ -368,7 +366,7 @@ func provider(clusterID string, vcenter *vsphere.VCenter, failureDomain vsphere. NumCoresPerSocket: mpool.NumCoresPerSocket, MemoryMiB: mpool.MemoryMiB, DiskGiB: mpool.OSDisk.DiskSizeGB, - Disks: additionalDisks, + DataDisks: dataDisks, }, nil } diff --git a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go index ab42486622c..93d52e5f996 100644 --- a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go +++ b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go @@ -145,38 +145,6 @@ func (p Provider) InfraReady(ctx context.Context, in clusterapi.InfraReadyInput) // PostProvision should be called to add or update and vSphere resources after provisioning has completed. func (p Provider) PostProvision(ctx context.Context, in clusterapi.PostProvisionInput) error { - // We will want to check to see if ControlPlane machines need additional disks - cpPool := in.InstallConfig.Config.ControlPlane.Platform.VSphere - - // If not set, nothing to do here. - if cpPool == nil { - return nil - } - - // If we have any additional disks defined, we'll need to create them here - if len(cpPool.AdditionalDisks) > 0 { - logrus.Info("Adding additional disks to control plane machines") - - for i := range in.MachineManifests { - if vm, ok := in.MachineManifests[i].(*v1beta1.VSphereMachine); ok { - if !strings.HasSuffix(vm.Name, "bootstrap") { - logrus.Infof("Adding additional disks to vm %s", vm.Name) - server := vm.Spec.Server - vctrSession, err := in.InstallConfig.VSphere.Session(context.TODO(), server) - - if err != nil { - return err - } - err = addAdditionalDisks(ctx, vm, cpPool, vctrSession) - - if err != nil { - return err - } - } - } - } - } - return nil } @@ -191,7 +159,7 @@ func downloadImage(installConfig *installconfig.InstallConfig) bool { return false } -func addAdditionalDisks(ctx context.Context, machine *v1beta1.VSphereMachine, pool *vsphere.MachinePool, session *session.Session) error { +func addDataDisks(ctx context.Context, machine *v1beta1.VSphereMachine, pool *vsphere.MachinePool, session *session.Session) error { logrus.Debugf("Getting vm %v", machine.Name) vm, err := session.Finder.VirtualMachine(ctx, fmt.Sprintf("%s/%s", machine.Spec.Folder, machine.Name)) offset := 1 // For now, we assume only one disk is current attached to VM. @@ -219,8 +187,8 @@ func addAdditionalDisks(ctx context.Context, machine *v1beta1.VSphereMachine, po return err } - for diskIndex, newDisk := range pool.AdditionalDisks { - logrus.Debugf("Attempting to add disk %d with size %dGiB", diskIndex, newDisk.DiskSizeGB) + for diskIndex, newDisk := range pool.DataDisks { + logrus.Debugf("Attempting to add disk %d with size %dGiB", diskIndex, newDisk.DiskSizeGiB) disk := devices.CreateDisk(controller, ds.Reference(), "") @@ -231,7 +199,7 @@ func addAdditionalDisks(ctx context.Context, machine *v1beta1.VSphereMachine, po return errors.New("disk already present") } - disk.CapacityInKB = int64(newDisk.DiskSizeGB) * 1024 * 1024 + disk.CapacityInKB = int64(newDisk.DiskSizeGiB) * 1024 * 1024 unitNumber := int32(offset + diskIndex) disk.VirtualDevice.UnitNumber = &unitNumber diff --git a/pkg/types/vsphere/machinepool.go b/pkg/types/vsphere/machinepool.go index b3059d12f82..525ab2a8dcb 100644 --- a/pkg/types/vsphere/machinepool.go +++ b/pkg/types/vsphere/machinepool.go @@ -24,10 +24,10 @@ type MachinePool struct { // +optional OSDisk `json:"osDisk"` - // AdditionalDisks defines additional disks to add to vm that are not part of the template. + // DataDisks defines additional disks to add to vm that are not part of the template. // // +optional - AdditionalDisks []AdditionalDisks `json:"additionalDisks"` + DataDisks []DataDisks `json:"dataDisks"` // Zones defines available zones // Zones is available in TechPreview. @@ -44,12 +44,12 @@ type OSDisk struct { DiskSizeGB int32 `json:"diskSizeGB"` } -// AdditionalDisks defines the disk for a virtual machine. -type AdditionalDisks struct { - // DiskSizeGB defines the size of disk in GB. +// DataDisks defines the disk for a virtual machine. +type DataDisks struct { + // DiskSizeGiB defines the size of disk in GiB. // // +optional - DiskSizeGB int32 `json:"diskSizeGB"` + DiskSizeGiB int32 `json:"diskSizeGiB"` } // Set sets the values from `required` to `p`. @@ -78,7 +78,7 @@ func (p *MachinePool) Set(required *MachinePool) { p.Zones = required.Zones } - if len(required.AdditionalDisks) > 0 { - p.AdditionalDisks = required.AdditionalDisks + if len(required.DataDisks) > 0 { + p.DataDisks = required.DataDisks } } diff --git a/pkg/types/vsphere/validation/featuregates.go b/pkg/types/vsphere/validation/featuregates.go index 4b3e92cc2ee..5652adf15b7 100644 --- a/pkg/types/vsphere/validation/featuregates.go +++ b/pkg/types/vsphere/validation/featuregates.go @@ -48,24 +48,24 @@ func GatedFeatures(c *types.InstallConfig) []featuregates.GatedInstallConfigFeat }, { FeatureGateName: features.FeatureGateVSphereMultiDisk, - Condition: cpDef != nil && len(cpDef.AdditionalDisks) > 0, // Here we need to check disk count - Field: field.NewPath("controlPlane", "platform", "vsphere", "additionalDisks"), + Condition: cpDef != nil && len(cpDef.DataDisks) > 0, // Here we need to check disk count + Field: field.NewPath("controlPlane", "platform", "vsphere", "dataDisks"), }, { FeatureGateName: features.FeatureGateVSphereMultiDisk, - Condition: hasAdditionalDisks(computeDefs), // Here we need to check disk count - Field: field.NewPath("compute", "platform", "vsphere", "additionalDisks"), + Condition: hasDataDisks(computeDefs), // Here we need to check disk count + Field: field.NewPath("compute", "platform", "vsphere", "dataDisks"), }, } } -func hasAdditionalDisks(pool []types.MachinePool) bool { - foundAdditionalDisks := false +func hasDataDisks(pool []types.MachinePool) bool { + foundDataDisks := false for _, machine := range pool { - if machine.Platform.VSphere != nil && len(machine.Platform.VSphere.AdditionalDisks) > 0 { - foundAdditionalDisks = true + if machine.Platform.VSphere != nil && len(machine.Platform.VSphere.DataDisks) > 0 { + foundDataDisks = true break } } - return foundAdditionalDisks + return foundDataDisks } diff --git a/vendor/github.com/gobuffalo/flect/humanize.go b/vendor/github.com/gobuffalo/flect/humanize.go index 311c8beed4a..5100bfb7e75 100644 --- a/vendor/github.com/gobuffalo/flect/humanize.go +++ b/vendor/github.com/gobuffalo/flect/humanize.go @@ -7,6 +7,7 @@ import ( // Humanize returns first letter of sentence capitalized. // Common acronyms are capitalized as well. // Other capital letters in string are left as provided. +// // employee_salary = Employee salary // employee_id = employee ID // employee_mobile_number = Employee mobile number @@ -22,6 +23,10 @@ func (i Ident) Humanize() Ident { return New("") } + if strings.TrimSpace(i.Original) == "" { + return i + } + parts := xappend([]string{}, Titleize(i.Parts[0])) if len(i.Parts) > 1 { parts = xappend(parts, i.Parts[1:]...) diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md index c6c34d65dc8..7972bbc3a88 100644 --- a/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.34.2 + +Require Go 1.22+ + +### Maintenance +- bump ginkgo as well [c59c6dc] +- bump to go 1.22 - remove x/exp dependency [8158b99] + ## 1.34.1 ### Maintenance diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go index 2546ccceb0b..edacf8c13d7 100644 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.34.1" +const GOMEGA_VERSION = "1.34.2" const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. If you're using Ginkgo then you probably forgot to put your assertion in an It(). diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go index 4339acc6418..44aa61d4b33 100644 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go @@ -1,7 +1,7 @@ package bipartitegraph import ( - "golang.org/x/exp/slices" + "slices" . "github.com/onsi/gomega/matchers/support/goraph/edge" . "github.com/onsi/gomega/matchers/support/goraph/node" diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index 392d128c111..0daa62d3096 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -507,6 +507,20 @@ type AWSPlatformStatus struct { // +listType=atomic // +optional ResourceTags []AWSResourceTag `json:"resourceTags,omitempty"` + + // cloudLoadBalancerConfig holds configuration related to DNS and cloud + // load balancers. It allows configuration of in-cluster DNS as an alternative + // to the platform default DNS implementation. + // When using the ClusterHosted DNS type, Load Balancer IP addresses + // must be provided for the API and internal API load balancers as well as the + // ingress load balancer. + // + // +default={"dnsType": "PlatformDefault"} + // +kubebuilder:default={"dnsType": "PlatformDefault"} + // +openshift:enable:FeatureGate=AWSClusterHostedDNS + // +optional + // +nullable + CloudLoadBalancerConfig *CloudLoadBalancerConfig `json:"cloudLoadBalancerConfig,omitempty"` } // AWSResourceTag is a tag to apply to AWS resources created for the cluster. @@ -647,12 +661,12 @@ type GCPPlatformStatus struct { // Tombstone the field as a reminder. // ClusterHostedDNS ClusterHostedDNS `json:"clusterHostedDNS,omitempty"` - // cloudLoadBalancerConfig is a union that contains the IP addresses of API, - // API-Int and Ingress Load Balancers created on the cloud platform. These - // values would not be populated on on-prem platforms. These Load Balancer - // IPs are used to configure the in-cluster DNS instances for API, API-Int - // and Ingress services. `dnsType` is expected to be set to `ClusterHosted` - // when these Load Balancer IP addresses are populated and used. + // cloudLoadBalancerConfig holds configuration related to DNS and cloud + // load balancers. It allows configuration of in-cluster DNS as an alternative + // to the platform default DNS implementation. + // When using the ClusterHosted DNS type, Load Balancer IP addresses + // must be provided for the API and internal API load balancers as well as the + // ingress load balancer. // // +default={"dnsType": "PlatformDefault"} // +kubebuilder:default={"dnsType": "PlatformDefault"} diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index 06934699847..1b7fa44aad6 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go @@ -245,6 +245,11 @@ func (in *AWSPlatformStatus) DeepCopyInto(out *AWSPlatformStatus) { *out = make([]AWSResourceTag, len(*in)) copy(*out, *in) } + if in.CloudLoadBalancerConfig != nil { + in, out := &in.CloudLoadBalancerConfig, &out.CloudLoadBalancerConfig + *out = new(CloudLoadBalancerConfig) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml index fa5dd4e31d3..6b8dfd3f007 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml @@ -310,6 +310,7 @@ infrastructures.config.openshift.io: Capability: "" Category: "" FeatureGates: + - AWSClusterHostedDNS - BareMetalLoadBalancer - GCPClusterHostedDNS - GCPLabelsTags diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index c580bd8342e..ea3a424046c 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -1184,10 +1184,11 @@ func (AWSPlatformSpec) SwaggerDoc() map[string]string { } var map_AWSPlatformStatus = map[string]string{ - "": "AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.", - "region": "region holds the default AWS region for new AWS resources created by the cluster.", - "serviceEndpoints": "ServiceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.", - "resourceTags": "resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user.", + "": "AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.", + "region": "region holds the default AWS region for new AWS resources created by the cluster.", + "serviceEndpoints": "ServiceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.", + "resourceTags": "resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user.", + "cloudLoadBalancerConfig": "cloudLoadBalancerConfig holds configuration related to DNS and cloud load balancers. It allows configuration of in-cluster DNS as an alternative to the platform default DNS implementation. When using the ClusterHosted DNS type, Load Balancer IP addresses must be provided for the API and internal API load balancers as well as the ingress load balancer.", } func (AWSPlatformStatus) SwaggerDoc() map[string]string { @@ -1389,7 +1390,7 @@ var map_GCPPlatformStatus = map[string]string{ "region": "region holds the region for new GCP resources created for the cluster.", "resourceLabels": "resourceLabels is a list of additional labels to apply to GCP resources created for the cluster. See https://cloud.google.com/compute/docs/labeling-resources for information on labeling GCP resources. GCP supports a maximum of 64 labels per resource. OpenShift reserves 32 labels for internal use, allowing 32 labels for user configuration.", "resourceTags": "resourceTags is a list of additional tags to apply to GCP resources created for the cluster. See https://cloud.google.com/resource-manager/docs/tags/tags-overview for information on tagging GCP resources. GCP supports a maximum of 50 tags per resource.", - "cloudLoadBalancerConfig": "cloudLoadBalancerConfig is a union that contains the IP addresses of API, API-Int and Ingress Load Balancers created on the cloud platform. These values would not be populated on on-prem platforms. These Load Balancer IPs are used to configure the in-cluster DNS instances for API, API-Int and Ingress services. `dnsType` is expected to be set to `ClusterHosted` when these Load Balancer IP addresses are populated and used.", + "cloudLoadBalancerConfig": "cloudLoadBalancerConfig holds configuration related to DNS and cloud load balancers. It allows configuration of in-cluster DNS as an alternative to the platform default DNS implementation. When using the ClusterHosted DNS type, Load Balancer IP addresses must be provided for the API and internal API load balancers as well as the ingress load balancer.", } func (GCPPlatformStatus) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/features/features.go b/vendor/github.com/openshift/api/features/features.go index 2219393cd9b..39372ecc480 100644 --- a/vendor/github.com/openshift/api/features/features.go +++ b/vendor/github.com/openshift/api/features/features.go @@ -320,6 +320,13 @@ var ( enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() + FeatureGateAWSClusterHostedDNS = newFeatureGate("AWSClusterHostedDNS"). + reportProblemsToJiraComponent("Installer"). + contactPerson("barbacbd"). + productScope(ocpSpecific). + enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + mustRegister() + FeatureGateMixedCPUsAllocation = newFeatureGate("MixedCPUsAllocation"). reportProblemsToJiraComponent("NodeTuningOperator"). contactPerson("titzhak"). diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go index 387af8e564f..fe271235fe8 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go +++ b/vendor/github.com/openshift/api/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. @@ -180,12 +180,7 @@ type NetworkDeviceSpec struct { // VSphereDisk describes additional disks for vSphere. type VSphereDisk struct { - // deviceName is a name to be used to identify the disk definition. If deviceName is not specified, - // the disk will still be created. The deviceName should be unique so that it can be used to clearly - // identify purpose of the disk, but is not required to be unique. - // +optional - DeviceName string `json:"deviceName,omitempty"` - // sizeGB is the size of the disk (in GiB). + // sizeGiB is the size of the disk (in GiB). // +kubebuilder:validation:Required SizeGiB int64 `json:"sizeGiB"` } diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go index 7407adc1d03..ba9aae81e2e 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/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/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go index fa32b98da0c..0827a98d8b5 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go @@ -784,9 +784,8 @@ func (NetworkSpec) SwaggerDoc() map[string]string { } var map_VSphereDisk = map[string]string{ - "": "VSphereDisk describes additional disks for vSphere.", - "deviceName": "deviceName is a name to be used to identify the disk definition. If deviceName is not specified, the disk will still be created. The deviceName should be unique so that it can be used to clearly identify purpose of the disk, but is not required to be unique.", - "sizeGb": "sizeGB is the size of the disk (in GiB).", + "": "VSphereDisk describes additional disks for vSphere.", + "sizeGiB": "sizeGiB is the size of the disk (in GiB).", } func (VSphereDisk) SwaggerDoc() map[string]string { @@ -807,7 +806,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/vendor/github.com/openshift/api/machineconfiguration/v1/types.go b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go index 574c90035a6..01644fcf778 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/types.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go @@ -196,7 +196,8 @@ type ControllerConfigStatus struct { ObservedGeneration int64 `json:"observedGeneration,omitempty"` // conditions represents the latest available observations of current state. - // +listType=atomic + // +listType=map + // +listMapKey=type // +optional Conditions []ControllerConfigStatusCondition `json:"conditions"` diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index c2cac2c544d..0766b10691c 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -28,6 +28,7 @@ controllerconfigs.machineconfiguration.openshift.io: Capability: "" Category: "" FeatureGates: + - AWSClusterHostedDNS - BareMetalLoadBalancer - GCPClusterHostedDNS - GCPLabelsTags diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go index eeb8afdc6d2..8d6f4b7484f 100644 --- a/vendor/github.com/openshift/api/operator/v1/types.go +++ b/vendor/github.com/openshift/api/operator/v1/types.go @@ -178,12 +178,34 @@ var ( // OperatorCondition is just the standard condition fields. type OperatorCondition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required // +kubebuilder:validation:Required - Type string `json:"type"` - Status ConditionStatus `json:"status"` - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` - Reason string `json:"reason,omitempty"` - Message string `json:"message,omitempty"` + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type" protobuf:"bytes,1,opt,name=type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + + Reason string `json:"reason,omitempty"` + + Message string `json:"message,omitempty"` } type ConditionStatus string diff --git a/vendor/github.com/openshift/api/operator/v1/types_ingress.go b/vendor/github.com/openshift/api/operator/v1/types_ingress.go index 7ae22ee0a7c..1f566434564 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/operator/v1/types_ingress.go @@ -392,6 +392,7 @@ type CIDR string // LoadBalancerStrategy holds parameters for a load balancer. // +openshift:validation:FeatureGateAwareXValidation:featureGate=SetEIPForNLBIngressController,rule="!has(self.scope) || self.scope != 'Internal' || !has(self.providerParameters) || !has(self.providerParameters.aws) || !has(self.providerParameters.aws.networkLoadBalancer) || !has(self.providerParameters.aws.networkLoadBalancer.eipAllocations)",message="eipAllocations are forbidden when the scope is Internal." +// +kubebuilder:validation:XValidation:rule=`!has(self.scope) || self.scope != 'Internal' || !has(self.providerParameters) || !has(self.providerParameters.openstack) || !has(self.providerParameters.openstack.floatingIP) || self.providerParameters.openstack.floatingIP == ""`,message="cannot specify a floating ip when scope is internal" type LoadBalancerStrategy struct { // scope indicates the scope at which the load balancer is exposed. // Possible values are "External" and "Internal". @@ -678,19 +679,28 @@ type IBMLoadBalancerParameters struct { // OpenStackLoadBalancerParameters provides configuration settings that are // specific to OpenStack load balancers. type OpenStackLoadBalancerParameters struct { - // loadBalancerIP specifies the floating IP address that the load balancer will use. + // loadBalancerIP is tombstoned since the field was replaced by floatingIP. + // LoadBalancerIP string `json:"loadBalancerIP,omitempty"` + + // floatingIP specifies the IP address that the load balancer will use. // When not specified, an IP address will be assigned randomly by the OpenStack cloud provider. + // When specified, the floating IP has to be pre-created. If the + // specified value is not a floating IP or is already claimed, the + // OpenStack cloud provider won't be able to provision the load + // balancer. + // This field may only be used if the IngressController has External scope. // This value must be a valid IPv4 or IPv6 address. // + --- - // + Note: this field is meant to be set by the ingress controller to populate the - // + `Service.Spec.LoadBalancerIP` field which has been deprecated in Kubernetes: + // + Note: this field is meant to be set by the ingress controller + // + to populate the `Service.Spec.LoadBalancerIP` field which has been + // + deprecated in Kubernetes: // + https://github.com/kubernetes/kubernetes/pull/107235 // + However, the field is still used by cloud-provider-openstack to reconcile - // + the floating IP that we attach to the load balancer. + // + the floating IP that we attach to the external load balancer. // - // +kubebuilder:validation:XValidation:rule="isIP(self)",message="loadBalancerIP must be a valid IPv4 or IPv6 address" + // +kubebuilder:validation:XValidation:rule="isIP(self)",message="floatingIP must be a valid IPv4 or IPv6 address" // +optional - LoadBalancerIP string `json:"loadBalancerIP,omitempty"` + FloatingIP string `json:"floatingIP,omitempty"` } // AWSClassicLoadBalancerParameters holds configuration parameters for an diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go index a3a78a89b7c..03d9e16edbb 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go @@ -52,7 +52,10 @@ func (NodeStatus) SwaggerDoc() map[string]string { } var map_OperatorCondition = map[string]string{ - "": "OperatorCondition is just the standard condition fields.", + "": "OperatorCondition is just the standard condition fields.", + "type": "type of condition in CamelCase or in foo.example.com/CamelCase.", + "status": "status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", } func (OperatorCondition) SwaggerDoc() map[string]string { @@ -1122,8 +1125,8 @@ func (NodePortStrategy) SwaggerDoc() map[string]string { } var map_OpenStackLoadBalancerParameters = map[string]string{ - "": "OpenStackLoadBalancerParameters provides configuration settings that are specific to OpenStack load balancers.", - "loadBalancerIP": "loadBalancerIP specifies the floating IP address that the load balancer will use. When not specified, an IP address will be assigned randomly by the OpenStack cloud provider. This value must be a valid IPv4 or IPv6 address. ", + "": "OpenStackLoadBalancerParameters provides configuration settings that are specific to OpenStack load balancers.", + "floatingIP": "floatingIP specifies the IP address that the load balancer will use. When not specified, an IP address will be assigned randomly by the OpenStack cloud provider. When specified, the floating IP has to be pre-created. If the specified value is not a floating IP or is already claimed, the OpenStack cloud provider won't be able to provision the load balancer. This field may only be used if the IngressController has External scope. This value must be a valid IPv4 or IPv6 address. ", } func (OpenStackLoadBalancerParameters) SwaggerDoc() map[string]string { diff --git a/vendor/golang.org/x/oauth2/LICENSE b/vendor/golang.org/x/oauth2/LICENSE index 6a66aea5eaf..2a7cf70da6e 100644 --- a/vendor/golang.org/x/oauth2/LICENSE +++ b/vendor/golang.org/x/oauth2/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go index 5bbb3321748..109997d77ce 100644 --- a/vendor/golang.org/x/oauth2/token.go +++ b/vendor/golang.org/x/oauth2/token.go @@ -49,6 +49,13 @@ type Token struct { // mechanisms for that TokenSource will not be used. Expiry time.Time `json:"expiry,omitempty"` + // ExpiresIn is the OAuth2 wire format "expires_in" field, + // which specifies how many seconds later the token expires, + // relative to an unknown time base approximately around "now". + // It is the application's responsibility to populate + // `Expiry` from `ExpiresIn` when required. + ExpiresIn int64 `json:"expires_in,omitempty"` + // raw optionally contains extra metadata from the server // when updating a token. raw interface{} diff --git a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go index b92e8e6eb32..f6cb37c5c3d 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go @@ -21,7 +21,7 @@ import ( // export data. type PkgDecoder struct { // version is the file format version. - version uint32 + version Version // sync indicates whether the file uses sync markers. sync bool @@ -68,8 +68,6 @@ func (pr *PkgDecoder) SyncMarkers() bool { return pr.sync } // NewPkgDecoder returns a PkgDecoder initialized to read the Unified // IR export data from input. pkgPath is the package path for the // compilation unit that produced the export data. -// -// TODO(mdempsky): Remove pkgPath parameter; unneeded since CL 391014. func NewPkgDecoder(pkgPath, input string) PkgDecoder { pr := PkgDecoder{ pkgPath: pkgPath, @@ -80,14 +78,15 @@ func NewPkgDecoder(pkgPath, input string) PkgDecoder { r := strings.NewReader(input) - assert(binary.Read(r, binary.LittleEndian, &pr.version) == nil) + var ver uint32 + assert(binary.Read(r, binary.LittleEndian, &ver) == nil) + pr.version = Version(ver) - switch pr.version { - default: - panic(fmt.Errorf("unsupported version: %v", pr.version)) - case 0: - // no flags - case 1: + if pr.version >= numVersions { + panic(fmt.Errorf("cannot decode %q, export data version %d is greater than maximum supported version %d", pkgPath, pr.version, numVersions-1)) + } + + if pr.version.Has(Flags) { var flags uint32 assert(binary.Read(r, binary.LittleEndian, &flags) == nil) pr.sync = flags&flagSyncMarkers != 0 @@ -102,7 +101,9 @@ func NewPkgDecoder(pkgPath, input string) PkgDecoder { assert(err == nil) pr.elemData = input[pos:] - assert(len(pr.elemData)-8 == int(pr.elemEnds[len(pr.elemEnds)-1])) + + const fingerprintSize = 8 + assert(len(pr.elemData)-fingerprintSize == int(pr.elemEnds[len(pr.elemEnds)-1])) return pr } @@ -136,7 +137,7 @@ func (pr *PkgDecoder) AbsIdx(k RelocKind, idx Index) int { absIdx += int(pr.elemEndsEnds[k-1]) } if absIdx >= int(pr.elemEndsEnds[k]) { - errorf("%v:%v is out of bounds; %v", k, idx, pr.elemEndsEnds) + panicf("%v:%v is out of bounds; %v", k, idx, pr.elemEndsEnds) } return absIdx } @@ -193,9 +194,7 @@ func (pr *PkgDecoder) NewDecoderRaw(k RelocKind, idx Index) Decoder { Idx: idx, } - // TODO(mdempsky) r.data.Reset(...) after #44505 is resolved. - r.Data = *strings.NewReader(pr.DataIdx(k, idx)) - + r.Data.Reset(pr.DataIdx(k, idx)) r.Sync(SyncRelocs) r.Relocs = make([]RelocEnt, r.Len()) for i := range r.Relocs { @@ -244,7 +243,7 @@ type Decoder struct { func (r *Decoder) checkErr(err error) { if err != nil { - errorf("unexpected decoding error: %w", err) + panicf("unexpected decoding error: %w", err) } } @@ -515,3 +514,6 @@ func (pr *PkgDecoder) PeekObj(idx Index) (string, string, CodeObj) { return path, name, tag } + +// Version reports the version of the bitstream. +func (w *Decoder) Version() Version { return w.common.version } diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go index a928acf29fa..cdaac9ab34d 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -951,7 +951,7 @@ var PackageSymbols = map[string][]Symbol{ {"ParseSessionState", Func, 21}, {"QUICClient", Func, 21}, {"QUICConfig", Type, 21}, - {"QUICConfig.EnableStoreSessionEvent", Field, 23}, + {"QUICConfig.EnableSessionEvents", Field, 23}, {"QUICConfig.TLSConfig", Field, 21}, {"QUICConn", Type, 21}, {"QUICEncryptionLevel", Type, 21}, diff --git a/vendor/k8s.io/api/resource/v1alpha3/doc.go b/vendor/k8s.io/api/resource/v1alpha3/doc.go index 29916eeb816..aeb66561fb8 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/doc.go +++ b/vendor/k8s.io/api/resource/v1alpha3/doc.go @@ -1,9 +1,5 @@ /* -<<<<<<<< HEAD:vendor/k8s.io/api/resource/v1alpha3/doc.go Copyright 2022 The Kubernetes Authors. -======== -Copyright 2016 The Kubernetes Authors. ->>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -18,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -<<<<<<<< HEAD:vendor/k8s.io/api/resource/v1alpha3/doc.go // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package @@ -27,13 +22,3 @@ limitations under the License. // Package v1alpha3 is the v1alpha3 version of the resource API. package v1alpha3 // import "k8s.io/api/resource/v1alpha3" -======== -package portforward - -const ( - PortForwardV1Name = "portforward.k8s.io" - WebsocketsSPDYTunnelingPrefix = "SPDY/3.1+" - KubernetesSuffix = ".k8s.io" - WebsocketsSPDYTunnelingPortForwardV1 = WebsocketsSPDYTunnelingPrefix + PortForwardV1Name -) ->>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go index 459ee337b72..2dc2f30cfc4 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go @@ -18,8 +18,4 @@ limitations under the License. package v1alpha1 -<<<<<<<< HEAD:vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go type LeaseCandidateExpansion interface{} -======== -type StorageVersionMigrationExpansion interface{} ->>>>>>>> 4e32654a50 (Changed logic to use CAPI for data disks):cluster-api/providers/vsphere/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go diff --git a/vendor/modules.txt b/vendor/modules.txt index 062d5bf9ac9..1f730f5496e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -647,7 +647,7 @@ github.com/go-playground/universal-translator # github.com/go-playground/validator/v10 v10.19.0 ## explicit; go 1.18 github.com/go-playground/validator/v10 -# github.com/gobuffalo/flect v1.0.2 +# github.com/gobuffalo/flect v1.0.3 ## explicit; go 1.16 github.com/gobuffalo/flect # github.com/gofrs/uuid/v5 v5.2.0 @@ -1055,8 +1055,8 @@ github.com/nutanix-cloud-native/prism-go-client/v3 # github.com/oklog/ulid v1.3.1 ## explicit github.com/oklog/ulid -# github.com/onsi/gomega v1.34.1 -## explicit; go 1.20 +# github.com/onsi/gomega v1.34.2 +## explicit; go 1.22 github.com/onsi/gomega github.com/onsi/gomega/format github.com/onsi/gomega/internal @@ -1077,7 +1077,7 @@ github.com/opencontainers/image-spec/specs-go/v1 # github.com/opencontainers/runtime-spec v1.2.0 ## explicit github.com/opencontainers/runtime-spec/specs-go -# github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 +# github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f => github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491 ## explicit; go 1.22.0 github.com/openshift/api/annotations github.com/openshift/api/config/v1 @@ -1493,8 +1493,8 @@ golang.org/x/crypto/ssh/knownhosts golang.org/x/exp/constraints golang.org/x/exp/maps golang.org/x/exp/slices -# golang.org/x/mod v0.20.0 -## explicit; go 1.18 +# golang.org/x/mod v0.21.0 +## explicit; go 1.22.0 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/modfile golang.org/x/mod/module @@ -1513,7 +1513,7 @@ golang.org/x/net/internal/timeseries golang.org/x/net/proxy golang.org/x/net/trace golang.org/x/net/websocket -# golang.org/x/oauth2 v0.21.0 +# golang.org/x/oauth2 v0.23.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/authhandler @@ -1567,8 +1567,8 @@ golang.org/x/text/width # golang.org/x/time v0.5.0 ## explicit; go 1.18 golang.org/x/time/rate -# golang.org/x/tools v0.24.0 -## explicit; go 1.19 +# golang.org/x/tools v0.25.0 +## explicit; go 1.22.0 golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/gcexportdata golang.org/x/tools/go/packages @@ -1841,7 +1841,7 @@ k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 k8s.io/api/storagemigration/v1alpha1 -# k8s.io/apiextensions-apiserver v0.31.0 +# k8s.io/apiextensions-apiserver v0.31.1 ## explicit; go 1.22.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 @@ -2274,7 +2274,7 @@ k8s.io/client-go/util/workqueue # k8s.io/cloud-provider-vsphere v1.31.0 => github.com/openshift/cloud-provider-vsphere v1.19.1-0.20240626105621-6464d0bb4928 ## explicit; go 1.22.0 k8s.io/cloud-provider-vsphere/pkg/common/config -# k8s.io/cluster-bootstrap v0.30.3 +# k8s.io/cluster-bootstrap v0.31.1 ## explicit; go 1.22.0 k8s.io/cluster-bootstrap/token/api k8s.io/cluster-bootstrap/token/util @@ -2380,7 +2380,7 @@ sigs.k8s.io/cluster-api-provider-ibmcloud/util ## explicit; go 1.22 sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional -# sigs.k8s.io/cluster-api-provider-vsphere v1.11.1 +# sigs.k8s.io/cluster-api-provider-vsphere v1.11.1 => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e ## explicit; go 1.22.0 sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1 sigs.k8s.io/cluster-api-provider-vsphere/pkg/session @@ -2557,4 +2557,5 @@ sigs.k8s.io/yaml/goyaml.v3 # github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20241001055825-63e8b0d3ad63 # github.com/containerd/containerd => github.com/containerd/containerd v1.6.26 # github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 -# github.com/openshift/api => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 +# github.com/openshift/api => github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491 +# sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e diff --git a/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go b/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go index e7b758df740..d10e60fb4a3 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go @@ -210,11 +210,6 @@ type VirtualMachineCloneSpec struct { // VSphereDisk describes additional disks for vSphere to be added to VM that are not part of the VM OVA template. type VSphereDisk struct { - // DeviceName is a name to be used to identify the disk definition. If deviceName is not specified, - // the disk will still be created. The deviceName should be unique so that it can be used to clearly - // identify purpose of the disk, but is not required to be unique. - // +optional - DeviceName string `json:"deviceName,omitempty"` // SizeGiB is the size of the disk (in GiB). // +kubebuilder:validation:Required SizeGiB int64 `json:"sizeGiB"` @@ -294,8 +289,8 @@ type PCIDeviceSpec struct { // NetworkSpec defines the virtual machine's network configuration. type NetworkSpec struct { // Devices is the list of network devices used by the virtual machine. - // TODO(akutz) Make sure at least one network matches the - // ClusterSpec.CloudProviderConfiguration.Network.Name + // + // TODO(akutz) Make sure at least one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name Devices []NetworkDeviceSpec `json:"devices"` // Routes is a list of optional, static routes applied to the virtual diff --git a/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/zz_generated.deepcopy.go index 44d12a65fe4..584c92f93c7 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/zz_generated.deepcopy.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/zz_generated.deepcopy.go @@ -820,6 +820,21 @@ func (in *VSphereDeploymentZoneStatus) DeepCopy() *VSphereDeploymentZoneStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VSphereDisk) DeepCopyInto(out *VSphereDisk) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDisk. +func (in *VSphereDisk) DeepCopy() *VSphereDisk { + if in == nil { + return nil + } + out := new(VSphereDisk) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VSphereFailureDomain) DeepCopyInto(out *VSphereFailureDomain) { *out = *in @@ -1321,6 +1336,11 @@ func (in *VirtualMachineCloneSpec) DeepCopyInto(out *VirtualMachineCloneSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DataDisks != nil { + in, out := &in.DataDisks, &out.DataDisks + *out = make([]VSphereDisk, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineCloneSpec. From 2515e511e207234e4b70fcd5666750aa7e1b7ecb Mon Sep 17 00:00:00 2001 From: vr4manta Date: Fri, 18 Oct 2024 14:50:35 -0400 Subject: [PATCH 6/7] Removed unused method --- .../vsphere/clusterapi/clusterapi.go | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go index 93d52e5f996..117f498cc9a 100644 --- a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go +++ b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go @@ -2,12 +2,10 @@ package clusterapi import ( "context" - "errors" "fmt" "path" "strings" - "github.com/sirupsen/logrus" "github.com/vmware/govmomi/object" "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" "sigs.k8s.io/cluster-api-provider-vsphere/pkg/session" @@ -158,58 +156,3 @@ func downloadImage(installConfig *installconfig.InstallConfig) bool { } return false } - -func addDataDisks(ctx context.Context, machine *v1beta1.VSphereMachine, pool *vsphere.MachinePool, session *session.Session) error { - logrus.Debugf("Getting vm %v", machine.Name) - vm, err := session.Finder.VirtualMachine(ctx, fmt.Sprintf("%s/%s", machine.Spec.Folder, machine.Name)) - offset := 1 // For now, we assume only one disk is current attached to VM. - - if err != nil { - return err - } - - logrus.Debugf("Getting VM devices") - devices, err := vm.Device(ctx) - if err != nil { - return err - } - - logrus.Debugf("Getting datastore %v", machine.Spec.Datastore) - ds, err := session.Finder.Datastore(ctx, machine.Spec.Datastore) - if err != nil { - return err - } - - // For now, we only do the active scsi controller - logrus.Debug("Getting scsi controller") - controller, err := devices.FindSCSIController("") - if err != nil { - return err - } - - for diskIndex, newDisk := range pool.DataDisks { - logrus.Debugf("Attempting to add disk %d with size %dGiB", diskIndex, newDisk.DiskSizeGiB) - - disk := devices.CreateDisk(controller, ds.Reference(), "") - - existing := devices.SelectByBackingInfo(disk.Backing) - - if len(existing) > 0 { - logrus.Warningf("Disk already present for index %d", diskIndex) - return errors.New("disk already present") - } - - disk.CapacityInKB = int64(newDisk.DiskSizeGiB) * 1024 * 1024 - unitNumber := int32(offset + diskIndex) - disk.VirtualDevice.UnitNumber = &unitNumber - - // Add disk using default profile of VM. - logrus.Infof("Adding disk device to vm %s", machine.Name) - err = vm.AddDevice(ctx, disk) - if err != nil { - return err - } - } - - return nil -} From 08078fe7ac4ac5144a2a98127bc25aecb5acbf13 Mon Sep 17 00:00:00 2001 From: vr4manta Date: Thu, 7 Nov 2024 08:18:16 -0500 Subject: [PATCH 7/7] Rebased and vendor updates --- go.mod | 6 +- go.sum | 8 +- pkg/asset/machines/vsphere/machines.go | 2 +- .../openshift/api/config/v1/types_node.go | 19 +++ ..._generated.featuregated-crd-manifests.yaml | 3 +- .../v1/zz_generated.swagger_doc_generated.go | 5 +- .../v1alpha1/types_cluster_image_policy.go | 1 + .../api/config/v1alpha1/types_image_policy.go | 1 + .../zz_generated.swagger_doc_generated.go | 4 +- .../openshift/api/features/features.go | 109 ++++++++++++++- .../api/features/legacyfeaturegates.go | 129 ++++++++++++++++++ .../github.com/openshift/api/features/util.go | 31 +++++ .../machine/v1beta1/types_vsphereprovider.go | 7 +- .../zz_generated.swagger_doc_generated.go | 1 + .../openshift/api/operator/v1/types.go | 10 ++ vendor/modules.txt | 8 +- .../apis/v1beta1/types.go | 13 +- 17 files changed, 327 insertions(+), 30 deletions(-) create mode 100644 vendor/github.com/openshift/api/features/legacyfeaturegates.go diff --git a/go.mod b/go.mod index 5d92760a6a3..c2535ca4c74 100644 --- a/go.mod +++ b/go.mod @@ -330,9 +330,7 @@ replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.c //replace k8s.io/api => k8s.io/api v0.30.5 // github.com/vr4manta/api@vsphere_disk -replace github.com/openshift/api => github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491 - -//replace github.com/openshift/api => github.com/vr4manta/api v0.0.0-20240924150740-ec5392903387 +replace github.com/openshift/api => github.com/vr4manta/api v0.0.0-20241105193347-78abbaa0e66f // github.com/vr4manta/cluster-api-provider-vsphere@multi_disk -replace sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e +replace sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241104145417-f11b363c5760 diff --git a/go.sum b/go.sum index 0e44266754f..91c9b6f6a8b 100644 --- a/go.sum +++ b/go.sum @@ -928,10 +928,10 @@ github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/govmomi v0.43.0 h1:7Kg3Bkdly+TrE67BYXzRq7ZrDnn7xqpKX95uEh2f9Go= github.com/vmware/govmomi v0.43.0/go.mod h1:IOv5nTXCPqH9qVJAlRuAGffogaLsNs8aF+e7vLgsHJU= -github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491 h1:y5rPWGT+4crYj5P3whPZIjReT1NYk/4gAvB60AlgI6k= -github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= -github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e h1:SujnNpUXXymTABi5hP83tb3eiEJXBXUiLxxptigsXkA= -github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e/go.mod h1:ZlRvroJDwXiQIgUfCP5ldHysETeH/1KvEZx+Vj+Q+Qg= +github.com/vr4manta/api v0.0.0-20241105193347-78abbaa0e66f h1:etN5d8gLWTP++fkuowZsdLLpZNh1W//siymSrZu1WuY= +github.com/vr4manta/api v0.0.0-20241105193347-78abbaa0e66f/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241104145417-f11b363c5760 h1:/8JyeyM0lXXjgwn82Qw+/SW+Pc/QIbRQSHMQhUWaICc= +github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241104145417-f11b363c5760/go.mod h1:ZlRvroJDwXiQIgUfCP5ldHysETeH/1KvEZx+Vj+Q+Qg= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= diff --git a/pkg/asset/machines/vsphere/machines.go b/pkg/asset/machines/vsphere/machines.go index 36c3fd2cc5c..c642c2a04c5 100644 --- a/pkg/asset/machines/vsphere/machines.go +++ b/pkg/asset/machines/vsphere/machines.go @@ -338,7 +338,7 @@ func provider(clusterID string, vcenter *vsphere.VCenter, failureDomain vsphere. dataDisks := []machineapi.VSphereDisk{} for _, curDisk := range mpool.DataDisks { newDisk := machineapi.VSphereDisk{ - SizeGiB: int64(curDisk.DiskSizeGiB), + SizeGiB: curDisk.DiskSizeGiB, } dataDisks = append(dataDisks, newDisk) } diff --git a/vendor/github.com/openshift/api/config/v1/types_node.go b/vendor/github.com/openshift/api/config/v1/types_node.go index b3b1b62c4df..a50328c91f6 100644 --- a/vendor/github.com/openshift/api/config/v1/types_node.go +++ b/vendor/github.com/openshift/api/config/v1/types_node.go @@ -46,6 +46,25 @@ type NodeSpec struct { // the status and corresponding reaction of the cluster // +optional WorkerLatencyProfile WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` + + // minimumKubeletVersion is the lowest version of a kubelet that can join the cluster. + // Specifically, the apiserver will deny most authorization requests of kubelets that are older + // than the specified version, only allowing the kubelet to get and update its node object, and perform + // subjectaccessreviews. + // This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads, + // and will eventually be marked as not ready. + // Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99". + // Since the kubelet reports the version of the kubernetes release, not Openshift, this field references + // the underlying kubernetes version this version of Openshift is based off of. + // In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then + // they should set the minimumKubeletVersion to 1.30.0. + // When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version. + // Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier. + // +kubebuilder:validation:XValidation:rule="self == \"\" || self.matches('^[0-9]*.[0-9]*.[0-9]*$')",message="minmumKubeletVersion must be in a semver compatible format of x.y.z, or empty" + // +kubebuilder:validation:MaxLength:=8 + // +openshift:enable:FeatureGate=MinimumKubeletVersion + // +optional + MinimumKubeletVersion string `json:"minimumKubeletVersion"` } type NodeStatus struct { diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml index 6b8dfd3f007..abfea5eaf0e 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml @@ -383,7 +383,8 @@ nodes.config.openshift.io: CRDName: nodes.config.openshift.io Capability: "" Category: "" - FeatureGates: [] + FeatureGates: + - MinimumKubeletVersion FilenameOperatorName: config-operator FilenameOperatorOrdering: "01" FilenameRunLevel: "0000_10" diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index ea3a424046c..145a7e4c041 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -2088,8 +2088,9 @@ func (NodeList) SwaggerDoc() map[string]string { } var map_NodeSpec = map[string]string{ - "cgroupMode": "CgroupMode determines the cgroups version on the node", - "workerLatencyProfile": "WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster", + "cgroupMode": "CgroupMode determines the cgroups version on the node", + "workerLatencyProfile": "WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster", + "minimumKubeletVersion": "minimumKubeletVersion is the lowest version of a kubelet that can join the cluster. Specifically, the apiserver will deny most authorization requests of kubelets that are older than the specified version, only allowing the kubelet to get and update its node object, and perform subjectaccessreviews. This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads, and will eventually be marked as not ready. Its max length is 8, so maximum version allowed is either \"9.999.99\" or \"99.99.99\". Since the kubelet reports the version of the kubernetes release, not Openshift, this field references the underlying kubernetes version this version of Openshift is based off of. In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then they should set the minimumKubeletVersion to 1.30.0. When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version. Thus, a kubelet with version \"1.0.0-ec.0\" will be compatible with minimumKubeletVersion \"1.0.0\" or earlier.", } func (NodeSpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_image_policy.go b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_image_policy.go index e3670f03e89..14650fd48f4 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_image_policy.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_image_policy.go @@ -41,6 +41,7 @@ type ClusterImagePolicySpec struct { // If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored. // In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories // quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation. + // If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied. // For additional details about the format, please refer to the document explaining the docker transport field, // which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker // +kubebuilder:validation:Required diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_image_policy.go b/vendor/github.com/openshift/api/config/v1alpha1/types_image_policy.go index 7031110ff1e..a177ddb0d66 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_image_policy.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/types_image_policy.go @@ -40,6 +40,7 @@ type ImagePolicySpec struct { // If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored. // In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories // quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation. + // If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied. // For additional details about the format, please refer to the document explaining the docker transport field, // which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker // +kubebuilder:validation:Required diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go index 9da086efc56..55468f38dac 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go @@ -102,7 +102,7 @@ func (ClusterImagePolicyList) SwaggerDoc() map[string]string { var map_ClusterImagePolicySpec = map[string]string{ "": "CLusterImagePolicySpec is the specification of the ClusterImagePolicy custom resource.", - "scopes": "scopes defines the list of image identities assigned to a policy. Each item refers to a scope in a registry implementing the \"Docker Registry HTTP API V2\". Scopes matching individual images are named Docker references in the fully expanded form, either using a tag or digest. For example, docker.io/library/busybox:latest (not busybox:latest). More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository namespace, or a registry host (by only specifying the host name and possibly a port number) or a wildcard expression starting with `*.`, for matching all subdomains (not including a port number). Wildcards are only supported for subdomain matching, and may not be used in the middle of the host, i.e. *.example.com is a valid case, but example*.*.com is not. If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored. In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation. For additional details about the format, please refer to the document explaining the docker transport field, which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker", + "scopes": "scopes defines the list of image identities assigned to a policy. Each item refers to a scope in a registry implementing the \"Docker Registry HTTP API V2\". Scopes matching individual images are named Docker references in the fully expanded form, either using a tag or digest. For example, docker.io/library/busybox:latest (not busybox:latest). More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository namespace, or a registry host (by only specifying the host name and possibly a port number) or a wildcard expression starting with `*.`, for matching all subdomains (not including a port number). Wildcards are only supported for subdomain matching, and may not be used in the middle of the host, i.e. *.example.com is a valid case, but example*.*.com is not. If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored. In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation. If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied. For additional details about the format, please refer to the document explaining the docker transport field, which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker", "policy": "policy contains configuration to allow scopes to be verified, and defines how images not matching the verification policy will be treated.", } @@ -151,7 +151,7 @@ func (ImagePolicyList) SwaggerDoc() map[string]string { var map_ImagePolicySpec = map[string]string{ "": "ImagePolicySpec is the specification of the ImagePolicy CRD.", - "scopes": "scopes defines the list of image identities assigned to a policy. Each item refers to a scope in a registry implementing the \"Docker Registry HTTP API V2\". Scopes matching individual images are named Docker references in the fully expanded form, either using a tag or digest. For example, docker.io/library/busybox:latest (not busybox:latest). More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository namespace, or a registry host (by only specifying the host name and possibly a port number) or a wildcard expression starting with `*.`, for matching all subdomains (not including a port number). Wildcards are only supported for subdomain matching, and may not be used in the middle of the host, i.e. *.example.com is a valid case, but example*.*.com is not. If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored. In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation. For additional details about the format, please refer to the document explaining the docker transport field, which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker", + "scopes": "scopes defines the list of image identities assigned to a policy. Each item refers to a scope in a registry implementing the \"Docker Registry HTTP API V2\". Scopes matching individual images are named Docker references in the fully expanded form, either using a tag or digest. For example, docker.io/library/busybox:latest (not busybox:latest). More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository namespace, or a registry host (by only specifying the host name and possibly a port number) or a wildcard expression starting with `*.`, for matching all subdomains (not including a port number). Wildcards are only supported for subdomain matching, and may not be used in the middle of the host, i.e. *.example.com is a valid case, but example*.*.com is not. If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored. In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation. If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied. For additional details about the format, please refer to the document explaining the docker transport field, which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker", "policy": "policy contains configuration to allow scopes to be verified, and defines how images not matching the verification policy will be treated.", } diff --git a/vendor/github.com/openshift/api/features/features.go b/vendor/github.com/openshift/api/features/features.go index 39372ecc480..7810502992f 100644 --- a/vendor/github.com/openshift/api/features/features.go +++ b/vendor/github.com/openshift/api/features/features.go @@ -40,6 +40,7 @@ var ( reportProblemsToJiraComponent("apiserver-auth"). contactPerson("stlaz"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/4193"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -47,6 +48,7 @@ var ( reportProblemsToJiraComponent("kube-apiserver"). contactPerson("benluddy"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/3488"). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -54,6 +56,7 @@ var ( reportProblemsToJiraComponent("Routing"). contactPerson("miciah"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade). mustRegister() @@ -61,6 +64,7 @@ var ( reportProblemsToJiraComponent("Networking / router"). contactPerson("miheer"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -68,6 +72,7 @@ var ( reportProblemsToJiraComponent("auth"). contactPerson("ibihim"). productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/899"). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -75,6 +80,7 @@ var ( reportProblemsToJiraComponent("builds"). contactPerson("adkaplan"). productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1056"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -82,6 +88,7 @@ var ( reportProblemsToJiraComponent("builds"). contactPerson("adkaplan"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -89,6 +96,7 @@ var ( reportProblemsToJiraComponent("node"). contactPerson("ehashman"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/2400"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -96,6 +104,7 @@ var ( reportProblemsToJiraComponent("openstack"). contactPerson("egarcia"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -103,6 +112,7 @@ var ( reportProblemsToJiraComponent("insights"). contactPerson("tremes"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -110,6 +120,7 @@ var ( reportProblemsToJiraComponent("insights"). contactPerson("jmesnil"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -117,6 +128,7 @@ var ( reportProblemsToJiraComponent("scheduling"). contactPerson("jchaloup"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/4381"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -124,6 +136,7 @@ var ( reportProblemsToJiraComponent("cloud-credential-operator"). contactPerson("abutcher"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -131,6 +144,7 @@ var ( reportProblemsToJiraComponent("apps"). contactPerson("atiratree"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/961"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -138,12 +152,14 @@ var ( reportProblemsToJiraComponent("node"). contactPerson("sairameshv"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/3386"). mustRegister() FeatureGatePrivateHostedZoneAWS = newFeatureGate("PrivateHostedZoneAWS"). reportProblemsToJiraComponent("Routing"). contactPerson("miciah"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -151,6 +167,7 @@ var ( reportProblemsToJiraComponent("node"). contactPerson("sgrunert"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -158,6 +175,7 @@ var ( reportProblemsToJiraComponent("Installer"). contactPerson("bhb"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -165,6 +183,7 @@ var ( reportProblemsToJiraComponent("cloud-provider"). contactPerson("jspeed"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -172,6 +191,7 @@ var ( reportProblemsToJiraComponent("machine-config-operator/platform-baremetal"). contactPerson("mkowalsk"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/3705"). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -179,6 +199,7 @@ var ( reportProblemsToJiraComponent("splat"). contactPerson("vr4manta"). productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1709"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -186,6 +207,7 @@ var ( reportProblemsToJiraComponent("splat"). contactPerson("vr4manta"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -193,6 +215,7 @@ var ( reportProblemsToJiraComponent("splat"). contactPerson("rvanderp3"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -200,6 +223,7 @@ var ( reportProblemsToJiraComponent("router"). contactPerson("thejasn"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -207,6 +231,7 @@ var ( reportProblemsToJiraComponent("Networking/ovn-kubernetes"). contactPerson("tssurya"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -214,6 +239,7 @@ var ( reportProblemsToJiraComponent("Networking/ovn-kubernetes"). contactPerson("tssurya"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -221,6 +247,7 @@ var ( reportProblemsToJiraComponent("Networking/cluster-network-operator"). contactPerson("jcaamano"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -228,6 +255,7 @@ var ( reportProblemsToJiraComponent("Networking/ovn-kubernetes"). contactPerson("jcaamano"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -235,6 +263,7 @@ var ( reportProblemsToJiraComponent("Networking/ovn-kubernetes"). contactPerson("pliu"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -242,6 +271,7 @@ var ( reportProblemsToJiraComponent("Networking/cluster-network-operator"). contactPerson("kyrtapz"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -249,6 +279,7 @@ var ( reportProblemsToJiraComponent("Networking"). contactPerson("npinaeva"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -256,6 +287,7 @@ var ( reportProblemsToJiraComponent("etcd"). contactPerson("hasbro17"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -263,6 +295,7 @@ var ( reportProblemsToJiraComponent("etcd"). contactPerson("hasbro17"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -270,6 +303,7 @@ var ( reportProblemsToJiraComponent("etcd"). contactPerson("hasbro17"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -277,12 +311,14 @@ var ( reportProblemsToJiraComponent("ecoproject"). contactPerson("msluiter"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). mustRegister() FeatureGateDNSNameResolver = newFeatureGate("DNSNameResolver"). reportProblemsToJiraComponent("dns"). contactPerson("miciah"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -290,6 +326,7 @@ var ( reportProblemsToJiraComponent("splat"). contactPerson("rvanderp3"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -297,6 +334,7 @@ var ( reportProblemsToJiraComponent("MachineConfigOperator"). contactPerson("cdoern"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -304,19 +342,14 @@ var ( reportProblemsToJiraComponent("Installer"). contactPerson("vincepri"). productScope(ocpSpecific). - mustRegister() - - FeatureGateMetricsServer = newFeatureGate("MetricsServer"). - reportProblemsToJiraComponent("Monitoring"). - contactPerson("slashpai"). - productScope(ocpSpecific). - enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + enhancementPR(legacyFeatureGateWithoutEnhancement). mustRegister() FeatureGateGCPClusterHostedDNS = newFeatureGate("GCPClusterHostedDNS"). reportProblemsToJiraComponent("Installer"). contactPerson("barbacbd"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -324,6 +357,7 @@ var ( reportProblemsToJiraComponent("Installer"). contactPerson("barbacbd"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -331,6 +365,7 @@ var ( reportProblemsToJiraComponent("NodeTuningOperator"). contactPerson("titzhak"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -338,6 +373,7 @@ var ( reportProblemsToJiraComponent("MachineConfigOperator"). contactPerson("djoshy"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -345,6 +381,7 @@ var ( reportProblemsToJiraComponent("MachineConfigOperator"). contactPerson("djoshy"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -352,6 +389,7 @@ var ( reportProblemsToJiraComponent("cloud-provider"). contactPerson("jspeed"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/2395"). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -359,6 +397,7 @@ var ( reportProblemsToJiraComponent("MachineConfigOperator"). contactPerson("dkhater"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -366,6 +405,7 @@ var ( reportProblemsToJiraComponent("MachineConfigOperator"). contactPerson("inesqyx"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -373,6 +413,7 @@ var ( reportProblemsToJiraComponent("Cluster Version Operator"). contactPerson("lmohanty"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -380,6 +421,7 @@ var ( reportProblemsToJiraComponent("kube-apiserver"). contactPerson("dgrisonnet"). productScope(kubernetes). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -387,6 +429,7 @@ var ( reportProblemsToJiraComponent("MachineConfigOperator"). contactPerson("jhernand"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -394,6 +437,7 @@ var ( reportProblemsToJiraComponent("Cluster Version Operator"). contactPerson("pmuller"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -401,13 +445,23 @@ var ( reportProblemsToJiraComponent("kube-apiserver"). contactPerson("akashem"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/4006"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() + FeatureGateVolumeAttributesClass = newFeatureGate("VolumeAttributesClass"). + reportProblemsToJiraComponent("Storage / Kubernetes External Components"). + contactPerson("dfajmon"). + productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/3751"). + enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + mustRegister() + FeatureGateVolumeGroupSnapshot = newFeatureGate("VolumeGroupSnapshot"). reportProblemsToJiraComponent("Storage / Kubernetes External Components"). contactPerson("fbertina"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/3476"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -415,6 +469,7 @@ var ( reportProblemsToJiraComponent("authentication"). contactPerson("liouk"). productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1596"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). enableForClusterProfile(Hypershift, configv1.Default, configv1.TechPreviewNoUpgrade). mustRegister() @@ -423,6 +478,7 @@ var ( reportProblemsToJiraComponent("cluster-config"). contactPerson("deads"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -430,6 +486,7 @@ var ( reportProblemsToJiraComponent("olm"). contactPerson("joe"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -437,6 +494,7 @@ var ( reportProblemsToJiraComponent("olm"). contactPerson("joe"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -444,6 +502,7 @@ var ( reportProblemsToJiraComponent("insights"). contactPerson("tremes"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -451,6 +510,7 @@ var ( reportProblemsToJiraComponent("metal"). contactPerson("EmilienM"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -458,6 +518,7 @@ var ( reportProblemsToJiraComponent("insights"). contactPerson("tremes"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -465,6 +526,7 @@ var ( reportProblemsToJiraComponent("MachineConfigOperator"). contactPerson("jerzhang"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -472,6 +534,7 @@ var ( reportProblemsToJiraComponent("Monitoring"). contactPerson("rexagod"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -479,6 +542,7 @@ var ( reportProblemsToJiraComponent("Storage / Kubernetes External Components"). contactPerson("rbednar"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -486,12 +550,14 @@ var ( reportProblemsToJiraComponent("Installer"). contactPerson("cjschaef"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). mustRegister() FeatureGateChunkSizeMiB = newFeatureGate("ChunkSizeMiB"). reportProblemsToJiraComponent("Image Registry"). contactPerson("flavianmissi"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -499,12 +565,14 @@ var ( reportProblemsToJiraComponent("OCPCLOUD"). contactPerson("jspeed"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). mustRegister() FeatureGatePersistentIPsForVirtualization = newFeatureGate("PersistentIPsForVirtualization"). reportProblemsToJiraComponent("CNV Network"). contactPerson("mduarted"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -512,6 +580,7 @@ var ( reportProblemsToJiraComponent("Monitoring"). contactPerson("marioferh"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -519,6 +588,7 @@ var ( reportProblemsToJiraComponent("Installer"). contactPerson("r4f4"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -526,12 +596,14 @@ var ( reportProblemsToJiraComponent("Installer"). contactPerson("r4f4"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). mustRegister() FeatureGateMultiArchInstallGCP = newFeatureGate("MultiArchInstallGCP"). reportProblemsToJiraComponent("Installer"). contactPerson("r4f4"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -539,6 +611,7 @@ var ( reportProblemsToJiraComponent("Routing"). contactPerson("miciah"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -546,6 +619,7 @@ var ( reportProblemsToJiraComponent("Storage / Kubernetes External Components"). contactPerson("fbertina"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -553,6 +627,7 @@ var ( reportProblemsToJiraComponent("Multi-Arch"). contactPerson("psundara"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -560,6 +635,7 @@ var ( reportProblemsToJiraComponent("Node"). contactPerson("haircommander"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/127"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -567,6 +643,7 @@ var ( reportProblemsToJiraComponent("Node"). contactPerson("haircommander"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/127"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -574,6 +651,7 @@ var ( reportProblemsToJiraComponent("Node"). contactPerson("haircommander"). productScope(kubernetes). + enhancementPR("https://github.com/kubernetes/enhancements/issues/4265"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() @@ -581,6 +659,23 @@ var ( reportProblemsToJiraComponent("SPLAT"). contactPerson("rvanderp"). productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() + + FeatureGateIngressControllerDynamicConfigurationManager = newFeatureGate("IngressControllerDynamicConfigurationManager"). + reportProblemsToJiraComponent("Networking/router"). + contactPerson("miciah"). + productScope(ocpSpecific). + enhancementPR(legacyFeatureGateWithoutEnhancement). + enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + mustRegister() + + FeatureGateMinimumKubeletVersion = newFeatureGate("MinimumKubeletVersion"). + reportProblemsToJiraComponent("Node"). + contactPerson("haircommander"). + productScope(ocpSpecific). + enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + enhancementPR("https://github.com/openshift/enhancements/pull/1697"). + mustRegister() ) diff --git a/vendor/github.com/openshift/api/features/legacyfeaturegates.go b/vendor/github.com/openshift/api/features/legacyfeaturegates.go new file mode 100644 index 00000000000..06e1600e0d9 --- /dev/null +++ b/vendor/github.com/openshift/api/features/legacyfeaturegates.go @@ -0,0 +1,129 @@ +package features + +import "k8s.io/apimachinery/pkg/util/sets" + +var legacyFeatureGates = sets.New( + "AWSClusterHostedDNS", + // never add to this list, if you think you have an exception ask @deads2k + "AWSEFSDriverVolumeMetrics", + // never add to this list, if you think you have an exception ask @deads2k + "AdditionalRoutingCapabilities", + // never add to this list, if you think you have an exception ask @deads2k + "AdminNetworkPolicy", + // never add to this list, if you think you have an exception ask @deads2k + "AlibabaPlatform", + // never add to this list, if you think you have an exception ask @deads2k + "AutomatedEtcdBackup", + // never add to this list, if you think you have an exception ask @deads2k + "AzureWorkloadIdentity", + // never add to this list, if you think you have an exception ask @deads2k + "BareMetalLoadBalancer", + // never add to this list, if you think you have an exception ask @deads2k + "BootcNodeManagement", + // never add to this list, if you think you have an exception ask @deads2k + "BuildCSIVolumes", + // never add to this list, if you think you have an exception ask @deads2k + "ChunkSizeMiB", + // never add to this list, if you think you have an exception ask @deads2k + "ClusterAPIInstall", + // never add to this list, if you think you have an exception ask @deads2k + "ClusterAPIInstallIBMCloud", + // never add to this list, if you think you have an exception ask @deads2k + "ClusterMonitoringConfig", + // never add to this list, if you think you have an exception ask @deads2k + "DNSNameResolver", + // never add to this list, if you think you have an exception ask @deads2k + "EtcdBackendQuota", + // never add to this list, if you think you have an exception ask @deads2k + "Example", + // never add to this list, if you think you have an exception ask @deads2k + "GCPClusterHostedDNS", + // never add to this list, if you think you have an exception ask @deads2k + "GCPLabelsTags", + // never add to this list, if you think you have an exception ask @deads2k + "GatewayAPI", + // never add to this list, if you think you have an exception ask @deads2k + "HardwareSpeed", + // never add to this list, if you think you have an exception ask @deads2k + "ImageStreamImportMode", + // never add to this list, if you think you have an exception ask @deads2k + "IngressControllerDynamicConfigurationManager", + // never add to this list, if you think you have an exception ask @deads2k + "IngressControllerLBSubnetsAWS", + // never add to this list, if you think you have an exception ask @deads2k + "InsightsConfig", + // never add to this list, if you think you have an exception ask @deads2k + "InsightsConfigAPI", + // never add to this list, if you think you have an exception ask @deads2k + "InsightsOnDemandDataGather", + // never add to this list, if you think you have an exception ask @deads2k + "InsightsRuntimeExtractor", + // never add to this list, if you think you have an exception ask @deads2k + "KMSv1", + // never add to this list, if you think you have an exception ask @deads2k + "MachineAPIMigration", + // never add to this list, if you think you have an exception ask @deads2k + "MachineAPIOperatorDisableMachineHealthCheckController", + // never add to this list, if you think you have an exception ask @deads2k + "MachineAPIProviderOpenStack", + // never add to this list, if you think you have an exception ask @deads2k + "MachineConfigNodes", + // never add to this list, if you think you have an exception ask @deads2k + "ManagedBootImages", + // never add to this list, if you think you have an exception ask @deads2k + "ManagedBootImagesAWS", + // never add to this list, if you think you have an exception ask @deads2k + "MetricsCollectionProfiles", + // never add to this list, if you think you have an exception ask @deads2k + "MixedCPUsAllocation", + // never add to this list, if you think you have an exception ask @deads2k + "MultiArchInstallAWS", + // never add to this list, if you think you have an exception ask @deads2k + "MultiArchInstallAzure", + // never add to this list, if you think you have an exception ask @deads2k + "MultiArchInstallGCP", + // never add to this list, if you think you have an exception ask @deads2k + "NetworkDiagnosticsConfig", + // never add to this list, if you think you have an exception ask @deads2k + "NetworkLiveMigration", + // never add to this list, if you think you have an exception ask @deads2k + "NetworkSegmentation", + // never add to this list, if you think you have an exception ask @deads2k + "NewOLM", + // never add to this list, if you think you have an exception ask @deads2k + "NodeDisruptionPolicy", + // never add to this list, if you think you have an exception ask @deads2k + "OVNObservability", + // never add to this list, if you think you have an exception ask @deads2k + "OnClusterBuild", + // never add to this list, if you think you have an exception ask @deads2k + "PersistentIPsForVirtualization", + // never add to this list, if you think you have an exception ask @deads2k + "PinnedImages", + // never add to this list, if you think you have an exception ask @deads2k + "PlatformOperators", + // never add to this list, if you think you have an exception ask @deads2k + "PrivateHostedZoneAWS", + // never add to this list, if you think you have an exception ask @deads2k + "RouteAdvertisements", + // never add to this list, if you think you have an exception ask @deads2k + "RouteExternalCertificate", + // never add to this list, if you think you have an exception ask @deads2k + "SetEIPForNLBIngressController", + // never add to this list, if you think you have an exception ask @deads2k + "SignatureStores", + // never add to this list, if you think you have an exception ask @deads2k + "SigstoreImageVerification", + // never add to this list, if you think you have an exception ask @deads2k + "UpgradeStatus", + // never add to this list, if you think you have an exception ask @deads2k + "VSphereControlPlaneMachineSet", + // never add to this list, if you think you have an exception ask @deads2k + "VSphereDriverConfiguration", + // never add to this list, if you think you have an exception ask @deads2k + "VSphereMultiNetworks", + // never add to this list, if you think you have an exception ask @deads2k + "VSphereMultiVCenters", + // never add to this list, if you think you have an exception ask @deads2k + "VSphereStaticIPs", +) diff --git a/vendor/github.com/openshift/api/features/util.go b/vendor/github.com/openshift/api/features/util.go index d8d8e94a0e9..59bb7bff407 100644 --- a/vendor/github.com/openshift/api/features/util.go +++ b/vendor/github.com/openshift/api/features/util.go @@ -3,6 +3,8 @@ package features import ( "fmt" configv1 "github.com/openshift/api/config/v1" + "net/url" + "strings" ) // FeatureGateDescription is a golang-only interface used to contains details for a feature gate. @@ -18,6 +20,8 @@ type FeatureGateDescription struct { ResponsiblePerson string // OwningProduct is the product that owns the lifecycle of the gate. OwningProduct OwningProduct + // EnhancementPR is the PR for the enhancement. + EnhancementPR string } type FeatureGateEnabledDisabled struct { @@ -45,10 +49,15 @@ type featureGateBuilder struct { owningJiraComponent string responsiblePerson string owningProduct OwningProduct + enhancementPRURL string statusByClusterProfileByFeatureSet map[ClusterProfileName]map[configv1.FeatureSet]bool } +const ( + legacyFeatureGateWithoutEnhancement = "FeatureGate predates 4.18" +) + // newFeatureGate featuregate are disabled in every FeatureSet and selectively enabled func newFeatureGate(name string) *featureGateBuilder { b := &featureGateBuilder{ @@ -80,6 +89,11 @@ func (b *featureGateBuilder) productScope(owningProduct OwningProduct) *featureG return b } +func (b *featureGateBuilder) enhancementPR(url string) *featureGateBuilder { + b.enhancementPRURL = url + return b +} + func (b *featureGateBuilder) enableIn(featureSets ...configv1.FeatureSet) *featureGateBuilder { for clusterProfile := range b.statusByClusterProfileByFeatureSet { for _, featureSet := range featureSets { @@ -109,6 +123,22 @@ func (b *featureGateBuilder) register() (configv1.FeatureGateName, error) { if len(b.owningProduct) == 0 { return "", fmt.Errorf("missing owningProduct") } + _, enhancementPRErr := url.Parse(b.enhancementPRURL) + switch { + case b.enhancementPRURL == legacyFeatureGateWithoutEnhancement: + if !legacyFeatureGates.Has(b.name) { + return "", fmt.Errorf("FeatureGate/%s is a new feature gate, not an existing one. It must have an enhancementPR with GA Graduation Criteria like https://github.com/openshift/enhancements/pull/#### or https://github.com/kubernetes/enhancements/issues/####", b.name) + } + + case len(b.enhancementPRURL) == 0: + return "", fmt.Errorf("FeatureGate/%s is missing an enhancementPR with GA Graduation Criteria like https://github.com/openshift/enhancements/pull/#### or https://github.com/kubernetes/enhancements/issues/####", b.name) + + case !strings.HasPrefix(b.enhancementPRURL, "https://github.com/openshift/enhancements/pull/") && !strings.HasPrefix(b.enhancementPRURL, "https://github.com/kubernetes/enhancements/issues/"): + return "", fmt.Errorf("FeatureGate/%s enhancementPR format is incorrect; must be like https://github.com/openshift/enhancements/pull/#### or https://github.com/kubernetes/enhancements/issues/####", b.name) + + case enhancementPRErr != nil: + return "", fmt.Errorf("FeatureGate/%s is enhancementPR is invalid: %w", b.name, enhancementPRErr) + } featureGateName := configv1.FeatureGateName(b.name) description := FeatureGateDescription{ @@ -118,6 +148,7 @@ func (b *featureGateBuilder) register() (configv1.FeatureGateName, error) { OwningJiraComponent: b.owningJiraComponent, ResponsiblePerson: b.responsiblePerson, OwningProduct: b.owningProduct, + EnhancementPR: b.enhancementPRURL, } // statusByClusterProfileByFeatureSet is initialized by constructor to be false for every combination diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go index fe271235fe8..02bd5e714b0 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go @@ -180,9 +180,14 @@ type NetworkDeviceSpec struct { // VSphereDisk describes additional disks for vSphere. type VSphereDisk struct { + // name is a name to be used to identify the disk definition. If deviceName is not specified, + // the disk will still be created. The deviceName should be unique so that it can be used to clearly + // identify purpose of the disk, but is not required to be unique. + // +optional + Name string `json:"name,omitempty"` // sizeGiB is the size of the disk (in GiB). // +kubebuilder:validation:Required - SizeGiB int64 `json:"sizeGiB"` + SizeGiB int32 `json:"sizeGiB"` } // WorkspaceConfig defines a workspace configuration for the vSphere cloud diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go index 0827a98d8b5..0417b653db7 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go @@ -785,6 +785,7 @@ func (NetworkSpec) SwaggerDoc() map[string]string { var map_VSphereDisk = map[string]string{ "": "VSphereDisk describes additional disks for vSphere.", + "name": "name is a name to be used to identify the disk definition. If deviceName is not specified, the disk will still be created. The deviceName should be unique so that it can be used to clearly identify purpose of the disk, but is not required to be unique.", "sizeGiB": "sizeGiB is the size of the disk (in GiB).", } diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go index 8d6f4b7484f..f04b6846aee 100644 --- a/vendor/github.com/openshift/api/operator/v1/types.go +++ b/vendor/github.com/openshift/api/operator/v1/types.go @@ -147,17 +147,27 @@ type GenerationStatus struct { // group is the group of the thing you're tracking // +kubebuilder:validation:Required Group string `json:"group"` + // resource is the resource type of the thing you're tracking // +kubebuilder:validation:Required Resource string `json:"resource"` + // namespace is where the thing you're tracking is // +kubebuilder:validation:Required Namespace string `json:"namespace"` + // name is the name of the thing you're tracking // +kubebuilder:validation:Required Name string `json:"name"` + + // TODO: Add validation for lastGeneration. The value for this field should generally increase, except when the associated + // resource has been deleted and re-created. To accurately validate this field, we should introduce a new UID field and only + // enforce an increasing value in lastGeneration when the UID remains unchanged. A change in the UID indicates that the resource + // was re-created, allowing the lastGeneration value to reset or decrease. + // lastGeneration is the last generation of the workload controller involved LastGeneration int64 `json:"lastGeneration"` + // hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps Hash string `json:"hash"` } diff --git a/vendor/modules.txt b/vendor/modules.txt index 1f730f5496e..58ba4aa7125 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1077,7 +1077,7 @@ github.com/opencontainers/image-spec/specs-go/v1 # github.com/opencontainers/runtime-spec v1.2.0 ## explicit github.com/opencontainers/runtime-spec/specs-go -# github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f => github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491 +# github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f => github.com/vr4manta/api v0.0.0-20241105193347-78abbaa0e66f ## explicit; go 1.22.0 github.com/openshift/api/annotations github.com/openshift/api/config/v1 @@ -2380,7 +2380,7 @@ sigs.k8s.io/cluster-api-provider-ibmcloud/util ## explicit; go 1.22 sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional -# sigs.k8s.io/cluster-api-provider-vsphere v1.11.1 => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e +# sigs.k8s.io/cluster-api-provider-vsphere v1.11.1 => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241104145417-f11b363c5760 ## explicit; go 1.22.0 sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1 sigs.k8s.io/cluster-api-provider-vsphere/pkg/session @@ -2557,5 +2557,5 @@ sigs.k8s.io/yaml/goyaml.v3 # github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20241001055825-63e8b0d3ad63 # github.com/containerd/containerd => github.com/containerd/containerd v1.6.26 # github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 -# github.com/openshift/api => github.com/vr4manta/api v0.0.0-20241011151817-acc042bfc491 -# sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241011200348-df5d3979816e +# github.com/openshift/api => github.com/vr4manta/api v0.0.0-20241105193347-78abbaa0e66f +# sigs.k8s.io/cluster-api-provider-vsphere => github.com/vr4manta/cluster-api-provider-vsphere v0.0.0-20241104145417-f11b363c5760 diff --git a/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go b/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go index d10e60fb4a3..01c8a37b8f5 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1/types.go @@ -203,16 +203,21 @@ type VirtualMachineCloneSpec struct { // Check the compatibility with the ESXi version before setting the value. // +optional HardwareVersion string `json:"hardwareVersion,omitempty"` - // DataDisks holds information for additional disks to add to the VM that are not part of the VM's OVA template. + // DataDisks are additional disks to add to the VM that are not part of the VM's OVA template. // +optional DataDisks []VSphereDisk `json:"dataDisks,omitempty"` } -// VSphereDisk describes additional disks for vSphere to be added to VM that are not part of the VM OVA template. +// VSphereDisk is an additional disk to add to the VM that is not part of the VM OVA template. type VSphereDisk struct { - // SizeGiB is the size of the disk (in GiB). + // Name is used to identify the disk definition. If Name is not specified, the disk will still be created. + // The Name should be unique so that it can be used to clearly identify purpose of the disk, but is not + // required to be unique. + // +optional + Name string `json:"name,omitempty"` + // SizeGiB is the size of the disk in GiB. // +kubebuilder:validation:Required - SizeGiB int64 `json:"sizeGiB"` + SizeGiB int32 `json:"sizeGiB"` } // VSphereMachineTemplateResource describes the data needed to create a VSphereMachine from a template.