From 011bad942b985a045cde21b2a0fecda27b567364 Mon Sep 17 00:00:00 2001 From: kirankt Date: Fri, 22 Nov 2019 09:23:36 -0600 Subject: [PATCH] Add OPENSHIFT_INSTALL_BOOTSTRAP_OS_IMAGE_OVERRIDE env variable to enable baremetal bootstrap node to work offine Extend the work of PR: https://github.com/openshift/installer/pull/2061 --- pkg/asset/rhcos/bootstrap_image.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/asset/rhcos/bootstrap_image.go b/pkg/asset/rhcos/bootstrap_image.go index c1d48afbdd3..752025b2e43 100644 --- a/pkg/asset/rhcos/bootstrap_image.go +++ b/pkg/asset/rhcos/bootstrap_image.go @@ -3,8 +3,11 @@ package rhcos import ( "context" + "os" "time" + "github.com/sirupsen/logrus" + "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/installconfig" "github.com/openshift/installer/pkg/rhcos" @@ -33,6 +36,12 @@ func (i *BootstrapImage) Dependencies() []asset.Asset { // Generate the RHCOS Bootstrap image location. func (i *BootstrapImage) Generate(p asset.Parents) error { + if oi, ok := os.LookupEnv("OPENSHIFT_INSTALL_BOOTSTRAP_OS_IMAGE_OVERRIDE"); ok && oi != "" { + logrus.Warn("Found override for Bootstrap OS Image. Please be warned, this is not advised") + *i = BootstrapImage(oi) + return nil + } + ic := &installconfig.InstallConfig{} p.Get(ic) config := ic.Config