Skip to content

Commit

Permalink
minor changes for -o yaml support
Browse files Browse the repository at this point in the history
Signed-off-by: Bella Khizgiyaev <[email protected]>
  • Loading branch information
bkhizgiy committed Sep 2, 2024
1 parent 9cd5d11 commit a27f2b0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ spec:
The VM Namespace
Only relevant for an openshift source.
type: string
operatingSystem:
description: The Operating System detected by virt-v2v.
type: string
newName:
description: The new name of the VM after matching DNS1123 requirements.
type: string
operatingSystem:
description: The Operating System detected by virt-v2v.
type: string
phase:
description: Phase
type: string
Expand Down
6 changes: 3 additions & 3 deletions operator/config/crd/bases/forklift.konveyor.io_plans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -888,13 +888,13 @@ spec:
The VM Namespace
Only relevant for an openshift source.
type: string
operatingSystem:
description: The Operating System detected by virt-v2v.
type: string
newName:
description: The new name of the VM after matching DNS1123
requirements.
type: string
operatingSystem:
description: The Operating System detected by virt-v2v.
type: string
phase:
description: Phase
type: string
Expand Down
14 changes: 8 additions & 6 deletions pkg/controller/plan/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ func (r *KubeVirt) UpdateVmByConvertedConfig(vm *plan.VMStatus, pod *core.Pod, s
return
}
r.Log.Info("Setting the vm firmware ", vm.Firmware, "vmId", vm.ID)
case api.VSphere:

if vm.OperatingSystem, err = util.GetOperationSystemFromYaml(vmConf); err != nil {
err = liberr.Wrap(err)
return
Expand Down Expand Up @@ -1719,11 +1719,13 @@ func (r *KubeVirt) guestConversionPod(vm *plan.VMStatus, vmVolumes []cnv.Volume,
})
}

environment = append(environment,
core.EnvVar{
Name: "V2V_NewName",
Value: vm.NewName,
})
if vm.NewName != "" {
environment = append(environment,
core.EnvVar{
Name: "V2V_NewName",
Value: vm.NewName,
})
}

// pod annotations
annotations := map[string]string{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/plan/util/kubevirtvmparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

const (
// Name.
Name = "virt-v2v-parser"
Name = "kubevirt-vm-parser"
)

// Package logger.
Expand Down

0 comments on commit a27f2b0

Please sign in to comment.