Skip to content

Commit

Permalink
Use the COS endpoint override when generating bootstrap ignition (#1860)
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 12, 2024
1 parent 05cd6ef commit af008bd
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 @@ -422,6 +422,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 af008bd

Please sign in to comment.