Skip to content

Commit

Permalink
Use the COS endpoint override when generating bootstrap ignition
Browse files Browse the repository at this point in the history
When overridding the COS endpoint in the disconnected use case,
we'll need to also grab ignition from the same endpoint.
  • Loading branch information
mjturek committed Jul 2, 2024
1 parent fbbd4e6 commit 560153e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cloud/scope/powervs_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ func (m *PowerVSMachineScope) createIgnitionData(data []byte) (string, error) {
}

objHost := fmt.Sprintf("%s.s3.%s.%s", bucket, region, cosURLDomain)

cosServiceEndpoint := endpoints.FetchEndpoints(string(endpoints.COS), m.ServiceEndpoint)
if cosServiceEndpoint != "" {
m.Logger.V(3).Info("Overriding the default COS endpoint in ignition URL", "cosEndpoint", cosServiceEndpoint)
objHost = fmt.Sprintf("%s.%s", bucket, cosServiceEndpoint)
}
objectURL := &url.URL{
Scheme: "https",
Host: objHost,
Expand Down

0 comments on commit 560153e

Please sign in to comment.