updated ping source with kn base64 example (#5219)

* updated ping source with kn base64 example

* formatting fixes
This commit is contained in:
Amaan Q 2022-09-21 10:14:10 -07:00 committed by GitHub
parent c257e0bef4
commit a3fdf09cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -120,6 +120,28 @@ during the verification step in this procedure.
For a list of available options, see the [Knative client documentation](https://github.com/knative/client/blob/main/docs/cmd/kn_source_ping_create.md).
=== "kn: binary data"
- To create a PingSource that sends binary data, run the command:
```bash
kn source ping create <pingsource-name> \
--namespace <namespace> \
--schedule "<cron-schedule>" \
--data '<base64-data>' \
--encoding 'base64' \
--sink <sink-name>
```
Where:
- `<pingsource-name>` is the name of the PingSource that you want to create, for example, `test-ping-source`.
- `<namespace>` is the name of the namespace that you created in step 1 above.
- `<cron-schedule>` is a cron expression for the schedule for the PingSource to send events, for example, `*/1 * * * *` sends an event every minute.
- `<base64-data>` is the base64 encoded binary data that you want to send, for example, `ZGF0YQ==`.
- `<sink-name>` is the name of your sink, for example, `http://event-display.pingsource-example.svc.cluster.local`.
For a list of available options, see the [Knative client documentation](https://github.com/knative/client/blob/main/docs/cmd/kn_source_ping_create.md).
=== "YAML"
- To create a PingSource that sends data that can be represented as plain text,