Skip to content

Commit

Permalink
[SRVKS-1255] Deployment resource configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ochromy committed Jan 12, 2025
1 parent 60dc1b6 commit 1e9a004
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
21 changes: 21 additions & 0 deletions knative-serving/config-applications/deployment-resources.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
:_content-type: ASSEMBLY
include::_attributes/common-attributes.adoc[]
[id="deployment-resources"]
= Deployment resources
:context: deployment-resources

toc::[]

The `config-deployment` ConfigMap, also referred to as the Deployment ConfigMap, contains settings that define how Kubernetes Deployment resources supporting Knative services are configured. The `config-deployment` ConfigMap is located in the `knative-serving` namespace.

//Example

//Progress Deadline
include::modules/serverless-progress-deadline.adoc[leveloffset=+1]

//Configuring Progress Deadline
include::modules/serverless-progress-deadline-config.adoc[leveloffset=+1]

//Skipping tag resolution

//Configuring selectable RuntimeClassName
50 changes: 50 additions & 0 deletions modules/serverless-progress-deadline-config.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Module included in the following assemblies:
//
// * serverless/knative-serving/config-applications/deployment-resources.adoc

:_content-type: PROCEDURE
[id="serverless-progress-deadline-config_{context}"]
= Configuring the progress deadline

You can configure progress deadline settings to specify the maximum time allowed for your deployment to progress before the system reports a failure for the Knative Revision. This time limit can be specified in seconds or minutes.

By default, the progress deadline is set to 600 seconds. This value is specified as a Golang `time.Duration` string and must be rounded to the nearest second.

.Procedure

You can configure the progress deadline globally or at the per-revision level:

* To configure the progress deadline setting globally, set the value of `progress-deadline` in the `config-deployment` ConfigMap.
+
.Example of progress deadline globally set to 60 seconds
[source,yaml]
----
apiVersion: v1
kind: ConfigMap
metadata:
name: config-deployment
namespace: knative-serving
labels:
serving.knative.dev/release: devel
annotations:
knative.dev/example-checksum: "fa67b403"
data:
progress-deadline: "60s"
----
* To configure the progress deadline setting at a per-revision level, add a `progress-deadline` annotation to your service.
+
.Example of progress deadline per-revision set to 60 seconds
[source,yaml]
----
apiVersion: serving.knative.dev/v1
kind: Service
...
spec:
template:
metadata:
annotations:
serving.knative.dev/progress-deadline: "60s"
spec:
containers:
- image: ghcr.io/knative/helloworld-go:latest
----
17 changes: 17 additions & 0 deletions modules/serverless-progress-deadline.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Module included in the following assemblies:
//
// * serverless/knative-serving/config-applications/deployment-resources.adoc

:_content-type: CONCEPT
[id="serverless-progress-deadline_{context}"]
= Progress deadline

By default, services have a progress deadline that defines the time limit for a service to complete its initial startup.

Consider increasing the progress deadline if you encounter any of these conditions in your deployment:

* The service image takes a long time to pull due to its size.
* The service takes a long time to become `READY` because of initial cache priming.
* The cluster relies on autoscaling to allocate resources for new pods.
If the initial scale is not achieved within the specified time limit, the Knative Autoscaler component scales the revision to `0`, and the Knative service enters a terminal `Failed` state.

0 comments on commit 1e9a004

Please sign in to comment.