diff --git a/modules/serverless-broker-backing-channel-default.adoc b/modules/serverless-broker-backing-channel-default.adoc new file mode 100644 index 0000000000..e1db6ffe5e --- /dev/null +++ b/modules/serverless-broker-backing-channel-default.adoc @@ -0,0 +1,49 @@ +// Module included in the following assemblies: +// +// * serverless/admin_guide/serverless-configuration.adoc + +:_content-type: PROCEDURE +[id="serverless-broker-backing-channel-default_{context}"] += Configuring the default broker backing channel + +If you are using a channel-based broker, you can set the default backing channel type for the broker to either `InMemoryChannel` or `KafkaChannel`. + +.Prerequisites + +* You have administrator permissions on {product-title}. +* You have installed the {ServerlessOperatorName} and Knative Eventing on your cluster. +* You have installed the OpenShift (`oc`) CLI. +* If you want to use Kafka channels as the default backing channel type, you must also install the `KnativeKafka` CR on your cluster. + +.Procedure + +. Modify the `KnativeEventing` custom resource (CR) to add configuration details for the `config-br-default-channel` config map: ++ +[source,yaml] +---- +apiVersion: operator.knative.dev/v1alpha1 +kind: KnativeEventing +metadata: + name: knative-eventing + namespace: knative-eventing +spec: + config: <1> + config-br-default-channel: + channel-template-spec: | + apiVersion: messaging.knative.dev/v1beta1 + kind: KafkaChannel <2> + spec: + numPartitions: 6 <3> + replicationFactor: 3 <4> +---- +<1> In `spec.config`, you can specify the config maps that you want to add modified configurations for. +<2> The default backing channel type configuration. In this example, the default channel implementation for the cluster is `KafkaChannel`. +<3> The number of partitions for the Kafka channel that backs the broker. +<4> The replication factor for the Kafka channel that backs the broker. + +. Apply the updated `KnativeEventing` CR: ++ +[source,terminal] +---- +$ oc apply -f +---- diff --git a/serverless/admin_guide/serverless-configuration.adoc b/serverless/admin_guide/serverless-configuration.adoc index 6b9b891338..209941c361 100644 --- a/serverless/admin_guide/serverless-configuration.adoc +++ b/serverless/admin_guide/serverless-configuration.adoc @@ -14,6 +14,7 @@ The `spec.config` in the Knative custom resources have one `` entry for ea // Knative Eventing include::modules/serverless-channel-default.adoc[leveloffset=+1] +include::modules/serverless-broker-backing-channel-default.adoc[leveloffset=+1] // Knative Serving //autoscaling