You can use the kn CLI or the Developer perspective in the OpenShift Container Platform web console to list and manage available event sources or event source types.

Currently, OpenShift Serverless supports the following event source types:

API server source

Connects a sink to the Kubernetes API server.

Ping source

Periodically sends ping events with a constant payload. It can be used as a timer.

Sink binding

Connects core Kubernetes resource objects, such as Deployment, Job, or StatefulSet objects, with a sink.

Container source

Creates a custom event source by using an image.

Knative Kafka source

Connects a Kafka cluster to a sink as an event source.

Listing available event source types by using the Knative CLI

  1. List the available event source types in the terminal:

    $ kn source list-types
    Example output
    TYPE              NAME                                            DESCRIPTION
    ApiServerSource            Watch and send Kubernetes API events to a sink
    PingSource                 Periodically send ping events to a sink
    SinkBinding                Binding for connecting a PodSpecable to a sink
  2. Optional: You can also list the available event source types in YAML format:

    $ kn source list-types -o yaml

Viewing available event source types within the Developer perspective

You can use the web console to view available event source types.

Additional event source types can be added by cluster administrators by installing Operators on OpenShift Container Platform.

  1. Access the Developer perspective.

  2. Click +Add.

  3. Click Event source.

Listing available event sources by using the Knative CLI

  • List the available event sources:

    $ kn source list
    Example output
    NAME   TYPE              RESOURCE                               SINK         READY
    a1     ApiServerSource   ksvc:eshow2   True
    b1     SinkBinding       ksvc:eshow3   False
    p1     PingSource        ksvc:eshow1   True

Listing event sources of a specific type only

You can list event sources of a specific type only, by using the --type flag.

  • List the available ping sources:

    $ kn source list --type PingSource
    Example output
    NAME   TYPE              RESOURCE                               SINK         READY
    p1     PingSource        ksvc:eshow1   True