Skip to content

Commit

Permalink
chore: temp debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Dustin Scott <[email protected]>
  • Loading branch information
scottd018 committed Nov 26, 2024
1 parent b96cfc1 commit e2fe099
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion resources/virtualmachineinstance.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package resources
import (
"encoding/json"
"fmt"
"log"

admissionv1 "k8s.io/api/admission/v1"
corev1 "kubevirt.io/api/core/v1"
Expand Down Expand Up @@ -100,6 +101,7 @@ func (vmi virtualMachineInstance) isWindows() bool {
func (vmi virtualMachineInstance) hasSysprepVolume() bool {
for _, volume := range vmi.Spec.Volumes {
if volume.Sysprep != nil {
log.Println("has sysprep vol")
return true
}
}
Expand All @@ -120,6 +122,7 @@ func (vmi virtualMachineInstance) hasWindowsDriverDiskVolume() bool {
}

if volume.DataVolume.Name == "windows-drivers-disk" {
log.Println("has windows driver disk")
return true
}
}
Expand All @@ -136,5 +139,10 @@ func (vmi virtualMachineInstance) hasHyperV() bool {
return false
}

return vmi.Spec.Domain.Features.Hyperv != nil
if vmi.Spec.Domain.Features.Hyperv != nil {
log.Println("has hyperv")
return true
}

return false
}

0 comments on commit e2fe099

Please sign in to comment.