Skip to content

Commit e6b4905

Browse files
committed
PowerVS: Also fill out PlatformSpec for custom endpoints
When custom endpoints are passed into install config, we also need to fill out config.Spec.PlatformSpec.PowerVS.ServiceEndpoints as the PowerVS machine provider checks there.
1 parent 90915ce commit e6b4905

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/asset/manifests/infrastructure.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
278278
}
279279
case powervs.Name:
280280
config.Spec.PlatformSpec.Type = configv1.PowerVSPlatformType
281+
config.Spec.PlatformSpec.PowerVS = &configv1.PowerVSPlatformSpec{}
281282
var cisInstanceCRN, dnsInstanceCRN string
282283
var err error
283284
switch installConfig.Config.Publish {
@@ -294,6 +295,12 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
294295
default:
295296
return errors.New("unknown publishing strategy")
296297
}
298+
for _, service := range installConfig.Config.Platform.PowerVS.ServiceEndpoints {
299+
config.Spec.PlatformSpec.PowerVS.ServiceEndpoints = append(config.Spec.PlatformSpec.PowerVS.ServiceEndpoints, configv1.PowerVSServiceEndpoint{
300+
Name: service.Name,
301+
URL: service.URL,
302+
})
303+
}
297304
config.Status.PlatformStatus.PowerVS = &configv1.PowerVSPlatformStatus{
298305
Region: installConfig.Config.Platform.PowerVS.Region,
299306
Zone: installConfig.Config.Platform.PowerVS.Zone,

0 commit comments

Comments
 (0)