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

Allows you to connect core Kubernetes resource objects, such as Deployment, Job, or StatefulSet objects, with a sink.

Apache Kafka source

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

Apache Kafka on OpenShift Serverless is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see https://access.redhat.com/support/offerings/techpreview/.

Listing available event source types by using the Knative CLI

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

    $ kn source list-types
    Example output
    TYPE              NAME                                            DESCRIPTION
    ApiServerSource   apiserversources.sources.knative.dev            Watch and send Kubernetes API events to a sink
    PingSource        pingsources.sources.knative.dev                 Periodically send ping events to a sink
    SinkBinding       sinkbindings.sources.knative.dev                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.

Procedure
  1. Access the Developer perspective.

  2. Click +Add.

  3. Click Event source.

Listing available event sources using the Knative CLI

  • List the available event sources:

    $ kn source list
    Example output
    NAME   TYPE              RESOURCE                               SINK         READY
    a1     ApiServerSource   apiserversources.sources.knative.dev   ksvc:eshow2   True
    b1     SinkBinding       sinkbindings.sources.knative.dev       ksvc:eshow3   False
    p1     PingSource        pingsources.sources.knative.dev        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        pingsources.sources.knative.dev        ksvc:eshow1   True