Skip to content

Commit b123810

Browse files
ochromyopenshift-cherrypick-robot
authored andcommitted
haproxy.router.openshift.io/timeout config for auto-created routes
fix yaml truncation fix xref link in service routes fix xref link in service routes no2 fix xref link in service routes no3 fix xref link in service routes no4 peer review feedback mr feedback mr feedback no2 mr feedback no3
1 parent cbd884c commit b123810

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

knative-serving/external-ingress-routing/configuring-service-routes.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ If you want to configure a Knative service to use your TLS certificate on {ocp-p
1212
When you complete the following procedure, the default {ocp-product-title} route in the `knative-serving-ingress` namespace is not created. However, the Knative route for the application is still created in this namespace.
1313
====
1414

15-
include::modules/serverless-openshift-routes.adoc[leveloffset=+1]
15+
include::modules/serverless-openshift-routes.adoc[leveloffset=+1]
16+
17+
[role="_additional-resources"]
18+
[id="additional-resources_{context}"]
19+
== Additional resources
20+
* xref:../config-applications/configuring-revision-timeouts.adoc#configuring-default-route-timeouts-globally_configuring-revision-timeouts[Configuring the default route timeouts]

modules/configuring-default-route-timeouts-globally.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,35 @@ By configuring the route timeouts globally, you can ensure consistent timeout se
1010

1111
You can configure the route timeouts globally by updating the `ROUTE_HAPROXY_TIMEOUT` environment value in your `serverless-operator` subscription and updating the `max-revision-timeout-seconds` field in your `KnativeServing` custom resource (CR). This applies the timeout changes across all Knative services, and you can deploy services with specific timeouts up to the maximum value set.
1212

13+
`ROUTE_HAPROXY_TIMEOUT` is an environment variable managed by the Serverless Operator and by default is set to `600`.
14+
1315
.Procedure
1416

15-
. Set the value of `ROUTE_HAPROXY_TIMEOUT` in your subscription to your required timeout in seconds by running the following command:
17+
. Set the value of `ROUTE_HAPROXY_TIMEOUT` in your subscription to your required timeout in seconds by running the following command. Note that this causes pods in the `openshift-serverless` namespace to be redeployed.
1618
+
1719
.Setting the `ROUTE_HAPROXY_TIMEOUT` value to 900 seconds
1820
[source,terminal]
1921
----
2022
$ oc patch subscription.operators.coreos.com serverless-operator -n openshift-serverless --type='merge' -p '{"spec": {"config": {"env": [{"name": "ROUTE_HAPROXY_TIMEOUT", "value": "900"}]}}}'
2123
----
2224
+
23-
The `ROUTE_HAPROXY_TIMEOUT` environment variable is managed by the Serverless Operator and by default is set to `600`. Set the value of `ROUTE_HAPROXY_TIMEOUT` in your subscription to your required timeout in seconds by running the following command. Note that this causes pods to be redeployed in the `openshift-serverless` namespace.
25+
Alternatively, you can set the value of `ROUTE_HAPROXY_TIMEOUT` in your subscription directly:
26+
+
27+
.A subscription definition with `ROUTE_HAPROXY_TIMEOUT` set to 900 seconds
28+
[source,yaml]
29+
----
30+
apiVersion: operators.coreos.com/v1alpha1
31+
kind: Subscription
32+
metadata:
33+
#...
34+
spec:
35+
channel: stable
36+
config:
37+
env:
38+
- name: ROUTE_HAPROXY_TIMEOUT
39+
value: '900'
40+
#...
41+
----
2442
+
2543
[NOTE]
2644
====

modules/serverless-openshift-routes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ spec:
108108
-----END CERTIFICATE----
109109
wildcardPolicy: None
110110
----
111-
<1> The timeout value for the {ocp-product-title} route. You must set the same value as the `max-revision-timeout-seconds` setting (`600s` by default).
111+
<1> The timeout value for the {ocp-product-title} route. You must set the same value as the `max-revision-timeout-seconds` setting (`600s` by default). You can also set the default timeout value for auto-generated {ocp-product-title} routes.
112112
<2> The name of the {ocp-product-title} route.
113113
<3> The namespace for the {ocp-product-title} route. This must be `knative-serving-ingress`.
114114
<4> The hostname for external access. You can set this to `<service_name>-<service_namespace>.<domain>`.

0 commit comments

Comments
 (0)