Skip to content

Commit 28fd0eb

Browse files
authored
add an explicit Broker creation not relying on defaults (#2756)
* add an explicit Broker creation not relying on defaults * remove extra kind: Broker * address PR feedback * remove ws * just the yaml please... drop the kubectl
1 parent 981e8c5 commit 28fd0eb

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

docs/eventing/broker/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,57 @@ metadata:
3636
EOF
3737
```
3838

39+
## Configuring broker classes
40+
41+
You can configure Knative Eventing so that when you create a broker, it uses a
42+
different type of broker than the default Knative channel-based broker. To
43+
configure a different broker type, or *class*, you must modify the
44+
`eventing.knative.dev/broker.class` annotation and `spec.config` for the Broker
45+
object. `MTChannelBasedBroker` is the broker class default.
46+
47+
### Procedure
48+
49+
1. Modify the `eventing.knative.dev/broker.class` annotation. Replace
50+
`MTChannelBasedBroker` with the class type you want to use:
51+
52+
```yaml
53+
kind: Broker
54+
metadata:
55+
annotations:
56+
eventing.knative.dev/broker.class: MTChannelBasedBroker
57+
```
58+
59+
1. Configure the `spec.config` with the details of the ConfigMap that defines
60+
the backing channel for the broker class:
61+
62+
```yaml
63+
kind: Broker
64+
spec:
65+
config:
66+
apiVersion: v1
67+
kind: ConfigMap
68+
name: config-br-default-channel
69+
namespace: knative-eventing
70+
```
71+
72+
A full example combined into a fully specified resource could look like this:
73+
74+
```yaml
75+
apiVersion: eventing.knative.dev/v1
76+
kind: Broker
77+
metadata:
78+
annotations:
79+
eventing.knative.dev/broker.class: MTChannelBasedBroker
80+
name: default
81+
namespace: default
82+
spec:
83+
config:
84+
apiVersion: v1
85+
kind: ConfigMap
86+
name: config-br-default-channel
87+
namespace: knative-eventing
88+
```
89+
3990
## Next steps
4091

4192
After you have created a Broker, you can complete the following tasks to finish setting up event delivery.

0 commit comments

Comments
 (0)