From f170411102e34894050d95a8a9d84b663e949094 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Mon, 3 Jun 2024 11:24:53 +0200 Subject: [PATCH] vm-operator: migrate to v1alpha2 --- .golangci.yml | 2 +- controllers/vmware/test/controllers_test.go | 13 ++--- controllers/vspheremachine_controller.go | 2 +- go.mod | 1 + go.sum | 4 +- .../test/helpers/vmware/unit_test_context.go | 2 +- .../fake/fake_controller_manager_context.go | 2 +- pkg/manager/manager.go | 2 +- pkg/services/interfaces.go | 2 +- pkg/services/network/dummy_provider.go | 2 +- pkg/services/network/netop_provider.go | 24 ++++++--- pkg/services/network/network_test.go | 23 ++++---- pkg/services/network/nsxt_provider.go | 22 +++++--- pkg/services/network/nsxt_vpc_provider.go | 23 +++++--- pkg/services/vmoperator/conditions.go | 43 +++++++++++++++ .../vmoperator/control_plane_endpoint.go | 2 +- .../vmoperator/control_plane_endpoint_test.go | 2 +- pkg/services/vmoperator/resource_policy.go | 16 ++---- .../vmoperator/resource_policy_test.go | 2 +- pkg/services/vmoperator/vmopmachine.go | 52 +++++++++++-------- pkg/services/vmoperator/vmopmachine_test.go | 51 +++++++++--------- pkg/util/testutil.go | 2 +- test/go.sum | 1 + 23 files changed, 189 insertions(+), 106 deletions(-) create mode 100644 pkg/services/vmoperator/conditions.go diff --git a/.golangci.yml b/.golangci.yml index c518256d4b..16027f6bb1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -120,7 +120,7 @@ linters-settings: - pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/vmware/v1beta1 alias: vmwarev1 # VMware Operator - - pkg: "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + - pkg: "github.com/vmware-tanzu/vm-operator/api/v1alpha2" alias: vmoprv1 # CABPK - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 diff --git a/controllers/vmware/test/controllers_test.go b/controllers/vmware/test/controllers_test.go index 439616d59e..7ee2ef97ae 100644 --- a/controllers/vmware/test/controllers_test.go +++ b/controllers/vmware/test/controllers_test.go @@ -26,7 +26,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" + vmoprconditions "github.com/vmware-tanzu/vm-operator/pkg/conditions" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -463,7 +464,7 @@ var _ = Describe("Reconciliation tests", func() { Eventually(func() error { return k8sClient.Get(ctx, rpKey, resourcePolicy) }, time.Second*30).Should(Succeed()) - Expect(len(resourcePolicy.Spec.ClusterModules)).To(BeEquivalentTo(2)) + Expect(len(resourcePolicy.Spec.ClusterModuleGroups)).To(BeEquivalentTo(2)) By("Create the CAPI Machine and wait for it to exist") machineKey, machine := deployCAPIMachine(ns.Name, cluster, k8sClient) @@ -636,7 +637,7 @@ var _ = Describe("Reconciliation tests", func() { } // These two lines must be initialized as requirements of having valid Status newVM.Status.Volumes = []vmoprv1.VirtualMachineVolumeStatus{} - newVM.Status.Phase = vmoprv1.Created + vmoprconditions.MarkTrue(newVM, vmoprv1.VirtualMachineConditionCreated) return k8sClient.Status().Update(ctx, newVM) }, time.Second*30).Should(Succeed()) @@ -649,7 +650,7 @@ var _ = Describe("Reconciliation tests", func() { if err != nil { return err } - newVM.Status.PowerState = vmoprv1.VirtualMachinePoweredOn + newVM.Status.PowerState = vmoprv1.VirtualMachinePowerStateOn return k8sClient.Status().Update(ctx, newVM) }, time.Second*30).Should(Succeed()) @@ -662,7 +663,7 @@ var _ = Describe("Reconciliation tests", func() { if err != nil { return err } - newVM.Status.VmIp = "1.2.3.4" + newVM.Status.Network.PrimaryIP4 = "1.2.3.4" newVM.Status.BiosUUID = "test-bios-uuid" return k8sClient.Status().Update(ctx, newVM) }, time.Second*30).Should(Succeed()) @@ -675,7 +676,7 @@ var _ = Describe("Reconciliation tests", func() { // control_plane_endpoint_test.go if !isLB { By("Expect the Cluster to have the IP from the VM as an APIEndpoint") - assertEventuallyControlPlaneEndpoint(infraClusterKey, infraCluster, newVM.Status.VmIp) + assertEventuallyControlPlaneEndpoint(infraClusterKey, infraCluster, newVM.Status.Network.PrimaryIP4) } }, Entry("With no load balancer", dontUseLoadBalancer), diff --git a/controllers/vspheremachine_controller.go b/controllers/vspheremachine_controller.go index 8ad2da4b79..e09f84a060 100644 --- a/controllers/vspheremachine_controller.go +++ b/controllers/vspheremachine_controller.go @@ -23,7 +23,7 @@ import ( "time" "github.com/pkg/errors" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/go.mod b/go.mod index 1b87bee27e..7328594331 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/vmware-tanzu/net-operator-api v0.0.0-20240326163340-1f32d6bf7f9d github.com/vmware-tanzu/nsx-operator/pkg/apis v0.1.0 + github.com/vmware-tanzu/vm-operator v1.8.6 github.com/vmware-tanzu/vm-operator/api v1.8.6 github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505 github.com/vmware-tanzu/vm-operator/external/tanzu-topology v0.0.0-20240404200847-de75746a9505 diff --git a/go.sum b/go.sum index 17c861de93..28c0697fef 100644 --- a/go.sum +++ b/go.sum @@ -551,14 +551,14 @@ github.com/vmware-tanzu/net-operator-api v0.0.0-20240326163340-1f32d6bf7f9d h1:c github.com/vmware-tanzu/net-operator-api v0.0.0-20240326163340-1f32d6bf7f9d/go.mod h1:JbFOh22iDsT5BowJe0GgpMI5e2/S7cWaJlv9LdURVQM= github.com/vmware-tanzu/nsx-operator/pkg/apis v0.1.0 h1:HdnQb/X9vJ8a5WQ03g/0nDr9igIIK1fF6wO5wOtkJT4= github.com/vmware-tanzu/nsx-operator/pkg/apis v0.1.0/go.mod h1:Q4JzNkNMvjo7pXtlB5/R3oME4Nhah7fAObWgghVmtxk= +github.com/vmware-tanzu/vm-operator v1.8.6 h1:ZfPQjQWVvwcH5WQ4lCEMBhYHM48cHBhrmyNpEdJeN14= +github.com/vmware-tanzu/vm-operator v1.8.6/go.mod h1:KgriSV1zMLaJf6LVTO4Eu+9yLgBmukjuGEud2rJct7E= github.com/vmware-tanzu/vm-operator/api v1.8.6 h1:NIndORjcnSmIlQsCMIewpIwg/ocRVDh2lYjOroTVLrU= github.com/vmware-tanzu/vm-operator/api v1.8.6/go.mod h1:HHA2SNI9B5Yqtyp5t+Gt9WTWBi/fIkM6+MukDDSf11A= github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505 h1:y4wXx1FUFqqSgJ/xUOEM1DLS2Uu0KaeLADWpzpioGTU= github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505/go.mod h1:5rqRJ9zGR+KnKbkGx373WgN8xJpvAj99kHnfoDYRO5I= github.com/vmware-tanzu/vm-operator/external/tanzu-topology v0.0.0-20240404200847-de75746a9505 h1:/6vFL20UMHOeTf/mb+dKf5sFG0FBbyrCBY/71QKAIE0= github.com/vmware-tanzu/vm-operator/external/tanzu-topology v0.0.0-20240404200847-de75746a9505/go.mod h1:dfYrWS8DMRN+XZfhu8M4LVHmeGvYB29Ipd7j4uIq+mU= -github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 h1:LRMZ+zzb944d6r+uYsE+CuJ3zVBE6Hc8vjH7IJX2QY4= -github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505/go.mod h1:M+6bZCS8vSjCN9OOppnAyYxeBxY1U0wG6+j3CvIrOHY= github.com/vmware/govmomi v0.37.2 h1:5ANLoaTxWv600ZnoosJ2zXbM3A+EaxqGheEZbRN8YVE= github.com/vmware/govmomi v0.37.2/go.mod h1:mtGWtM+YhTADHlCgJBiskSRPOZRsN9MSjPzaZLte/oQ= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= diff --git a/internal/test/helpers/vmware/unit_test_context.go b/internal/test/helpers/vmware/unit_test_context.go index cf38be6c49..63d56de7f7 100644 --- a/internal/test/helpers/vmware/unit_test_context.go +++ b/internal/test/helpers/vmware/unit_test_context.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/pkg/context/fake/fake_controller_manager_context.go b/pkg/context/fake/fake_controller_manager_context.go index c93bc0291a..6d4974cef2 100644 --- a/pkg/context/fake/fake_controller_manager_context.go +++ b/pkg/context/fake/fake_controller_manager_context.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" "k8s.io/apimachinery/pkg/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index db690296b7..5085e0a344 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" netopv1 "github.com/vmware-tanzu/net-operator-api/api/v1alpha1" nsxopv1 "github.com/vmware-tanzu/nsx-operator/pkg/apis/v1alpha1" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" ncpv1 "github.com/vmware-tanzu/vm-operator/external/ncp/api/v1alpha1" topologyv1 "github.com/vmware-tanzu/vm-operator/external/tanzu-topology/api/v1alpha1" "gopkg.in/fsnotify.v1" diff --git a/pkg/services/interfaces.go b/pkg/services/interfaces.go index 7b3060caf0..df4685cddb 100644 --- a/pkg/services/interfaces.go +++ b/pkg/services/interfaces.go @@ -19,7 +19,7 @@ package services import ( "context" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" diff --git a/pkg/services/network/dummy_provider.go b/pkg/services/network/dummy_provider.go index 387df7b1f1..ef6578ffc3 100644 --- a/pkg/services/network/dummy_provider.go +++ b/pkg/services/network/dummy_provider.go @@ -19,7 +19,7 @@ package network import ( "context" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/cluster-api-provider-vsphere/pkg/context/vmware" diff --git a/pkg/services/network/netop_provider.go b/pkg/services/network/netop_provider.go index 9b8cc40736..f4f15c781d 100644 --- a/pkg/services/network/netop_provider.go +++ b/pkg/services/network/netop_provider.go @@ -21,7 +21,9 @@ import ( "fmt" netopv1 "github.com/vmware-tanzu/net-operator-api/api/v1alpha1" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" + vmoprv1common "github.com/vmware-tanzu/vm-operator/api/v1alpha2/common" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/cluster-api/util/conditions" ctrl "sigs.k8s.io/controller-runtime" @@ -121,17 +123,25 @@ func (np *netopNetworkProvider) ConfigureVirtualMachine(ctx context.Context, clu if err != nil { return err } - - for _, vnif := range vm.Spec.NetworkInterfaces { - if vnif.NetworkType == string(network.Spec.Type) && vnif.NetworkName == network.Name { + if vm.Spec.Network == nil { + vm.Spec.Network = &vmoprv1.VirtualMachineNetworkSpec{} + } + for _, vnif := range vm.Spec.Network.Interfaces { + if vnif.Network.TypeMeta.GroupVersionKind() == netopv1.SchemeGroupVersion.WithKind("Network") && vnif.Name == network.Name { // Expected network interface already exists. return nil } } - vm.Spec.NetworkInterfaces = append(vm.Spec.NetworkInterfaces, vmoprv1.VirtualMachineNetworkInterface{ - NetworkName: network.Name, - NetworkType: string(network.Spec.Type), + vm.Spec.Network.Interfaces = append(vm.Spec.Network.Interfaces, vmoprv1.VirtualMachineNetworkInterfaceSpec{ + Name: fmt.Sprintf("eth%d", len(vm.Spec.Network.Interfaces)), + Network: vmoprv1common.PartialObjectRef{ + TypeMeta: metav1.TypeMeta{ + Kind: "Network", + APIVersion: netopv1.SchemeGroupVersion.String(), + }, + Name: network.Name, + }, }) return nil diff --git a/pkg/services/network/network_test.go b/pkg/services/network/network_test.go index 817862723e..53834358a1 100644 --- a/pkg/services/network/network_test.go +++ b/pkg/services/network/network_test.go @@ -25,7 +25,7 @@ import ( . "github.com/onsi/gomega" netopv1alpha1 "github.com/vmware-tanzu/net-operator-api/api/v1alpha1" nsxopv1 "github.com/vmware-tanzu/nsx-operator/pkg/apis/v1alpha1" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" ncpv1 "github.com/vmware-tanzu/vm-operator/external/ncp/api/v1alpha1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -165,7 +165,7 @@ var _ = Describe("Network provider", func() { }) It("should not add network interface", func() { Expect(err).ToNot(HaveOccurred()) - Expect(vm.Spec.NetworkInterfaces).To(BeNil()) + Expect(vm.Spec.Network.Interfaces).To(BeNil()) }) }) @@ -196,8 +196,9 @@ var _ = Describe("Network provider", func() { AfterEach(func() { Expect(err).ToNot(HaveOccurred()) - Expect(vm.Spec.NetworkInterfaces).To(HaveLen(1)) - Expect(vm.Spec.NetworkInterfaces[0].NetworkType).To(Equal("vsphere-distributed")) + Expect(vm.Spec.Network.Interfaces).To(HaveLen(1)) + Expect(vm.Spec.Network.Interfaces[0].Network.TypeMeta.Kind).To(Equal("Network")) + // TODO(chrischdi): also assert group version }) It("should add vds type network interface", func() { @@ -233,8 +234,9 @@ var _ = Describe("Network provider", func() { }) AfterEach(func() { Expect(err).ToNot(HaveOccurred()) - Expect(vm.Spec.NetworkInterfaces[0].NetworkName).To(Equal(GetNSXTVirtualNetworkName(vSphereCluster.Name))) - Expect(vm.Spec.NetworkInterfaces[0].NetworkType).To(Equal("nsx-t")) + Expect(vm.Spec.Network.Interfaces[0].Network.Name).To(Equal(GetNSXTVirtualNetworkName(vSphereCluster.Name))) + Expect(vm.Spec.Network.Interfaces[0].Network.TypeMeta.Kind).To(Equal("VirtualNetwork")) + // TODO(chrischdi): also assert group version }) }) @@ -249,19 +251,20 @@ var _ = Describe("Network provider", func() { It("should add nsx-t-subnetset type network interface", func() { err = np.ConfigureVirtualMachine(ctx, clusterCtx, vm) Expect(err).ToNot(HaveOccurred()) - Expect(vm.Spec.NetworkInterfaces).To(HaveLen(1)) + Expect(vm.Spec.Network.Interfaces).To(HaveLen(1)) }) It("nsx-t-subnetset type network interface already exists", func() { err = np.ConfigureVirtualMachine(ctx, clusterCtx, vm) Expect(err).ToNot(HaveOccurred()) - Expect(vm.Spec.NetworkInterfaces).To(HaveLen(1)) + Expect(vm.Spec.Network.Interfaces).To(HaveLen(1)) }) AfterEach(func() { Expect(err).ToNot(HaveOccurred()) - Expect(vm.Spec.NetworkInterfaces[0].NetworkName).To(Equal(vSphereCluster.Name)) - Expect(vm.Spec.NetworkInterfaces[0].NetworkType).To(Equal("nsx-t-subnetset")) + Expect(vm.Spec.Network.Interfaces[0].Network.Name).To(Equal(vSphereCluster.Name)) + Expect(vm.Spec.Network.Interfaces[0].Network.TypeMeta.Kind).To(Equal("SubnetSet")) + // TODO(chrischdi): also assert group version }) }) }) diff --git a/pkg/services/network/nsxt_provider.go b/pkg/services/network/nsxt_provider.go index 7cde4b7dc6..2221145212 100644 --- a/pkg/services/network/nsxt_provider.go +++ b/pkg/services/network/nsxt_provider.go @@ -21,7 +21,8 @@ import ( "fmt" "github.com/pkg/errors" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" + vmoprv1common "github.com/vmware-tanzu/vm-operator/api/v1alpha2/common" ncpv1 "github.com/vmware-tanzu/vm-operator/external/ncp/api/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -187,15 +188,24 @@ func (np *nsxtNetworkProvider) GetVMServiceAnnotations(ctx context.Context, clus // ConfigureVirtualMachine configures a VirtualMachine object based on the networking configuration. func (np *nsxtNetworkProvider) ConfigureVirtualMachine(_ context.Context, clusterCtx *vmware.ClusterContext, vm *vmoprv1.VirtualMachine) error { nsxtClusterNetworkName := GetNSXTVirtualNetworkName(clusterCtx.VSphereCluster.Name) - for _, vnif := range vm.Spec.NetworkInterfaces { - if vnif.NetworkType == NSXTTypeNetwork && vnif.NetworkName == nsxtClusterNetworkName { + if vm.Spec.Network == nil { + vm.Spec.Network = &vmoprv1.VirtualMachineNetworkSpec{} + } + for _, vnif := range vm.Spec.Network.Interfaces { + if vnif.Network.TypeMeta.GroupVersionKind() == ncpv1.SchemeGroupVersion.WithKind("VirtualNetwork") && vnif.Network.Name == nsxtClusterNetworkName { // expected network interface is already found return nil } } - vm.Spec.NetworkInterfaces = append(vm.Spec.NetworkInterfaces, vmoprv1.VirtualMachineNetworkInterface{ - NetworkName: nsxtClusterNetworkName, - NetworkType: NSXTTypeNetwork, + vm.Spec.Network.Interfaces = append(vm.Spec.Network.Interfaces, vmoprv1.VirtualMachineNetworkInterfaceSpec{ + Name: fmt.Sprintf("eth%d", len(vm.Spec.Network.Interfaces)), + Network: vmoprv1common.PartialObjectRef{ + TypeMeta: metav1.TypeMeta{ + Kind: "VirtualNetwork", + APIVersion: ncpv1.SchemeGroupVersion.String(), + }, + Name: nsxtClusterNetworkName, + }, }) return nil } diff --git a/pkg/services/network/nsxt_vpc_provider.go b/pkg/services/network/nsxt_vpc_provider.go index 621937691a..885d48b82b 100644 --- a/pkg/services/network/nsxt_vpc_provider.go +++ b/pkg/services/network/nsxt_vpc_provider.go @@ -22,7 +22,8 @@ import ( "github.com/pkg/errors" nsxopv1 "github.com/vmware-tanzu/nsx-operator/pkg/apis/v1alpha1" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" + vmoprv1common "github.com/vmware-tanzu/vm-operator/api/v1alpha2/common" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -173,15 +174,25 @@ func (vp *nsxtVPCNetworkProvider) GetVMServiceAnnotations(_ context.Context, _ * // ConfigureVirtualMachine configures a VirtualMachine object based on the networking configuration. func (vp *nsxtVPCNetworkProvider) ConfigureVirtualMachine(_ context.Context, clusterCtx *vmware.ClusterContext, vm *vmoprv1.VirtualMachine) error { networkName := clusterCtx.VSphereCluster.Name - for _, vnif := range vm.Spec.NetworkInterfaces { - if vnif.NetworkType == NSXTVPCSubnetSetNetworkType && vnif.NetworkName == networkName { + if vm.Spec.Network == nil { + vm.Spec.Network = &vmoprv1.VirtualMachineNetworkSpec{} + } + for _, vnif := range vm.Spec.Network.Interfaces { + if vnif.Network.TypeMeta.GroupVersionKind() == nsxopv1.SchemeGroupVersion.WithKind("SubnetSet") && vnif.Network.Name == networkName { // expected network interface is already found return nil } } - vm.Spec.NetworkInterfaces = append(vm.Spec.NetworkInterfaces, vmoprv1.VirtualMachineNetworkInterface{ - NetworkName: networkName, - NetworkType: NSXTVPCSubnetSetNetworkType, + + vm.Spec.Network.Interfaces = append(vm.Spec.Network.Interfaces, vmoprv1.VirtualMachineNetworkInterfaceSpec{ + Name: fmt.Sprintf("eth%d", len(vm.Spec.Network.Interfaces)), + Network: vmoprv1common.PartialObjectRef{ + TypeMeta: metav1.TypeMeta{ + Kind: "SubnetSet", + APIVersion: nsxopv1.SchemeGroupVersion.String(), + }, + Name: networkName, + }, }) return nil } diff --git a/pkg/services/vmoperator/conditions.go b/pkg/services/vmoperator/conditions.go new file mode 100644 index 0000000000..6b0dc858f5 --- /dev/null +++ b/pkg/services/vmoperator/conditions.go @@ -0,0 +1,43 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vmoperator + +import ( + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" + corev1 "k8s.io/api/core/v1" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +type vmOperatorConditionGetter struct { + *vmoprv1.VirtualMachine +} + +func (v vmOperatorConditionGetter) GetConditions() clusterv1.Conditions { + capiConditions := []clusterv1.Condition{} + + for _, cond := range v.Status.Conditions { + capiConditions = append(capiConditions, clusterv1.Condition{ + Type: clusterv1.ConditionType(cond.Type), + Status: corev1.ConditionStatus(cond.Status), + LastTransitionTime: cond.LastTransitionTime, + Reason: cond.Reason, + Message: cond.Message, + }) + } + + return capiConditions +} diff --git a/pkg/services/vmoperator/control_plane_endpoint.go b/pkg/services/vmoperator/control_plane_endpoint.go index 7ad550f0a7..e3ed22b27b 100644 --- a/pkg/services/vmoperator/control_plane_endpoint.go +++ b/pkg/services/vmoperator/control_plane_endpoint.go @@ -21,7 +21,7 @@ import ( "fmt" "github.com/pkg/errors" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2" diff --git a/pkg/services/vmoperator/control_plane_endpoint_test.go b/pkg/services/vmoperator/control_plane_endpoint_test.go index cc9583bfd2..d8e3542158 100644 --- a/pkg/services/vmoperator/control_plane_endpoint_test.go +++ b/pkg/services/vmoperator/control_plane_endpoint_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" netopv1 "github.com/vmware-tanzu/net-operator-api/api/v1alpha1" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" ncpv1 "github.com/vmware-tanzu/vm-operator/external/ncp/api/v1alpha1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/pkg/services/vmoperator/resource_policy.go b/pkg/services/vmoperator/resource_policy.go index 3cb87b4141..61fd255e02 100644 --- a/pkg/services/vmoperator/resource_policy.go +++ b/pkg/services/vmoperator/resource_policy.go @@ -20,7 +20,7 @@ import ( "context" "github.com/pkg/errors" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" @@ -78,16 +78,10 @@ func (s *RPService) createVirtualMachineSetResourcePolicy(ctx context.Context, c ResourcePool: vmoprv1.ResourcePoolSpec{ Name: clusterCtx.Cluster.Name, }, - Folder: vmoprv1.FolderSpec{ - Name: clusterCtx.Cluster.Name, - }, - ClusterModules: []vmoprv1.ClusterModuleSpec{ - { - GroupName: ControlPlaneVMClusterModuleGroupName, - }, - { - GroupName: getMachineDeploymentNameForCluster(clusterCtx.Cluster), - }, + Folder: clusterCtx.Cluster.Name, + ClusterModuleGroups: []string{ + ControlPlaneVMClusterModuleGroupName, + getMachineDeploymentNameForCluster(clusterCtx.Cluster), }, } // Ensure that the VirtualMachineSetResourcePolicy is owned by the VSphereCluster diff --git a/pkg/services/vmoperator/resource_policy_test.go b/pkg/services/vmoperator/resource_policy_test.go index 25c5f9c95f..b2f0529057 100644 --- a/pkg/services/vmoperator/resource_policy_test.go +++ b/pkg/services/vmoperator/resource_policy_test.go @@ -47,6 +47,6 @@ func TestRPService(t *testing.T) { resourcePolicy, err := rpService.getVirtualMachineSetResourcePolicy(ctx, clusterCtx) g.Expect(err).NotTo(HaveOccurred()) g.Expect(resourcePolicy.Spec.ResourcePool.Name).To(Equal(clusterName)) - g.Expect(resourcePolicy.Spec.Folder.Name).To(Equal(clusterName)) + g.Expect(resourcePolicy.Spec.Folder).To(Equal(clusterName)) }) } diff --git a/pkg/services/vmoperator/vmopmachine.go b/pkg/services/vmoperator/vmopmachine.go index c7effe0ebe..bfe6f2113f 100644 --- a/pkg/services/vmoperator/vmopmachine.go +++ b/pkg/services/vmoperator/vmopmachine.go @@ -22,7 +22,9 @@ import ( "fmt" "github.com/pkg/errors" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" + vmoprv1common "github.com/vmware-tanzu/vm-operator/api/v1alpha2/common" + vmoprconditions "github.com/vmware-tanzu/vm-operator/pkg/conditions" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -205,11 +207,9 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap // condition. Once vm operator surfaces enough conditions in virtualmachine, we could simply mirror the conditions in vspheremachine. // For now, we set conditions based on the whole virtualmachine status. // TODO: vm-operator does not use the cluster-api condition type. so can't use cluster-api util functions to fetch the condition + // TODO(chrischdi) check for mirroring to work correctly for _, cond := range vmOperatorVM.Status.Conditions { - if cond.Type == vmoprv1.VirtualMachinePrereqReadyCondition && cond.Severity == vmoprv1.ConditionSeverityError { - conditions.MarkFalse(supervisorMachineCtx.VSphereMachine, infrav1.VMProvisionedCondition, cond.Reason, clusterv1.ConditionSeverityError, cond.Message) - return false, errors.Errorf("vm prerequisites check fails: %s", supervisorMachineCtx) - } + conditions.SetMirror(supervisorMachineCtx.VSphereMachine, clusterv1.ConditionType(cond.Type), vmOperatorConditionGetter{vmOperatorVM}) } // Requeue until the VM Operator VirtualMachine has: @@ -217,7 +217,7 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap // * Been powered on // * An IP address // * A BIOS UUID - if vmOperatorVM.Status.Phase != vmoprv1.Created { + if !vmoprconditions.IsTrue(vmOperatorVM, vmoprv1.VirtualMachineConditionCreated) { conditions.MarkFalse(supervisorMachineCtx.VSphereMachine, infrav1.VMProvisionedCondition, vmwarev1.VMProvisionStartedReason, clusterv1.ConditionSeverityInfo, "") log.Info(fmt.Sprintf("VM is not yet created: %s", supervisorMachineCtx)) return true, nil @@ -225,7 +225,7 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap // Mark the VM as created supervisorMachineCtx.VSphereMachine.Status.VMStatus = vmwarev1.VirtualMachineStateCreated - if vmOperatorVM.Status.PowerState != vmoprv1.VirtualMachinePoweredOn { + if vmOperatorVM.Status.PowerState != vmoprv1.VirtualMachinePowerStateOn { conditions.MarkFalse(supervisorMachineCtx.VSphereMachine, infrav1.VMProvisionedCondition, vmwarev1.PoweringOnReason, clusterv1.ConditionSeverityInfo, "") log.Info(fmt.Sprintf("VM is not yet powered on: %s", supervisorMachineCtx)) return true, nil @@ -233,7 +233,7 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap // Mark the VM as poweredOn supervisorMachineCtx.VSphereMachine.Status.VMStatus = vmwarev1.VirtualMachineStatePoweredOn - if vmOperatorVM.Status.VmIp == "" { + if vmOperatorVM.Status.Network.PrimaryIP4 == "" { conditions.MarkFalse(supervisorMachineCtx.VSphereMachine, infrav1.VMProvisionedCondition, vmwarev1.WaitingForNetworkAddressReason, clusterv1.ConditionSeverityInfo, "") log.Info(fmt.Sprintf("VM does not have an IP address: %s", supervisorMachineCtx)) return true, nil @@ -325,13 +325,21 @@ func (v *VmopMachineService) reconcileVMOperatorVM(ctx context.Context, supervis if vmOperatorVM.Spec.StorageClass == "" { vmOperatorVM.Spec.StorageClass = supervisorMachineCtx.VSphereMachine.Spec.StorageClass } - vmOperatorVM.Spec.PowerState = vmoprv1.VirtualMachinePoweredOn - if vmOperatorVM.Spec.ResourcePolicyName == "" { - vmOperatorVM.Spec.ResourcePolicyName = supervisorMachineCtx.VSphereCluster.Status.ResourcePolicyName + vmOperatorVM.Spec.PowerState = vmoprv1.VirtualMachinePowerStateOn + if vmOperatorVM.Spec.Reserved != nil { + vmOperatorVM.Spec.Reserved = &vmoprv1.VirtualMachineReservedSpec{} + } + if vmOperatorVM.Spec.Reserved.ResourcePolicyName == "" { + vmOperatorVM.Spec.Reserved.ResourcePolicyName = supervisorMachineCtx.VSphereCluster.Status.ResourcePolicyName } - vmOperatorVM.Spec.VmMetadata = &vmoprv1.VirtualMachineMetadata{ - SecretName: dataSecretName, - Transport: vmoprv1.VirtualMachineMetadataCloudInitTransport, + if vmOperatorVM.Spec.Bootstrap == nil { + vmOperatorVM.Spec.Bootstrap = &vmoprv1.VirtualMachineBootstrapSpec{} + } + vmOperatorVM.Spec.Bootstrap.CloudInit = &vmoprv1.VirtualMachineBootstrapCloudInitSpec{ + RawCloudConfig: &vmoprv1common.SecretKeySelector{ + Name: dataSecretName, + Key: "user-data", + }, } vmOperatorVM.Spec.PowerOffMode = vmoprv1.VirtualMachinePowerOpMode(supervisorMachineCtx.VSphereMachine.Spec.PowerOffMode) if vmOperatorVM.Spec.MinHardwareVersion == 0 { @@ -350,7 +358,7 @@ func (v *VmopMachineService) reconcileVMOperatorVM(ctx context.Context, supervis // readiness probes. The flag PerformsVMReadinessProbe is used to determine // whether a VM readiness probe should be conducted. if v.ConfigureControlPlaneVMReadinessProbe && infrautilv1.IsControlPlaneMachine(supervisorMachineCtx.Machine) && supervisorMachineCtx.Cluster.Status.ControlPlaneReady { - vmOperatorVM.Spec.ReadinessProbe = &vmoprv1.Probe{ + vmOperatorVM.Spec.ReadinessProbe = &vmoprv1.VirtualMachineReadinessProbeSpec{ TCPSocket: &vmoprv1.TCPSocketAction{ Port: intstr.FromInt(defaultAPIBindPort), }, @@ -397,11 +405,11 @@ func (v *VmopMachineService) reconcileVMOperatorVM(ctx context.Context, supervis } func (v *VmopMachineService) reconcileNetwork(supervisorMachineCtx *vmware.SupervisorMachineContext, vm *vmoprv1.VirtualMachine) bool { - if vm.Status.VmIp == "" { + if vm.Status.Network.PrimaryIP4 == "" { return false } - supervisorMachineCtx.VSphereMachine.Status.IPAddr = vm.Status.VmIp + supervisorMachineCtx.VSphereMachine.Status.IPAddr = vm.Status.Network.PrimaryIP4 return true } @@ -494,10 +502,12 @@ func addVolume(vm *vmoprv1.VirtualMachine, name string) { vm.Spec.Volumes = append(vm.Spec.Volumes, vmoprv1.VirtualMachineVolume{ Name: name, - PersistentVolumeClaim: &vmoprv1.PersistentVolumeClaimVolumeSource{ - PersistentVolumeClaimVolumeSource: corev1.PersistentVolumeClaimVolumeSource{ - ClaimName: name, - ReadOnly: false, + VirtualMachineVolumeSource: vmoprv1.VirtualMachineVolumeSource{ + PersistentVolumeClaim: &vmoprv1.PersistentVolumeClaimVolumeSource{ + PersistentVolumeClaimVolumeSource: corev1.PersistentVolumeClaimVolumeSource{ + ClaimName: name, + ReadOnly: false, + }, }, }, }) diff --git a/pkg/services/vmoperator/vmopmachine_test.go b/pkg/services/vmoperator/vmopmachine_test.go index 063023c441..fc10e4b872 100644 --- a/pkg/services/vmoperator/vmopmachine_test.go +++ b/pkg/services/vmoperator/vmopmachine_test.go @@ -22,7 +22,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" + vmoprconditions "github.com/vmware-tanzu/vm-operator/pkg/conditions" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/resource" @@ -147,9 +148,9 @@ var _ = Describe("VirtualMachine tests", func() { Expect(vmopVM.Spec.ImageName).To(Equal(expectedImageName)) Expect(vmopVM.Spec.ClassName).To(Equal(className)) Expect(vmopVM.Spec.StorageClass).To(Equal(storageClass)) - Expect(vmopVM.Spec.ResourcePolicyName).To(Equal(resourcePolicyName)) + Expect(vmopVM.Spec.Reserved.ResourcePolicyName).To(Equal(resourcePolicyName)) Expect(vmopVM.Spec.MinHardwareVersion).To(Equal(minHardwareVersion)) - Expect(vmopVM.Spec.PowerState).To(Equal(vmoprv1.VirtualMachinePoweredOn)) + Expect(vmopVM.Spec.PowerState).To(Equal(vmoprv1.VirtualMachinePowerStateOn)) Expect(vmopVM.ObjectMeta.Annotations[ClusterModuleNameAnnotationKey]).To(Equal(ControlPlaneVMClusterModuleGroupName)) Expect(vmopVM.ObjectMeta.Annotations[ProviderTagsAnnotationKey]).To(Equal(ControlPlaneVMVMAntiAffinityTagValue)) @@ -229,7 +230,7 @@ var _ = Describe("VirtualMachine tests", func() { // Simulate VMOperator creating a vSphere VM By("vSphere VM is created") vmopVM = getReconciledVM(ctx, vmService, supervisorMachineContext) - vmopVM.Status.Phase = vmoprv1.Created + vmoprconditions.MarkTrue(vmopVM, vmoprv1.VirtualMachineConditionCreated) updateReconciledVMStatus(ctx, vmService, vmopVM) expectedState = vmwarev1.VirtualMachineStateCreated // we expect the reconciliation waiting for VM to be powered on @@ -240,7 +241,7 @@ var _ = Describe("VirtualMachine tests", func() { // Simulate VMOperator powering on the VM By("VirtualMachine is powered on") vmopVM = getReconciledVM(ctx, vmService, supervisorMachineContext) - vmopVM.Status.PowerState = vmoprv1.VirtualMachinePoweredOn + vmopVM.Status.PowerState = vmoprv1.VirtualMachinePowerStateOn updateReconciledVMStatus(ctx, vmService, vmopVM) expectedState = vmwarev1.VirtualMachineStatePoweredOn // we expect the reconciliation waiting for VM to have an IP @@ -251,7 +252,7 @@ var _ = Describe("VirtualMachine tests", func() { // Simulate VMOperator assigning an IP address By("VirtualMachine has an IP address") vmopVM = getReconciledVM(ctx, vmService, supervisorMachineContext) - vmopVM.Status.VmIp = vmIP + vmopVM.Status.Network.PrimaryIP4 = vmIP updateReconciledVMStatus(ctx, vmService, vmopVM) // we expect the reconciliation waiting for VM to have a BIOS UUID expectedConditions[0].Reason = vmwarev1.WaitingForBIOSUUIDReason @@ -340,7 +341,7 @@ var _ = Describe("VirtualMachine tests", func() { // Simulate VMOperator creating a vSphere VM By("vSphere VM is created") vmopVM = getReconciledVM(ctx, vmService, supervisorMachineContext) - vmopVM.Status.Phase = vmoprv1.Created + vmoprconditions.MarkTrue(vmopVM, vmoprv1.VirtualMachineConditionCreated) updateReconciledVMStatus(ctx, vmService, vmopVM) expectedState = vmwarev1.VirtualMachineStateCreated expectedConditions[0].Reason = vmwarev1.PoweringOnReason @@ -350,7 +351,7 @@ var _ = Describe("VirtualMachine tests", func() { // Simulate VMOperator powering on the VM By("VirtualMachine is powered on") vmopVM = getReconciledVM(ctx, vmService, supervisorMachineContext) - vmopVM.Status.PowerState = vmoprv1.VirtualMachinePoweredOn + vmopVM.Status.PowerState = vmoprv1.VirtualMachinePowerStateOn updateReconciledVMStatus(ctx, vmService, vmopVM) expectedState = vmwarev1.VirtualMachineStatePoweredOn expectedConditions[0].Reason = vmwarev1.WaitingForNetworkAddressReason @@ -360,7 +361,7 @@ var _ = Describe("VirtualMachine tests", func() { // Simulate VMOperator assigning an IP address By("VirtualMachine has an IP address") vmopVM = getReconciledVM(ctx, vmService, supervisorMachineContext) - vmopVM.Status.VmIp = vmIP + vmopVM.Status.Network.PrimaryIP4 = vmIP updateReconciledVMStatus(ctx, vmService, vmopVM) expectedConditions[0].Reason = vmwarev1.WaitingForBIOSUUIDReason requeue, err = vmService.ReconcileNormal(ctx, supervisorMachineContext) @@ -388,7 +389,7 @@ var _ = Describe("VirtualMachine tests", func() { cluster.Status.ControlPlaneReady = true vmopVM = getReconciledVM(ctx, vmService, supervisorMachineContext) - vmopVM.Status.VmIp = vmIP + vmopVM.Status.Network.PrimaryIP4 = vmIP updateReconciledVMStatus(ctx, vmService, vmopVM) requeue, err = vmService.ReconcileNormal(ctx, supervisorMachineContext) verifyOutput(supervisorMachineContext) @@ -430,13 +431,7 @@ var _ = Describe("VirtualMachine tests", func() { requeue, err = vmService.ReconcileNormal(ctx, supervisorMachineContext) vmopVM = getReconciledVM(ctx, vmService, supervisorMachineContext) errMessage := "TestVirtualMachineClassBinding not found" - vmopVM.Status.Conditions = append(vmopVM.Status.Conditions, vmoprv1.Condition{ - Type: vmoprv1.VirtualMachinePrereqReadyCondition, - Status: corev1.ConditionFalse, - Reason: vmoprv1.VirtualMachineClassBindingNotFoundReason, - Severity: vmoprv1.ConditionSeverityError, - Message: errMessage, - }) + vmoprconditions.MarkFalse(vmopVM, vmoprv1.VirtualMachineConditionCreated, "NotFound", errMessage) updateReconciledVMStatus(ctx, vmService, vmopVM) requeue, err = vmService.ReconcileNormal(ctx, supervisorMachineContext) @@ -448,7 +443,7 @@ var _ = Describe("VirtualMachine tests", func() { Type: infrav1.VMProvisionedCondition, Status: corev1.ConditionFalse, Severity: clusterv1.ConditionSeverityError, - Reason: vmoprv1.VirtualMachineClassBindingNotFoundReason, + Reason: "NotFound", Message: errMessage, }) verifyOutput(supervisorMachineContext) @@ -479,10 +474,12 @@ var _ = Describe("VirtualMachine tests", func() { vmVolume := vmoprv1.VirtualMachineVolume{ Name: "test", - PersistentVolumeClaim: &vmoprv1.PersistentVolumeClaimVolumeSource{ - PersistentVolumeClaimVolumeSource: corev1.PersistentVolumeClaimVolumeSource{ - ClaimName: "test-pvc", - ReadOnly: false, + VirtualMachineVolumeSource: vmoprv1.VirtualMachineVolumeSource{ + PersistentVolumeClaim: &vmoprv1.PersistentVolumeClaimVolumeSource{ + PersistentVolumeClaimVolumeSource: corev1.PersistentVolumeClaimVolumeSource{ + ClaimName: "test-pvc", + ReadOnly: false, + }, }, }, } @@ -536,10 +533,12 @@ var _ = Describe("VirtualMachine tests", func() { name := volumeName(vsphereMachine, volume) vmVolume := vmoprv1.VirtualMachineVolume{ Name: name, - PersistentVolumeClaim: &vmoprv1.PersistentVolumeClaimVolumeSource{ - PersistentVolumeClaimVolumeSource: corev1.PersistentVolumeClaimVolumeSource{ - ClaimName: name, - ReadOnly: false, + VirtualMachineVolumeSource: vmoprv1.VirtualMachineVolumeSource{ + PersistentVolumeClaim: &vmoprv1.PersistentVolumeClaimVolumeSource{ + PersistentVolumeClaimVolumeSource: corev1.PersistentVolumeClaimVolumeSource{ + ClaimName: name, + ReadOnly: false, + }, }, }, } diff --git a/pkg/util/testutil.go b/pkg/util/testutil.go index aad3a37f5b..db8c1bf216 100644 --- a/pkg/util/testutil.go +++ b/pkg/util/testutil.go @@ -18,7 +18,7 @@ package util import ( netopv1 "github.com/vmware-tanzu/net-operator-api/api/v1alpha1" - vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" + vmoprv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" ncpv1 "github.com/vmware-tanzu/vm-operator/external/ncp/api/v1alpha1" topologyv1 "github.com/vmware-tanzu/vm-operator/external/tanzu-topology/api/v1alpha1" corev1 "k8s.io/api/core/v1" diff --git a/test/go.sum b/test/go.sum index 8e2034b4df..a08cedc2e0 100644 --- a/test/go.sum +++ b/test/go.sum @@ -631,6 +631,7 @@ github.com/vmware-tanzu/net-operator-api v0.0.0-20240326163340-1f32d6bf7f9d h1:c github.com/vmware-tanzu/net-operator-api v0.0.0-20240326163340-1f32d6bf7f9d/go.mod h1:JbFOh22iDsT5BowJe0GgpMI5e2/S7cWaJlv9LdURVQM= github.com/vmware-tanzu/nsx-operator/pkg/apis v0.1.0 h1:HdnQb/X9vJ8a5WQ03g/0nDr9igIIK1fF6wO5wOtkJT4= github.com/vmware-tanzu/nsx-operator/pkg/apis v0.1.0/go.mod h1:Q4JzNkNMvjo7pXtlB5/R3oME4Nhah7fAObWgghVmtxk= +github.com/vmware-tanzu/vm-operator v1.8.6 h1:ZfPQjQWVvwcH5WQ4lCEMBhYHM48cHBhrmyNpEdJeN14= github.com/vmware-tanzu/vm-operator/api v1.8.6 h1:NIndORjcnSmIlQsCMIewpIwg/ocRVDh2lYjOroTVLrU= github.com/vmware-tanzu/vm-operator/api v1.8.6/go.mod h1:HHA2SNI9B5Yqtyp5t+Gt9WTWBi/fIkM6+MukDDSf11A= github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505 h1:y4wXx1FUFqqSgJ/xUOEM1DLS2Uu0KaeLADWpzpioGTU=