Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions scaleway/loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,17 @@ func getCertificateIDs(service *v1.Service, port int32) ([]string, error) {
ids = append(ids, strings.Split(split[1], ",")...)
}
}
// normalize the ids (ie strip the region prefix if any)
for i := range ids {
if strings.Contains(ids[i], "/") {
splitID := strings.Split(ids[i], "/")
if len(splitID) != 2 {
klog.Errorf("unable to get certificate ID from %s", ids[i])
return nil, fmt.Errorf("unable to get certificate ID from %s", ids[i])
}
ids[i] = splitID[1]
}
}

return ids, nil
}