-
Feature Request
-
Resolution: Done
-
Major
-
2.11.3 GA
-
5
-
False
-
None
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
API CCS Sprint 39 (3Scale), API CCS Sprint 40 (3Scale), API CCS Sprint 44 (3Scale) 2
This RFE is to update the standard APIcast configuration endpoint to use /admin/api/account/proxy_configs/${ENV}, instead of loading services individually via /admin/api/services/${ID}/proxy/configs/${ENV}/${VERSION}.json', when the THREESCALE_PORTAL_ENDPOINT is an admin portal. Nothing should change when THREESCALE_PORTAL_ENDPOINT points to master.
The new endpoint provides a configuration similar to that returned by the master endpoint, it takes two query parameters: host and version and returns all services that match the given host.
With the proposed implementation, APICAST_LOAD_SERVICES_WHEN_NEEDED is deprecated and the configuration is fetched "when needed" by default whenever possible, with the following logic:
- THREESCALE_PORTAL_ENDPOINT has no path (admin)
- APICAST_CONFIGURATION_LOADER=boot
http://${THREESCALE_PORTAL_ENDPOINT}/admin/api/account/proxy_configs/<env>.json?version=latest
(i.e. all services from proxy_configs endpoint). Using the new endpoint now one request is enough, no need to loop through all services.
- APICAST_CONFIGURATION_LOADER=boot
-
- APICAST_CONFIGURATION_LOADER=lazy
http://${THREESCALE_PORTAL_ENDPOINT}/admin/api/account/proxy_configs/<env>.json?host=host&version=latest
(i.e. services that match host, from proxy_configs endpoint). This matches the current behaviour when APICAST_LOAD_SERVICES_WHEN_NEEDED is enabled.
- APICAST_CONFIGURATION_LOADER=lazy
- THREESCALE_PORTAL_ENDPOINT has a path (master)
- APICAST_CONFIGURATION_LOADER=boot
http://${THREESCALE_PORTAL_ENDPOINT}/<env>.json
(i.e. all services from master endpoint). Same as the current behaviour.
- APICAST_CONFIGURATION_LOADER=boot
-
- APICAST_CONFIGURATION_LOADER=lazy
http://${THREESCALE_PORTAL_ENDPOINT}/<env>.json?host=host
(i.e. services that match host from master endpoint). Same as the current behaviour.
- APICAST_CONFIGURATION_LOADER=lazy
Open Points:
- Currently the endpoint /admin/api/account/proxy_configs/${ENV} is paginated, and APIcast does not handle pages, Pagination will be implemented as part of https://issues.redhat.com/browse/THREESCALE-8373
- The exception to the logic above would be when the env var APICAST_SERVICE_%s_CONFIGURATION_VERSION is provided. In that case, the gateway would load service's proxy configuration one by one, ie. 1 req to fetch services, N request for each service to fetch proxy configuration. Note that APICAST_SERVICE_%s_CONFIGURATION_VERSION cannot be used when APIcast is configured to fetch master proxy configuration (i.e. the portal endpoint has a path).
- incorporates
-
THREESCALE-7945 APICAST_PATH_ROUTING=true causes 404 when it should use the stale config object
- Closed
-
THREESCALE-8485 APIcast cannot retrieve latest version of proxy config
- Closed
- relates to
-
THREESCALE-8373 APIcast does not load all pages of services or proxy configs
- Closed
- mentioned on