From 7aa64bfbe82f1c6ede0f552a7d03a8ddf2b36922 Mon Sep 17 00:00:00 2001 From: Ville Aikas Date: Tue, 18 Aug 2020 11:20:04 -0700 Subject: [PATCH 1/5] add an explicit Broker creation not relying on defaults --- docs/eventing/broker/README.md | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docs/eventing/broker/README.md b/docs/eventing/broker/README.md index 3cae2b862d5..3f2aaa5558c 100644 --- a/docs/eventing/broker/README.md +++ b/docs/eventing/broker/README.md @@ -36,6 +36,50 @@ metadata: EOF ``` +## Explicit Broker configuration + +You can of course create a Broker without relying on the defaults (as described +above) by specifying the `BrokerClass` by using an annotation to specify which +Broker implementation you'd like to use: + +```yaml +kind: Broker +metadata: + annotations: + eventing.knative.dev/broker.class: MTChannelBasedBroker +``` + +and explicitly configuring the spec.config, for example: +```yaml +kind: Broker kind: Broker +spec: + config: + apiVersion: v1 + kind: ConfigMap + name: config-br-default-channel + namespace: knative-eventing +``` + +A full example could look something like this: + +```shell +kubectl create -f - < Date: Tue, 18 Aug 2020 11:48:40 -0700 Subject: [PATCH 2/5] remove extra kind: Broker --- docs/eventing/broker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/eventing/broker/README.md b/docs/eventing/broker/README.md index 3f2aaa5558c..54ebe27db49 100644 --- a/docs/eventing/broker/README.md +++ b/docs/eventing/broker/README.md @@ -51,7 +51,7 @@ metadata: and explicitly configuring the spec.config, for example: ```yaml -kind: Broker kind: Broker +kind: Broker spec: config: apiVersion: v1 From 9a69d2a1c574f25b8608e9e0dc253a0abe3f1e2a Mon Sep 17 00:00:00 2001 From: Ville Aikas Date: Tue, 18 Aug 2020 13:13:24 -0700 Subject: [PATCH 3/5] address PR feedback --- docs/eventing/broker/README.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/eventing/broker/README.md b/docs/eventing/broker/README.md index 54ebe27db49..e128b0c7b56 100644 --- a/docs/eventing/broker/README.md +++ b/docs/eventing/broker/README.md @@ -36,11 +36,18 @@ metadata: EOF ``` -## Explicit Broker configuration +## Configuring broker classes -You can of course create a Broker without relying on the defaults (as described -above) by specifying the `BrokerClass` by using an annotation to specify which -Broker implementation you'd like to use: +You can configure Knative Eventing so that when you create a broker, it uses a +different type of broker than the default Knative channel-based broker. To +configure a different broker type, or *class*, you must modify the +`eventing.knative.dev/broker.class` annotation and `spec.config` for the Broker +object. `MTChannelBasedBroker` is the broker class default. + +### Procedure + +1. Modify the `eventing.knative.dev/broker.class` annotation. Replace +`MTChannelBasedBroker` with the class type you want to use: ```yaml kind: Broker @@ -49,7 +56,9 @@ metadata: eventing.knative.dev/broker.class: MTChannelBasedBroker ``` -and explicitly configuring the spec.config, for example: +1. Configure the `spec.config` with the details of the ConfigMap that defines +the backing channel for the broker class: + ```yaml kind: Broker spec: @@ -60,7 +69,7 @@ spec: namespace: knative-eventing ``` -A full example could look something like this: +A full example combined into a fully specified resource could look like this: ```shell kubectl create -f - < Date: Tue, 18 Aug 2020 13:14:49 -0700 Subject: [PATCH 4/5] remove ws --- docs/eventing/broker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/eventing/broker/README.md b/docs/eventing/broker/README.md index e128b0c7b56..03ce21a5584 100644 --- a/docs/eventing/broker/README.md +++ b/docs/eventing/broker/README.md @@ -57,7 +57,7 @@ metadata: ``` 1. Configure the `spec.config` with the details of the ConfigMap that defines -the backing channel for the broker class: +the backing channel for the broker class: ```yaml kind: Broker From cc1f0321e6cecbdded373c9b6973e240d709c6f5 Mon Sep 17 00:00:00 2001 From: Ville Aikas Date: Tue, 18 Aug 2020 13:22:12 -0700 Subject: [PATCH 5/5] just the yaml please... drop the kubectl --- docs/eventing/broker/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/eventing/broker/README.md b/docs/eventing/broker/README.md index 03ce21a5584..4cb565f983c 100644 --- a/docs/eventing/broker/README.md +++ b/docs/eventing/broker/README.md @@ -71,8 +71,7 @@ spec: A full example combined into a fully specified resource could look like this: -```shell -kubectl create -f - <