Skip to content

Commit 49caba5

Browse files
committed
Updates VMOP API dependency
1 parent 87609a7 commit 49caba5

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/vmware-tanzu/net-operator-api v0.0.0-20240326163340-1f32d6bf7f9d
1111
github.com/vmware-tanzu/nsx-operator/pkg/apis v0.0.0-20241112044858-9da8637c1b0d
1212
// The version of vm-operator should be kept in sync with the manifests at: config/deployments/integration-tests
13-
github.com/vmware-tanzu/vm-operator/api v1.9.1-0.20250908141901-a9e1dfbc0045
13+
github.com/vmware-tanzu/vm-operator/api v1.9.1-0.20251007154704-e2d6e85d9ec7
1414
github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505
1515
github.com/vmware/govmomi v0.51.0
1616
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ github.com/vmware-tanzu/net-operator-api v0.0.0-20240326163340-1f32d6bf7f9d h1:c
221221
github.com/vmware-tanzu/net-operator-api v0.0.0-20240326163340-1f32d6bf7f9d/go.mod h1:JbFOh22iDsT5BowJe0GgpMI5e2/S7cWaJlv9LdURVQM=
222222
github.com/vmware-tanzu/nsx-operator/pkg/apis v0.0.0-20241112044858-9da8637c1b0d h1:z9lrzKVtNlujduv9BilzPxuge/LE2F0N1ms3TP4JZvw=
223223
github.com/vmware-tanzu/nsx-operator/pkg/apis v0.0.0-20241112044858-9da8637c1b0d/go.mod h1:Q4JzNkNMvjo7pXtlB5/R3oME4Nhah7fAObWgghVmtxk=
224-
github.com/vmware-tanzu/vm-operator/api v1.9.1-0.20250908141901-a9e1dfbc0045 h1:zME8crazIAWVJGboJpSLl+qcRYQ8yA6hPQojz28gY5M=
225-
github.com/vmware-tanzu/vm-operator/api v1.9.1-0.20250908141901-a9e1dfbc0045/go.mod h1:hkc/QZCSHcosWWMPS6VWWR12WenZcNE3BaTJ/8A8sNE=
224+
github.com/vmware-tanzu/vm-operator/api v1.9.1-0.20251007154704-e2d6e85d9ec7 h1:VlnaiDKI1H1buwBOgL8R3HRB3EQNN96xMdz25vE5FUo=
225+
github.com/vmware-tanzu/vm-operator/api v1.9.1-0.20251007154704-e2d6e85d9ec7/go.mod h1:nWTPpxfe4gHuuYuFcrs86+NMxfkqPk3a3IlvI8TCWak=
226226
github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505 h1:y4wXx1FUFqqSgJ/xUOEM1DLS2Uu0KaeLADWpzpioGTU=
227227
github.com/vmware-tanzu/vm-operator/external/ncp v0.0.0-20240404200847-de75746a9505/go.mod h1:5rqRJ9zGR+KnKbkGx373WgN8xJpvAj99kHnfoDYRO5I=
228228
github.com/vmware/govmomi v0.51.0 h1:n3RLS9aw/irTOKbiIyJzAb6rOat4YOVv/uDoRsNTSQI=

pkg/services/vmoperator/vmopmachine.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ func (v *VmopMachineService) SyncFailureReason(_ context.Context, machineCtx cap
165165
}
166166

167167
type affinityInfo struct {
168-
vmAffinitySpec *vmoprv1.VirtualMachineAffinitySpec
169-
vmGroupName string
170-
failureDomain *string
168+
affinitySpec *vmoprv1.AffinitySpec
169+
vmGroupName string
170+
failureDomain *string
171171

172172
// TODO: is this needed for the single zone case?
173173
// zones []topologyv1.Zone
@@ -246,10 +246,12 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap
246246
mdNames = append(mdNames, machineDeployment.Name)
247247
}
248248
}
249+
// turn to v4 log
250+
log.V(2).Info("Gathered anti-affine MDs", "mdNames", mdNames)
249251

250-
affInfo.vmAffinitySpec = &vmoprv1.VirtualMachineAffinitySpec{
251-
VMAffinity: &vmoprv1.VirtualMachineAffinityVMAffinitySpec{
252-
RequiredDuringSchedulingIgnoredDuringExecution: []vmoprv1.VMAffinityTerm{
252+
affInfo.affinitySpec = &vmoprv1.AffinitySpec{
253+
VMAffinity: &vmoprv1.VMAffinitySpec{
254+
RequiredDuringSchedulingPreferredDuringExecution: []vmoprv1.VMAffinityTerm{
253255
{
254256
LabelSelector: &metav1.LabelSelector{
255257
MatchLabels: map[string]string{
@@ -260,7 +262,7 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap
260262
},
261263
},
262264
},
263-
VMAntiAffinity: &vmoprv1.VirtualMachineAntiAffinityVMAffinitySpec{
265+
VMAntiAffinity: &vmoprv1.VMAntiAffinitySpec{
264266
PreferredDuringSchedulingPreferredDuringExecution: []vmoprv1.VMAffinityTerm{
265267
{
266268
LabelSelector: &metav1.LabelSelector{
@@ -270,8 +272,6 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap
270272
},
271273
TopologyKey: corev1.LabelHostname,
272274
},
273-
},
274-
PreferredDuringSchedulingIgnoredDuringExecution: []vmoprv1.VMAffinityTerm{
275275
{
276276
LabelSelector: &metav1.LabelSelector{
277277
MatchExpressions: []metav1.LabelSelectorRequirement{
@@ -599,9 +599,9 @@ func (v *VmopMachineService) reconcileVMOperatorVM(ctx context.Context, supervis
599599
vmOperatorVM = typedModified
600600
}
601601

602-
if affinityInfo != nil && affinityInfo.vmAffinitySpec != nil {
602+
if affinityInfo != nil && affinityInfo.affinitySpec != nil {
603603
if vmOperatorVM.Spec.Affinity == nil {
604-
vmOperatorVM.Spec.Affinity = affinityInfo.vmAffinitySpec
604+
vmOperatorVM.Spec.Affinity = affinityInfo.affinitySpec
605605
}
606606
if vmOperatorVM.Spec.GroupName == "" {
607607
vmOperatorVM.Spec.GroupName = affinityInfo.vmGroupName

0 commit comments

Comments
 (0)