1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

Add default channel config settings

This commit is contained in:
Ashleigh Brennan
2022-09-21 10:08:33 -05:00
committed by openshift-cherrypick-robot
parent e75528ef39
commit fece541b25
2 changed files with 50 additions and 0 deletions

View File

@@ -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 <filename>
----

View File

@@ -14,6 +14,7 @@ The `spec.config` in the Knative custom resources have one `<name>` 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