Avoid setting default CPU model for ARM64 VMIs
@@ -83,7 +83,6 @@ func (mutator *VMIsMutator) Mutate(ar *admissionv1.AdmissionReview) *admissionv1
// Set VMI defaults
log.Log.Object(newVMI).V(4).Info("Apply defaults")
- mutator.setDefaultCPUModel(newVMI)
mutator.setDefaultMachineType(newVMI)
mutator.setDefaultResourceRequests(newVMI)
mutator.setDefaultGuestCPUTopology(newVMI)
@@ -115,6 +114,8 @@ func (mutator *VMIsMutator) Mutate(ar *admissionv1.AdmissionReview) *admissionv1
// if SetVirtualMachineInstanceArm64Defaults fails, it's due to a validation error, which will get caught in the validation webhook after mutation finishes.
log.Log.V(2).Infof("Failed to setting for Arm64: %s", err)
}
+ } else {
+ mutator.setDefaultCPUModel(newVMI)
}
if newVMI.IsRealtimeEnabled() {
log.Log.V(4).Info("Add realtime node label selector")
