-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem statement
Up until now, this SDK worked around the global URLs for calls that were not targeted for the default API (prod) with the following work around:
sdk-konnect-go/internal/hooks/url.go
Lines 13 to 25 in db15240
switch hookCtx.OperationID { | |
case "get-organizations-me": | |
// NOTE(pmalek): This is because we merge OpenAPI specs and /organizations/me | |
// is only served by the global API. | |
// @mheap mentioned that we can add operation specific URLs to do away with this. | |
if strings.HasSuffix(req.URL.Host, "api.konghq.tech") { | |
req.URL.Host = "global.api.konghq.tech" | |
} else { | |
req.URL.Host = "global.api.konghq.com" | |
} | |
} | |
return req, nil | |
} |
This doesn't scale.
Recently, working on KIC's user roles cleanup code (https://github.com/Kong/kubernetes-ingress-controller/blob/main/hack/cleanup/konnect_control_planes.go) I've noticed that listing user roles has the same problem and that would require adding yet another operation ID to to above linked workaround.
This issue tracks the effort to provide a proper solution for this problem.
Metadata
Metadata
Assignees
Labels
No labels