Skip to content

Commit cf69d4d

Browse files
authored
Merge pull request #48315 from abrennan89/SRVKE-1239
[SRVKE-1239] Add deployment override config docs for eventing
2 parents 96e04b7 + 364d61c commit cf69d4d

File tree

3 files changed

+65
-2
lines changed

3 files changed

+65
-2
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * serverless/admin_guide/serverless-configuration.adoc
4+
5+
:_content-type: REFERENCE
6+
[id="knative-eventing-CR-system-deployments_{context}"]
7+
= Overriding Knative Eventing system deployment configurations
8+
9+
You can override the default configurations for some specific deployments by modifying the `deployments` spec in the `KnativeEventing` custom resource (CR). Currently, overriding default configuration settings is supported for the `eventing-controller`, `eventing-webhook`, and `imc-controller` fields.
10+
11+
[IMPORTANT]
12+
====
13+
The `replicas` spec cannot override the number of replicas for deployments that use the Horizontal Pod Autoscaler (HPA), and does not work for the `eventing-webhook` deployment.
14+
====
15+
16+
In the following example, a `KnativeEventing` CR overrides the `eventing-controller` deployment so that:
17+
18+
* The deployment has specified CPU and memory resource limits.
19+
* The deployment has 3 replicas.
20+
* The `example-label: label` label is added.
21+
* The `example-annotation: annotation` annotation is added.
22+
* The `nodeSelector` field is set to select nodes with the `disktype: hdd` label.
23+
24+
.KnativeEventing CR example
25+
[source,yaml]
26+
----
27+
apiVersion: operator.knative.dev/v1beta1
28+
kind: KnativeEventing
29+
metadata:
30+
name: knative-eventing
31+
namespace: knative-eventing
32+
spec:
33+
deployments:
34+
- name: eventing-controller
35+
resources:
36+
- container: eventing-controller
37+
requests:
38+
cpu: 300m
39+
memory: 100Mi
40+
limits:
41+
cpu: 1000m
42+
memory: 250Mi
43+
replicas: 3
44+
labels:
45+
example-label: label
46+
annotations:
47+
example-annotation: annotation
48+
nodeSelector:
49+
disktype: hdd
50+
----
51+
52+
[NOTE]
53+
====
54+
The `KnativeEventing` CR label and annotation settings override the deployment's labels and annotations for both the deployment itself and the resulting pods.
55+
====

modules/knative-serving-CR-system-deployments.adoc

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

55
:_content-type: REFERENCE
66
[id="knative-serving-CR-system-deployments_{context}"]
7-
= Overriding system deployment configurations
7+
= Overriding Knative Serving system deployment configurations
88

99
You can override the default configurations for some specific deployments by modifying the `deployments` spec in the `KnativeServing` custom resource (CR). Currently, overriding default configuration settings is supported for the `resources`, `replicas`, `labels`, `annotations`, and `nodeSelector` fields.
1010

serverless/admin_guide/serverless-configuration.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@ include::modules/serverless-channel-default.adoc[leveloffset=+1]
1919
//autoscaling
2020
include::modules/serverless-enable-scale-to-zero.adoc[leveloffset=+1]
2121
include::modules/serverless-scale-to-zero-grace-period.adoc[leveloffset=+1]
22+
2223
// deployments
23-
include::modules/knative-serving-CR-system-deployments.adoc[leveloffset=+1]
24+
[id="serverless-configuration-CR-system-deployments"]
25+
== Overriding system deployment configurations
26+
27+
You can override the default configurations for some specific deployments by modifying the `deployments` spec in the `KnativeServing` and `KnativeEventing` custom resources (CRs).
28+
29+
include::modules/knative-serving-CR-system-deployments.adoc[leveloffset=+2]
30+
include::modules/knative-eventing-CR-system-deployments.adoc[leveloffset=+2]
31+
2432
// enable emptydirs
2533
include::modules/serverless-config-emptydir.adoc[leveloffset=+1]
2634
// global https redirect

0 commit comments

Comments
 (0)