Currently it is only possible to configure the Upstream Connection Policy by Product.
The request is to be able to configure the timeouts handled by the policy globally for all services, for example via environment variables.
Update 09.08.2024
Fixed in THREESCALE-9320.
Fixed in https://github.com/3scale/APIcast/pull/1485
How to test
- Create a lua file call upstream_connection_custom_env.lua with the following content.
local cjson = require('cjson') local PolicyChain = require('apicast.policy_chain') local policy_chain = context.policy_chain local upstream_connection_policy_config = cjson.decode([[ { "send_timeout": 120, "connect_timeout": 120, "read_timeout": 120 } ]]) policy_chain:insert( PolicyChain.load_policy('upstream_connection', 'builtin', upstream_connection_policy_config), 2) return { policy_chain = policy_chain, port = { metrics = 9421 }
- Create a secret with the custom environment content:
oc create secret generic logging-custom-env --from-file=./upstream_connection_custom_env.lua
- For self-managed APIcast, configure and deploy the APIcast CR with the APIcast custom environment:
apiVersion: apps.3scale.net/v1alpha1
kind: APIcast
metadata:
name: apicast-staging
spec:
customEnvironments:
- secretRef:
name: upstream_connection_custom_env
- For managed APIcast, configure 3scale CR as follow:
spec:
apicast:
productionSpec:
customEnvironments:
- secretRef:
name: upstream_connection_custom_env
- is related to
-
THREESCALE-8146 Investigate the reason why some policies cannot be configured globally
-
- Closed
-
- links to
-
RHEA-2025:146559
Red Hat 3scale API Management 2.16.0 Release - Container Images
- mentioned on