Skip to content

Commit

Permalink
Add OPENSHIFT_INSTALL_BOOTSTRAP_OS_IMAGE_OVERRIDE env variable to ena…
Browse files Browse the repository at this point in the history
…ble baremetal bootstrap node to work offine

Extend the work of PR: #2061
  • Loading branch information
kirankt committed Dec 4, 2019
1 parent fefa982 commit 011bad9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/asset/rhcos/bootstrap_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 011bad9

Please sign in to comment.