Skip to content

Commit a169854

Browse files
committed
[SRVKS-1289] Timeout seconds for revisions - follow up
Add revision response start and idle timeout Fix double dots Remove TODOs Replace values in snippets Add per revision config Correct per revision config QE feedback for SRVKS-1289 Change wording in procedure QE and PR feedback for SRVKS-1289 QE and PR feedback for SRVKS-1289 corrections QE and PR feedback corrections no2 Build fix NOTE fix Response start NOTE fix Revision timeout NOTE fix Raise to increase PR feedback no2 for SRVKS-1289 PR feedback no2 correction for SRVKS-1289 PR feedback no3 for SRVKS-1289 PR feedback no3 correction for SRVKS-1289 fix prereq wording conflict resolve with SRVKS-1306 conflict resolve with SRVKS-1306 no2 MR feedback no4
1 parent 029ba42 commit a169854

6 files changed

+152
-11
lines changed

knative-serving/config-applications/configuring-revision-timeouts.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ include::modules/configuring-revision-timeout.adoc[leveloffset=+1]
1414
//Configuring maximum revision timeout
1515
include::modules/configuring-maximum-revision-timeout.adoc[leveloffset=+1]
1616

17+
//Configuring revision response to start timeout
18+
include::modules/serverless-configuring-response-start-timeout.adoc[leveloffset=+1]
19+
20+
//Configuring idle revision timeout
21+
include::modules/serverless-configuring-revision-idle-timeout.adoc[leveloffset=+1]
22+
1723
//Long-running requests
1824
include::modules/serverless-long-running-requests.adoc[leveloffset=+1]
1925

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
// Module included in the following assemblies:
22
//
33
// * knative-serving/config-applications/configuring-revision-timeouts.adoc
4-
:_content-type: PROCEDURE
4+
5+
:_mod-docs-content-type: PROCEDURE
56
[id="configuring-maximum-revision-timeout_{context}"]
67
= Configuring maximum revision timeout
78

8-
By seting the maximum revision timeout, you can ensure that no revision can exceed a specific limit.
9+
By seting the maximum revision timeout, you can ensure that no revision can exceed a specific limit. The value of your maximum revision timeout must not exceed the `terminationGracePeriodSeconds` value of the activator to prevent in-flight requests being disrupted.
910

1011
.Prerequisites
1112

1213
* You have installed the {ServerlessOperatorName} and Knative Serving.
13-
* You have cluster administrator permissions on {ocp-product-title}, or cluster or dedicated administrator permissions on {rosa-product-title} or {dedicated-product-title}.
14+
* You have the required permissions for your cluster:
15+
** Cluster administrator permissions on {ocp-product-title}
16+
** Cluster administrator or dedicated administrator permissions on {rosa-product-title}
17+
** Cluster administrator or dedicated administrator permissions on {dedicated-product-title}
1418
1519
.Procedure
1620

1721
* To configure the maximum revision timeout, set the `max-revision-timeout-seconds` field in the `KnativeServing` custom resource (CR):
1822
+
19-
[NOTE]
20-
----
21-
If this value is increased, the activator `terminationGracePeriodSeconds` should also be increased to prevent in-flight requests being disrupted.
22-
----
23-
+
2423
[source,yaml]
2524
----
2625
apiVersion: operator.knative.dev/v1beta1
@@ -33,3 +32,11 @@ spec:
3332
defaults:
3433
max-revision-timeout-seconds: "600"
3534
----
35+
36+
+
37+
[NOTE]
38+
====
39+
To set the maximum revision timeout to a value over 600 seconds (10 minutes), you must increase the default {ocp-product-title} route timeout.
40+
41+
For instructions on how to configure timeouts for requests exceeding the default 600 seconds (10 minutes), see "Long-running requests".
42+
====

modules/configuring-revision-timeout.adoc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Module included in the following assemblies:
22
//
33
// * knative-serving/config-applications/configuring-revision-timeouts.adoc
4-
:_content-type: PROCEDURE
4+
5+
:_mod-docs-content-type: PROCEDURE
56
[id="configuring-revision-timeout_{context}"]
67
= Configuring revision timeout
78

@@ -10,7 +11,10 @@ You can configure the default number of seconds for the revision timeout based o
1011
.Prerequisites
1112

1213
* You have installed the {ServerlessOperatorName} and Knative Serving.
13-
* You have cluster administrator permissions on {ocp-product-title}, or cluster or dedicated administrator permissions on {rosa-product-title} or {dedicated-product-title}.
14+
* You have the required permissions for your cluster:
15+
** Cluster administrator permissions on {ocp-product-title}
16+
** Cluster administrator or dedicated administrator permissions on {rosa-product-title}
17+
** Cluster administrator or dedicated administrator permissions on {dedicated-product-title}
1418
1519
.Procedure
1620

@@ -45,3 +49,11 @@ spec:
4549
containers:
4650
- image: ghcr.io/knative/helloworld-go:latest
4751
----
52+
53+
+
54+
[NOTE]
55+
====
56+
To set the revision timeout to a value over 600 seconds (10 minutes), you must increase the default {ocp-product-title} route timeout and the maximum revision timeout.
57+
58+
For instructions on how to configure timeouts for requests exceeding the default 600 seconds (10 minutes), see "Long-running requests".
59+
====
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * knative-serving/config-applications/configuring-revision-timeouts.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-configuring-resoponse-start-timeout_{context}"]
7+
= Configuring revision response start timeout
8+
9+
By setting the revision response start timeout, you can specify the maximum duration in seconds that Serving waits for a revision to start sending network traffic after a request has been routed to it. The revision response start timeout must not exceed the revision timeout. The default duration is 300 seconds (5 minutes).
10+
11+
.Prerequisites
12+
13+
* You have installed the {ServerlessOperatorName} and Knative Serving.
14+
* You have the required permissions for your cluster:
15+
** Cluster administrator permissions on {ocp-product-title}
16+
** Cluster administrator or dedicated administrator permissions on {rosa-product-title}
17+
** Cluster administrator or dedicated administrator permissions on {dedicated-product-title}
18+
19+
.Procedure
20+
21+
* Choose the appropriate method to configure the revision response start timeout:
22+
** To configure the timeout globally, set the `revision-response-start-timeout-seconds` field in your `KnativeServing` custom resource (CR). If your required response start timeout exceeds the revision timeout, also adjust the `revision-timeout-seconds` field accordingly:
23+
+
24+
.Example of revision response start timeout globally set to 300 seconds (5 minutes)
25+
[source,yaml]
26+
----
27+
apiVersion: operator.knative.dev/v1beta1
28+
kind: KnativeServing
29+
metadata:
30+
name: knative-serving
31+
namespace: knative-serving
32+
spec:
33+
config:
34+
defaults:
35+
revision-timeout-seconds: "600"
36+
revision-response-start-timeout-seconds: "300"
37+
----
38+
+
39+
** To configure the timeout per revision, set the `responseStartTimeoutSeconds` field in your service definition. If your required response start timeout exceeds the revision timeout, also adjust the `timeoutSeconds` field accordingly:
40+
+
41+
.Example of a service definition with revision response start timeout set to 300 seconds (5 minutes)
42+
[source,yaml]
43+
----
44+
apiVersion: serving.knative.dev/v1
45+
kind: Service
46+
metadata:
47+
namespace: my-ns
48+
spec:
49+
template:
50+
spec:
51+
timeoutSeconds: 600
52+
responseStartTimeoutSeconds: 300
53+
containers:
54+
# ...
55+
----
56+
57+
+
58+
[NOTE]
59+
====
60+
To set the revision response start timeout and the revision timeout to a value over 600 seconds (10 minutes), you must increase the default {ocp-product-title} route timeout and the maximum revision timeout.
61+
62+
For instructions on how to configure timeouts for requests exceeding the default 600 seconds (10 minutes), see "Long-running requests".
63+
====
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * knative-serving/config-applications/configuring-revision-timeouts.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-configuring-revision-idle-timeout_{context}"]
7+
= Configuring revision idle timeout
8+
9+
By setting the revision idle timeout, you can specify the maximum duration in seconds a request is allowed to stay open without receiving data from the application. The default duration is `0` (infinite).
10+
11+
.Prerequisites
12+
13+
* You have installed the {ServerlessOperatorName} and Knative Serving.
14+
* You have the required permissions for your cluster:
15+
** Cluster administrator permissions on {ocp-product-title}
16+
** Cluster administrator or dedicated administrator permissions on {rosa-product-title}
17+
** Cluster administrator or dedicated administrator permissions on {dedicated-product-title}
18+
19+
.Procedure
20+
21+
* Choose the appropriate method to configure the revision idle timeout:
22+
** To configure the timeout globally, set the `revision-idle-timeout-seconds` field in your `KnativeServing` custom resource (CR):
23+
+
24+
.Example of revision idle timeout globally set to 300 seconds (5 minutes)
25+
[source,yaml]
26+
----
27+
apiVersion: operator.knative.dev/v1beta1
28+
kind: KnativeServing
29+
metadata:
30+
name: knative-serving
31+
namespace: knative-serving
32+
spec:
33+
config:
34+
defaults:
35+
revision-idle-timeout-seconds: "300"
36+
----
37+
+
38+
** To configure the timeout per revision, set the `idleTimeoutSeconds` field in your service definition:
39+
+
40+
.Example of a service definition with revision idle timeout set to 300 seconds (5 minutes)
41+
[source,yaml]
42+
----
43+
apiVersion: serving.knative.dev/v1
44+
kind: Service
45+
metadata:
46+
namespace: my-ns
47+
spec:
48+
template:
49+
spec:
50+
idleTimeoutSeconds: 300
51+
containers:
52+
# ...
53+
----

modules/serverless-long-running-requests.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:_mod-docs-content-type: CONCEPT
66
[id="serverless-long-running-requests_{context}"]
7-
= Long running requests
7+
= Long-running requests
88

99
To ensure that requests exceeding the default 600 second timeout set by Knative are not prematurely terminated, you need to adjust the timeouts in the following components:
1010

0 commit comments

Comments
 (0)