From cf376dfbd49a4e79fc789f9d0153e083216a48f2 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Fri, 25 Aug 2023 13:10:51 +0530 Subject: [PATCH] image: Add microshift preset to pull container image As part of a9c0b4cf we didn't add microshift preset. This PR add microshift preset to fetch default container image when it is available to `quay.io`. --- pkg/crc/constants/constants.go | 2 ++ pkg/crc/image/image.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/crc/constants/constants.go b/pkg/crc/constants/constants.go index 90403198a6..e90f82c284 100644 --- a/pkg/crc/constants/constants.go +++ b/pkg/crc/constants/constants.go @@ -234,6 +234,8 @@ func getImageName(preset crcpreset.Preset) string { return "podman-bundle" case crcpreset.OKD: return "okd-bundle" + case crcpreset.Microshift: + return "microshift-bundle" default: return "openshift-bundle" } diff --git a/pkg/crc/image/image.go b/pkg/crc/image/image.go index 2cd5f864a7..dccfdae328 100644 --- a/pkg/crc/image/image.go +++ b/pkg/crc/image/image.go @@ -104,6 +104,8 @@ func getPresetNameE(imageName string) (crcpreset.Preset, error) { return crcpreset.OKD, nil case "podman-bundle": return crcpreset.Podman, nil + case "microshift-bundle": + return crcpreset.Microshift, nil default: return crcpreset.OpenShift, fmt.Errorf("invalid image name '%s' (Should be openshift-bundle, okd-bundle or podman-bundle)", imageName) }