Skip to content

Commit af008bd

Browse files
authored
Use the COS endpoint override when generating bootstrap ignition (#1860)
When overridding the COS endpoint in the disconnected use case, we'll need to also grab ignition from the same endpoint.
1 parent 05cd6ef commit af008bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cloud/scope/powervs_machine.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,12 @@ func (m *PowerVSMachineScope) createIgnitionData(data []byte) (string, error) {
422422
}
423423

424424
objHost := fmt.Sprintf("%s.s3.%s.%s", bucket, region, cosURLDomain)
425+
426+
cosServiceEndpoint := endpoints.FetchEndpoints(string(endpoints.COS), m.ServiceEndpoint)
427+
if cosServiceEndpoint != "" {
428+
m.Logger.V(3).Info("Overriding the default COS endpoint in ignition URL", "cosEndpoint", cosServiceEndpoint)
429+
objHost = fmt.Sprintf("%s.%s", bucket, cosServiceEndpoint)
430+
}
425431
objectURL := &url.URL{
426432
Scheme: "https",
427433
Host: objHost,

0 commit comments

Comments
 (0)