From acb2937d92ed24b6797a0c9275163ae77a88d428 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Thu, 8 Apr 2021 15:03:50 +0200 Subject: [PATCH] Adding a bit more of clarfication on default channel configs (#3433) * Adding a bit more of clarfication on default channel config, and how to change the channel impl of the ootb broker Signed-off-by: Matthias Wessendorf * Update docs/install/operator/configuring-eventing-cr.md Co-authored-by: Omer B. * Update docs/install/operator/configuring-eventing-cr.md Co-authored-by: Omer B. * Update docs/install/operator/configuring-eventing-cr.md Co-authored-by: Omer B. * Update docs/install/operator/configuring-eventing-cr.md Co-authored-by: Omer B. * Update docs/install/operator/configuring-eventing-cr.md * Update docs/install/operator/configuring-eventing-cr.md Co-authored-by: Ashleigh Brennan Co-authored-by: Omer B. --- .../operator/configuring-eventing-cr.md | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/install/operator/configuring-eventing-cr.md b/docs/install/operator/configuring-eventing-cr.md index 310fae292..ea8baf53c 100644 --- a/docs/install/operator/configuring-eventing-cr.md +++ b/docs/install/operator/configuring-eventing-cr.md @@ -46,9 +46,11 @@ All Knative Eventing ConfigMaps are created in the same namespace as the Knative Knative Eventing has multiple ConfigMaps that are named with the prefix `config-`. The `spec.config` in the KnativeEventing CR has one `` entry for each ConfigMap, named `config-`, with a value which will be used for the ConfigMap `data`. -### Setting the default channel for the broker +### Setting a default channel -If you are using a channel-based broker, you can change the default channel type for the broker from InMemoryChannel to KafkaChannel, by updating the `config-br-default-channel` ConfigMap. You can do this by modifying the KnativeEventing CR: +If you are using different channel implementations, like the KafkaChannel, or you want a specific configuration of the InMemoryChannel to be the default configuration, you can change the default behavior by updating the `default-ch-webhook` ConfigMap. + +You can do this by modifying the KnativeEventing CR: ```yaml apiVersion: operator.knative.dev/v1alpha1 @@ -79,6 +81,29 @@ spec: **NOTE:** The `clusterDefault` setting determines the global, cluster-wide default channel type. You can configure channel defaults for individual namespaces by using the `namespaceDefaults` setting. +### Setting the default channel for the broker + +If you are using a channel-based broker, you can change the default channel type for the broker from InMemoryChannel to KafkaChannel, by updating the `config-br-default-channel` ConfigMap. + +You can do this by modifying the KnativeEventing CR: + +```yaml +apiVersion: operator.knative.dev/v1alpha1 +kind: KnativeEventing +metadata: + name: knative-eventing + namespace: knative-eventing +spec: + config: + config-br-default-channel: + channelTemplateSpec: | + apiVersion: messaging.knative.dev/v1beta1 + kind: KafkaChannel + spec: + numPartitions: 6 + replicationFactor: 1 +``` + ## Private repository and private secrets The Knative Eventing Operator CR is configured the same way as the Knative Serving Operator CR.