Skip to content

Commit e93be5a

Browse files
committed
pkg/infrastructure/azure: skip image creation
Now that we can use marketplace images, we only need to create managed images for OKD or AzureStack.
1 parent a614b91 commit e93be5a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pkg/infrastructure/azure/azure.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"math/rand"
77
"net/http"
8-
"os"
98
"strings"
109
"time"
1110

@@ -94,8 +93,6 @@ func (p Provider) ProvisionTimeout() time.Duration {
9493
func (*Provider) PublicGatherEndpoint() clusterapi.GatherEndpoint { return clusterapi.APILoadBalancer }
9594

9695
// InfraReady is called once the installer infrastructure is ready.
97-
//
98-
//nolint:gocyclo //TODO(padillon): forthcoming marketplace image support should help reduce complexity here.
9996
func (p *Provider) InfraReady(ctx context.Context, in clusterapi.InfraReadyInput) error {
10097
session, err := in.InstallConfig.Azure.Session()
10198
if err != nil {
@@ -255,9 +252,8 @@ func (p *Provider) InfraReady(ctx context.Context, in clusterapi.InfraReadyInput
255252
logrus.Debugf("StorageAccount.ID=%s", *storageAccount.ID)
256253
}
257254

258-
// Upload the image to the container
259-
_, skipImageUpload := os.LookupEnv("OPENSHIFT_INSTALL_SKIP_IMAGE_UPLOAD")
260-
if !(skipImageUpload || platform.CloudName == aztypes.StackCloud) {
255+
// Create a managed image, which is only used for OKD, as OCP can use marketplace images.
256+
if installConfig.IsOKD() && platform.CloudName != aztypes.StackCloud {
261257
// Create vhd blob storage container
262258
publicAccess := armstorage.PublicAccessNone
263259
createBlobContainerOutput, err := CreateBlobContainer(ctx, &CreateBlobContainerInput{

0 commit comments

Comments
 (0)