Using Triggers
The value must be a Destination.
The following trigger receives all the events from the default
broker and delivers them to the Knative Serving service my-service
:
Apply the YAML file by running the command:
kubectl apply -f <filename>.yaml
The following trigger receives all the events from the default
broker and delivers them to the custom path for the Kubernetes service my-service
:
Create a YAML file using the following example:
Apply the YAML file by running the command:
Where
<filename>
is the name of the file you created in the previous step.
This example filters events from the default
broker that are of type dev.knative.foo.bar
and have the extension with the value my-extension-value
.
Create a YAML file using the following example:
Apply the YAML file by running the command:
kubectl apply -f <filename>.yaml
Where
<filename>
is the name of the file you created in the previous step.
eventing.knative.dev/injection
: if set toenabled
, Eventing automatically creates a Broker for a Trigger if it doesn’t exist. The Broker is created in the namespace where the Trigger is created. This annotation only works if you have the enabled, which is optional and not enabled by default.
The following YAML is an example of a Trigger with a dependency: