Creating a Channel using cluster or namespace defaults
To create a Channel:
Create a YAML file for the Channel object using the following template:
Where:
<namespace>
is the name of your target namespace.
If you create this object in the namespace, according to the default ConfigMap example in , it is an InMemoryChannel Channel implementation.
After the Channel object is created, a mutating admission webhook sets the spec.channelTemplate
based on the default Channel implementation:
Where:
<example-channel>
is the name of the Channel you want to create.<channel-template-kind>
is the kind of Channel, such as InMemoryChannel or KafkaChannel, based on the default ConfigMap. See an example in Channel types and defaults.
Note
The Channel controller creates a backing Channel instance based on the .
When this mechanism is used two objects are created; a generic Channel object and an InMemoryChannel object. The generic object acts as a proxy for the InMemoryChannel object by copying its Subscriptions to, and setting its status to, that of the InMemoryChannel object.
Note
Defaults are only applied by the webhook when a Channel or Sequence is initially created. If the default settings are changed, the new defaults will only be applied to newly created Channels, Brokers, or Sequences. Existing resources are not updated automatically to use the new configuration.