diff --git a/pkg/asset/rhcos/image.go b/pkg/asset/rhcos/image.go index 06418de4174..f9cb5c2eef8 100644 --- a/pkg/asset/rhcos/image.go +++ b/pkg/asset/rhcos/image.go @@ -78,7 +78,7 @@ func osImage(config *types.InstallConfig) (string, error) { case libvirt.Name: osimage, err = rhcos.QEMU(ctx) case openstack.Name: - osimage = "rhcos" + osimage = config.Platform.OpenStack.BaseImage case azure.Name: osimage, err = rhcos.VHD(ctx) case baremetal.Name: diff --git a/pkg/types/openstack/defaults/platform.go b/pkg/types/openstack/defaults/platform.go index fba2332da21..ff8c40a62ca 100644 --- a/pkg/types/openstack/defaults/platform.go +++ b/pkg/types/openstack/defaults/platform.go @@ -23,6 +23,10 @@ func SetPlatformDefaults(p *openstack.Platform) { p.Cloud = DefaultCloudName } } + + if p.BaseImage == "" { + p.BaseImage = "rhcos" + } } // APIVIP returns the internal virtual IP address (VIP) put in front diff --git a/pkg/types/openstack/platform.go b/pkg/types/openstack/platform.go index 939aa027084..0b153e1f6c7 100644 --- a/pkg/types/openstack/platform.go +++ b/pkg/types/openstack/platform.go @@ -28,6 +28,10 @@ type Platform struct { // Existing Floating IP to associate with the OpenStack load balancer. LbFloatingIP string `json:"lbFloatingIP"` + // BaseImage + // Name of the Red Hat CoreOS image in Glance. + BaseImage string `json:"baseImage"` + // TrunkSupport // Whether OpenStack ports can be trunked TrunkSupport string `json:"trunkSupport"`