Este conteúdo não está disponível no idioma selecionado.
Chapter 9. Event discovery
9.1. Listing event sources and event source types Copiar o linkLink copiado para a área de transferência!
It is possible to view a list of all event sources or event source types that exist or are available for use on your OpenShift Container Platform cluster. You can use the Knative (kn
) CLI or the OpenShift Container Platform web console to list available event sources or event source types.
9.2. Listing event source types from the command line Copiar o linkLink copiado para a área de transferência!
Using the Knative (kn
) CLI provides a streamlined and intuitive user interface to view available event source types on your cluster.
9.2.1. Listing available event source types by using the Knative CLI Copiar o linkLink copiado para a área de transferência!
You can list event source types that can be created and used on your cluster by using the kn source list-types
CLI command.
Prerequisites
- The OpenShift Serverless Operator and Knative Eventing are installed on the cluster.
-
You have installed the Knative (
kn
) CLI.
Procedure
List the available event source types in the terminal:
kn source list-types
$ kn source list-types
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: On OpenShift Container Platform, you can also list the available event source types in YAML format:
kn source list-types -o yaml
$ kn source list-types -o yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
9.3. Listing event source types from the web console Copiar o linkLink copiado para a área de transferência!
It is possible to view a list of all available event source types on your cluster. Using the OpenShift Container Platform web console provides a streamlined and intuitive user interface to view available event source types.
9.3.1. Viewing available event source types Copiar o linkLink copiado para a área de transferência!
Prerequisites
- You have logged in to the OpenShift Container Platform web console.
- The OpenShift Serverless Operator and Knative Eventing are installed on your OpenShift Container Platform cluster.
- You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
Procedure
- Click +Add.
- Click Event Source.
- View the available event source types.
9.4. Listing event sources from the command line Copiar o linkLink copiado para a área de transferência!
Using the Knative (kn
) CLI provides a streamlined and intuitive user interface to view existing event sources on your cluster.
9.4.1. Listing available event sources by using the Knative CLI Copiar o linkLink copiado para a área de transferência!
You can list existing event sources by using the kn source list
command.
Prerequisites
- The OpenShift Serverless Operator and Knative Eventing are installed on the cluster.
-
You have installed the Knative (
kn
) CLI.
Procedure
List the existing event sources in the terminal:
kn source list
$ kn source list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: You can list event sources of a specific type only, by using the
--type
flag:kn source list --type <event_source_type>
$ kn source list --type <event_source_type>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example command
kn source list --type PingSource
$ kn source list --type PingSource
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME TYPE RESOURCE SINK READY p1 PingSource pingsources.sources.knative.dev ksvc:eshow1 True
NAME TYPE RESOURCE SINK READY p1 PingSource pingsources.sources.knative.dev ksvc:eshow1 True
Copy to Clipboard Copied! Toggle word wrap Toggle overflow