Skip to content

Commit 89fd062

Browse files
authored
Merge pull request #71556 from rh-max/srvls-queue-proxy-resources
[SRVKS-1040] Add the configuring Queue Proxy resources section
2 parents f0265a0 + 65c721e commit 89fd062

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ Topics:
216216
Topics:
217217
- Name: Overriding system deployment configurations
218218
File: overriding-config-serving
219+
- Name: Configuring Queue Proxy resources
220+
File: queue-proxy-resources
219221
---
220222
# Eventing
221223
Name: Eventing
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:_content-type: ASSEMBLY
2+
include::_attributes/common-attributes.adoc[]
3+
[id="queue-proxy-resources"]
4+
= Configuring Queue Proxy resources
5+
:context: queue-proxy-resources
6+
7+
toc::[]
8+
9+
The Queue Proxy is a sidecar container to each application container within a service. It improves managing Serverless workloads, ensuring efficient resource usage. You can configure the Queue Proxy.
10+
11+
include::modules/configuring-queue-proxy.adoc[leveloffset=+1]

modules/configuring-queue-proxy.adoc

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
:_content-type: PROCEDURE
2+
[id="serverless-configuring-queue-proxy_{context}"]
3+
= Configuring Queue Proxy Resources for a Knative Service
4+
5+
Apart from configuring the Queue Proxy resource requests and limits globally in the deployment configmap, you can set them at the service level using the corresponding annotations targeting CPU, memory, and ephemeral storage resource types.
6+
7+
.Prerequisites
8+
9+
* {pipelines-title} must be installed on your cluster.
10+
11+
* You have installed the OpenShift (`oc`) CLI.
12+
13+
* You have installed the Knative (`kn`) CLI.
14+
15+
.Procedure
16+
17+
* Modify the configmap of your service with resource requests and limits:
18+
+
19+
[source,yaml]
20+
----
21+
apiVersion: serving.knative.dev/v1
22+
kind: Service
23+
metadata:
24+
name: example-service
25+
namespace: default
26+
spec:
27+
template:
28+
metadata:
29+
annotations:
30+
queue.sidecar.serving.knative.dev/cpu-resource-request: "1"
31+
queue.sidecar.serving.knative.dev/cpu-resource-limit: "2"
32+
queue.sidecar.serving.knative.dev/memory-resource-request: "1Gi"
33+
queue.sidecar.serving.knative.dev/memory-resource-limit: "2Gi"
34+
queue.sidecar.serving.knative.dev/ephemeral-storage-resource-request: "400Mi"
35+
queue.sidecar.serving.knative.dev/ephemeral-storage-resource-limit: "450Mi"
36+
----
37+
+
38+
Alternatively, you can use the special `queue.sidecar.serving.knative.dev/resource-percentage` annotation, which calculates the Queue Proxy resources as a percentage of the application container. When CPU and memory resource requirements are calculated from the application container requirements and they are outside the boundaries below, the values are adjusted to fit within the boundaries. In this case, the following minimum and maximum boundaries are applied to the CPU and memory resource requirements:
39+
+
40+
.Resource requirements boundaries
41+
[cols="2,1,1",options="header"]
42+
|====
43+
|Resource requirements|Min|Max
44+
45+
|CPU request
46+
|25m
47+
|100m
48+
49+
|CPU limit
50+
|40m
51+
|500m
52+
53+
|Memory request
54+
|50Mi
55+
|200Mi
56+
57+
|Memory limit
58+
|200Mi
59+
|500Mi
60+
61+
|====
62+
+
63+
[NOTE]
64+
====
65+
If you simultaneously set a percentage annotation and a specific resource value using the corresponding resource annotation, then the latter takes precedence.
66+
====
67+
+
68+
[WARNING]
69+
====
70+
The `queue.sidecar.serving.knative.dev/resource-percentage` annotation is now deprecated and will be removed in a future version of {ServerlessProductName}.
71+
====

0 commit comments

Comments
 (0)