github.com/openshift/installer@v1.4.17/pkg/asset/installconfig/powervs/platform.go (about) 1 package powervs 2 3 import ( 4 "os" 5 6 "github.com/openshift/installer/pkg/types/powervs" 7 ) 8 9 // Platform collects powervs-specific configuration. 10 func Platform() (*powervs.Platform, error) { 11 12 bxCli, err := NewBxClient(true) 13 if err != nil { 14 return nil, err 15 } 16 17 var p powervs.Platform 18 19 // @TODO: The way we're using this (a precreated boot image in a Power VS Service instance) doesn't 20 // align with the installer's definition of this. We need a new var here and in the install config. 21 // This should be done before code cutoff in a followon PR. 22 if osOverride := os.Getenv("OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE"); len(osOverride) != 0 { 23 p.ClusterOSImage = osOverride 24 } 25 26 p.Region = bxCli.Region 27 p.Zone = bxCli.Zone 28 p.UserID = bxCli.User.ID 29 p.PowerVSResourceGroup = bxCli.PowerVSResourceGroup 30 31 return &p, nil 32 }