Skip to content

Commit a519c4f

Browse files
committed
[SRVKS-1255] Deployment resource configuration
Add skipping tag resolution and RuntimeClassName Comment out Skipping tag resolution and RuntimeClassName config Include assembly in the topic map Correct topic map whitespace Correct attributes Assembly wording correction QE feedback for SRVKS-1255 Correct CR examples for SRVKS-1255 Fix PD example description for SRVKS-1255 PR feedback for SRVKS-1255 MR feedback for SRVKS-1255 Correct service labels for SRVKS-1255
1 parent 60dc1b6 commit a519c4f

File tree

6 files changed

+136
-0
lines changed

6 files changed

+136
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ Topics:
138138
File: startup-probes-for-serving
139139
- Name: Resolving image tags to digests
140140
File: resolving-image-tags-to-digests
141+
- Name: Configuring deployment resources
142+
File: deployment-resources
141143
- Name: Configuring Kourier
142144
File: configuring-kourier
143145
- Name: Restrictive network policies
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:_content-type: ASSEMBLY
2+
include::_attributes/common-attributes.adoc[]
3+
[id="deployment-resources"]
4+
= Configuring deployment resources
5+
:context: deployment-resources
6+
7+
toc::[]
8+
9+
In Knative Serving, the `config-deployment` config map contains settings that determine how Kubernetes `Deployment` resources are configured for Knative services. In {ServerlessProductName} Serving, you can configure these settings in the `deployment` section of your `KnativeServing` custom resource (CR).
10+
11+
You can use the `deployment` section to configure the following:
12+
13+
* Tag resolution
14+
* Runtime environments
15+
* Progress deadlines
16+
17+
//Skipping tag resolution
18+
include::modules/serverless-skipping-tag-resolution.adoc[leveloffset=+1]
19+
20+
//Configuring selectable RuntimeClassName
21+
include::modules/serverless-configuring-runtimeclass-name.adoc[leveloffset=+1]
22+
23+
//Progress deadline
24+
include::modules/serverless-progress-deadline.adoc[leveloffset=+1]
25+
26+
//Configuring progress deadline
27+
include::modules/serverless-progress-deadline-config.adoc[leveloffset=+2]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * knative-serving/config-applications/deployment-resources.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="serverless-configuring-runtimeclass-name_{context}"]
7+
= Configuring selectable RuntimeClassName
8+
9+
You can configure {ServerlessProductName} Serving to set a specific `RuntimeClassName` resource for Deployments by updating the `runtime-class-name` setting in your `KnativeServing` custom resource (CR).
10+
11+
This setting interacts with service labels, applying either the default `RuntimeClassName` or the one that matches the most labels associated with the service.
12+
13+
.Procedure
14+
15+
* In your `KnativeServing` CR, configure the `runtime-class-name` setting:
16+
+
17+
.Example of configured `runtime-class-name` setting
18+
[source,yaml]
19+
----
20+
apiVersion: operator.knative.dev/v1beta1
21+
kind: KnativeServing
22+
metadata:
23+
name: knative-serving
24+
spec:
25+
config:
26+
deployment:
27+
runtime-class-name: |
28+
kata: {}
29+
gvisor:
30+
selector:
31+
my-label: selector
32+
----
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * knative-serving/config-applications/deployment-resources.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="serverless-progress-deadline-config_{context}"]
7+
= Configuring the progress deadline
8+
9+
Configure progress deadline settings to set the maximum time allowed in seconds or minutes for deployment progress before the system reports a Knative Revision failure.
10+
11+
By default, the progress deadline is set to 600 seconds. This value is specified as a Go `time.Duration` string and must be rounded to the nearest second.
12+
13+
.Procedure
14+
15+
Configure progress deadline by modifying your `KnativeServing` custom resource (CR).
16+
17+
* In your `KnativeServing` CR, set the value of `progressDeadline`:
18+
+
19+
.Example of progress deadline set to 60 seconds
20+
[source,yaml]
21+
----
22+
apiVersion: operator.knative.dev/v1beta1
23+
kind: KnativeServing
24+
metadata:
25+
name: knative-serving
26+
spec:
27+
config:
28+
deployment:
29+
progressDeadline: "60s"
30+
----
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * knative-serving/config-applications/deployment-resources.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="serverless-progress-deadline_{context}"]
7+
= Progress deadline
8+
9+
By default, services have a progress deadline that defines the time limit for a service to complete its initial startup.
10+
11+
Consider increasing the progress deadline if you encounter any of these conditions in your deployment:
12+
13+
* The service image takes a long time to pull due to its size.
14+
* The service takes a long time to become `READY` because of initial cache priming.
15+
* The cluster relies on autoscaling to allocate resources for new pods.
16+
17+
If the initial scale is not achieved within the specified time limit, the Knative Autoscaler component scales the revision to `0`, and the service enters a terminal `Failed` state.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * knative-serving/config-applications/deployment-resources.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="serverless-skipping-tag-resolution_{context}"]
7+
= Skipping tag resolution
8+
9+
Skipping tag resolution in {ServerlessProductName} Serving can speed up deployments by avoiding unnecessary queries to the container registry, reducing latency and dependency on registry availability.
10+
11+
You can configure Serving to skip tag resolution by modifying the `registriesSkippingTagResolving` setting in your `KnativeServing` custom resource (CR).
12+
13+
.Procedure
14+
15+
* In your `KnativeServing` CR, modify the `registriesSkippingTagResolving` setting with the list of registries for which tag resoution will be skipped:
16+
+
17+
.Example of configured tag resolution skipping
18+
[source,yaml]
19+
----
20+
apiVersion: operator.knative.dev/v1beta1
21+
kind: KnativeServing
22+
metadata:
23+
name: knative-serving
24+
spec:
25+
config:
26+
deployment:
27+
registriesSkippingTagResolving: "registry.example.com, another.registry.com"
28+
----

0 commit comments

Comments
 (0)