Skip to content

Commit

Permalink
fix kubev2v#452: remove DefaultVirtV2vImage
Browse files Browse the repository at this point in the history
We should never fallback to use hard-coded images but rather fail when
an image is missing. Thus, removing DefaultVirtV2vImage that pointed to
forklift-virt-v2v:latest in quay.io and returning an error when
VIRT_V2V_IMAGE is not specified instead.

Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Nov 12, 2023
1 parent 7d3349a commit 07f314c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions pkg/settings/migration.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package settings

import (
"fmt"
"os"
"strings"

Expand All @@ -21,11 +22,6 @@ const (
FileSystemOverhead = "FILESYSTEM_OVERHEAD"
)

// Default virt-v2v image.
const (
DefaultVirtV2vImage = "quay.io/kubev2v/forklift-virt-v2v:latest"
)

// Migration settings
type Migration struct {
// Max VMs in-flight.
Expand Down Expand Up @@ -79,9 +75,8 @@ func (r *Migration) Load() (err error) {
r.VirtV2vImageCold = virtV2vImage
r.VirtV2vImageWarm = virtV2vImage
}
} else {
r.VirtV2vImageCold = DefaultVirtV2vImage
r.VirtV2vImageWarm = DefaultVirtV2vImage
} else if Settings.Role.Has(MainRole) {
return liberr.Wrap(fmt.Errorf("failed to find environment variable %s", VirtV2vImage))
}
r.VirtV2vDontRequestKVM = getEnvBool(VirtV2vDontRequestKVM, false)
if r.CDIExportTokenTTL, err = getPositiveEnvLimit(CDIExportTokenTTL, 0); err != nil {
Expand Down

0 comments on commit 07f314c

Please sign in to comment.