diff --git a/config/deployments/integration-tests/README.md b/config/deployments/integration-tests/README.md new file mode 100644 index 0000000000..bfd9569e62 --- /dev/null +++ b/config/deployments/integration-tests/README.md @@ -0,0 +1,15 @@ +# Integration tests + +The [crds](./crds/) are copied from the vm-operators version which is consumed as go module. + +These should get updated when bumping the dependency vm-operator dependency. + +To sync the new CRD's use the following script **and** update `kustomization.yaml` accordingly. + +```sh +make clean-vm-operator checkout-vm-operator +rm -r config/deployments/integration-tests/crds +cp -r test/infrastructure/vm-operator/vm-operator.tmp/config/crd/bases config/deployments/integration-tests/crds + +make clean-vm-operator +``` diff --git a/pkg/services/vmoperator/vmopmachine.go b/pkg/services/vmoperator/vmopmachine.go index 8c756a0a27..159ff7f6b5 100644 --- a/pkg/services/vmoperator/vmopmachine.go +++ b/pkg/services/vmoperator/vmopmachine.go @@ -335,7 +335,7 @@ func (v *VmopMachineService) reconcileVMOperatorVM(ctx context.Context, supervis vmOperatorVM.Spec.StorageClass = supervisorMachineCtx.VSphereMachine.Spec.StorageClass } vmOperatorVM.Spec.PowerState = vmoprv1.VirtualMachinePowerStateOn - if vmOperatorVM.Spec.Reserved == nil { + if vmOperatorVM.Spec.Reserved == nil && supervisorMachineCtx.VSphereCluster.Status.ResourcePolicyName != "" { vmOperatorVM.Spec.Reserved = &vmoprv1.VirtualMachineReservedSpec{} } if vmOperatorVM.Spec.Reserved.ResourcePolicyName == "" {