|
| 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 | +==== |
0 commit comments