From 7258cdc916805847a2269d83d5b2734da8d626f9 Mon Sep 17 00:00:00 2001 From: Mark Hamzy Date: Fri, 14 Feb 2025 18:20:35 -0600 Subject: [PATCH] PowerVS: cos eu-es hack If the COS location to use is different than the VPC region, then we need to rename the bucket name to correctly download the image. --- pkg/asset/manifests/powervs/cluster.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/asset/manifests/powervs/cluster.go b/pkg/asset/manifests/powervs/cluster.go index 9455d3dbde..ed5aeb925a 100644 --- a/pkg/asset/manifests/powervs/cluster.go +++ b/pkg/asset/manifests/powervs/cluster.go @@ -212,6 +212,11 @@ func GenerateClusterAssets(installConfig *installconfig.InstallConfig, clusterID File: asset.File{Filename: "02_powervs-cluster.yaml"}, }) + if vpcRegion != cosRegion { + logrus.Debugf("GenerateClusterAssets: vpcRegion(%s) is different than cosRegion(%s), cosRegion. Overriding bucket name", vpcRegion, cosRegion) + bucket = fmt.Sprintf("rhcos-powervs-images-%s", cosRegion) + } + powerVSImage = &capibm.IBMPowerVSImage{ TypeMeta: metav1.TypeMeta{ APIVersion: capibm.GroupVersion.String(),