Skip to content

Commit 8ec098f

Browse files
committed
[SRVKE-528]: Add broker class config and CLI docs
1 parent 0bff9bc commit 8ec098f

File tree

5 files changed

+72
-11
lines changed

5 files changed

+72
-11
lines changed

modules/serverless-channel-default.adoc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,11 @@
66
[id="serverless-channel-default_{context}"]
77
= Configuring the default channel implementation
88

9-
The `default-ch-webhook` config map can be used to specify the default channel implementation of Knative Eventing. The default channel implementation can be specified for the entire cluster, as well as for one or more namespaces. Currently the `InMemoryChannel` and `KafkaChannel` channel types are supported.
9+
You can use the `default-ch-webhook` config map to specify the default channel implementation of Knative Eventing. You can specify the default channel implementation for the entire cluster or for one or more namespaces. Currently the `InMemoryChannel` and `KafkaChannel` channel types are supported.
1010

1111
.Prerequisites
1212

13-
ifdef::openshift-enterprise[]
14-
* You have cluster administrator permissions on {product-title}.
15-
endif::[]
16-
17-
ifdef::openshift-dedicated,openshift-rosa[]
18-
* You have cluster or dedicated administrator permissions on {product-title}.
19-
endif::[]
20-
13+
* You have administrator permissions on {product-title}.
2114
* You have installed the {ServerlessOperatorName} and Knative Eventing on your cluster.
2215
* If you want to use Kafka channels as the default channel implementation, you must also install the `KnativeKafka` CR on your cluster.
2316

modules/serverless-create-broker-kn.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Brokers can be used in combination with triggers to deliver events from an event
1616
1717
.Procedure
1818

19-
* Create the `default` broker:
19+
* Create a broker:
2020
+
2121
[source,terminal]
2222
----
23-
$ kn broker create default
23+
$ kn broker create <broker_name>
2424
----
2525
2626
.Verification
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * serverless/admin_guide/serverless-configuration.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="serverless-global-config-broker-class-default_{context}"]
7+
= Configuring the default broker class
8+
9+
You can use the `config-br-defaults` config map to specify default broker class settings for Knative Eventing. You can specify the default broker class for the entire cluster or for one or more namespaces. Currently the `MTChannelBasedBroker` and `Kafka` broker types are supported.
10+
11+
.Prerequisites
12+
13+
* You have administrator permissions on {product-title}.
14+
* You have installed the {ServerlessOperatorName} and Knative Eventing on your cluster.
15+
* If you want to use Kafka broker as the default broker implementation, you must also install the `KnativeKafka` CR on your cluster.
16+
17+
.Procedure
18+
19+
* Modify the `KnativeEventing` custom resource to add configuration details for the `config-br-defaults` config map:
20+
+
21+
[source,yaml]
22+
----
23+
apiVersion: operator.knative.dev/v1alpha1
24+
kind: KnativeEventing
25+
metadata:
26+
name: knative-eventing
27+
namespace: knative-eventing
28+
spec:
29+
defaultBrokerClass: Kafka <1>
30+
config: <2>
31+
config-br-defaults: <3>
32+
default-br-config: |
33+
clusterDefault: <4>
34+
brokerClass: Kafka
35+
apiVersion: v1
36+
kind: ConfigMap
37+
name: kafka-broker-config <5>
38+
namespace: knative-eventing <6>
39+
namespaceDefaults: <7>
40+
my-namespace:
41+
brokerClass: MTChannelBasedBroker
42+
apiVersion: v1
43+
kind: ConfigMap
44+
name: config-br-default-channel <8>
45+
namespace: knative-eventing <9>
46+
...
47+
----
48+
<1> The default broker class for Knative Eventing.
49+
<2> In `spec.config`, you can specify the config maps that you want to add modified configurations for.
50+
<3> The `config-br-defaults` config map specifies the default settings for any broker that does not specify `spec.config` settings or a broker class.
51+
<4> The cluster-wide default broker class configuration. In this example, the default broker class implementation for the cluster is `Kafka`.
52+
<5> The `kafka-broker-config` config map specifies default settings for the Kafka broker. See "Configuring Kafka broker settings" in the "Additional resources" section.
53+
<6> The namespace where the `kafka-broker-config` config map exists.
54+
<7> The namespace-scoped default broker class configuration. In this example, the default broker class implementation for the `my-namespace` namespace is `MTChannelBasedBroker`. You can specify default broker class implementations for multiple namespaces.
55+
<8> The `config-br-default-channel` config map specifies the default backing channel for the broker. See "Configuring the default broker backing channel" in the "Additional resources" section.
56+
<9> The namespace where the `config-br-default-channel` config map exists.
57+
+
58+
[IMPORTANT]
59+
====
60+
Configuring a namespace-specific default overrides any cluster-wide settings.
61+
====

serverless/admin_guide/serverless-configuration.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ The `spec.config` in the Knative custom resources have one `<name>` entry for ea
1515
// Knative Eventing
1616
include::modules/serverless-channel-default.adoc[leveloffset=+1]
1717
include::modules/serverless-broker-backing-channel-default.adoc[leveloffset=+1]
18+
include::modules/serverless-global-config-broker-class-default.adoc[leveloffset=+1]
19+
20+
[role="_additional-resources"]
21+
.Additional resources
22+
* xref:../../serverless/admin_guide/serverless-kafka-admin.adoc#serverless-kafka-broker-configmap_serverless-kafka-admin[Configuring Kafka broker settings]
23+
* xref:../../serverless/admin_guide/serverless-configuration.adoc#serverless-broker-backing-channel-default_serverless-configuration[Configuring the default broker backing channel]
1824
1925
// Knative Serving
2026
//autoscaling

serverless/develop/serverless-using-brokers.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ include::modules/serverless-describe-broker-kn.adoc[leveloffset=+2]
4747
[id="additional-resources_serverless-using-brokers"]
4848
[role="_additional-resources"]
4949
== Additional resources
50+
* xref:../../serverless/admin_guide/serverless-configuration.adoc#serverless-global-config-broker-class-default_serverless-configuration[Configuring the default broker class]
5051
* xref:../../serverless/develop/serverless-triggers.adoc#serverless-triggers[Triggers]
5152
xref:../../serverless/discover/knative-event-sources.adoc#knative-event-sources[Event sources]
5253
* xref:../../serverless/develop/serverless-event-delivery.adoc#serverless-event-delivery[Event delivery]

0 commit comments

Comments
 (0)