From b9ea35cd8d9e9cc953d19738cdc5b8208b09c04e Mon Sep 17 00:00:00 2001 From: meijin <859037421@qq.com> Date: Thu, 24 Jun 2021 01:16:56 +0800 Subject: [PATCH] add link to examples and adjust punctuation (#1256) Signed-off-by: meijin Co-authored-by: Derek Wang --- docs/concepts/event_source.md | 2 +- docs/concepts/sensor.md | 2 +- docs/developer_guide.md | 6 ++-- docs/eventsources/generic.md | 7 ++--- docs/eventsources/setup/amqp.md | 8 ++--- docs/eventsources/setup/aws-sns.md | 6 ++-- docs/eventsources/setup/aws-sqs.md | 8 ++--- docs/eventsources/setup/calendar.md | 4 +-- docs/eventsources/setup/emitter.md | 6 ++-- docs/eventsources/setup/file.md | 4 +-- docs/eventsources/setup/gcp-pub-sub.md | 4 +-- docs/eventsources/setup/github.md | 9 +++--- docs/eventsources/setup/gitlab.md | 4 +-- docs/eventsources/setup/kafka.md | 7 ++--- docs/eventsources/setup/minio.md | 4 +-- docs/eventsources/setup/mqtt.md | 2 +- docs/eventsources/setup/nats.md | 2 +- docs/eventsources/setup/nsq.md | 10 +++--- docs/eventsources/setup/pulsar.md | 6 ++-- docs/eventsources/setup/redis.md | 4 +-- docs/eventsources/setup/resource.md | 7 ++--- docs/eventsources/setup/webhook.md | 4 +-- docs/installation.md | 16 +++++----- docs/managed-namespace.md | 9 ++---- docs/quick_start.md | 8 ++--- docs/sensors/triggers/argo-workflow.md | 4 +-- docs/sensors/triggers/aws-lambda.md | 10 +++--- docs/sensors/triggers/azure-event-hubs.md | 6 ++-- docs/sensors/triggers/http-trigger.md | 24 +++++++-------- docs/sensors/triggers/k8s-object-trigger.md | 10 +++--- docs/sensors/triggers/kafka-trigger.md | 7 ++--- docs/sensors/triggers/nats-trigger.md | 7 ++--- docs/sensors/triggers/slack-trigger.md | 14 ++++----- docs/service-accounts.md | 4 +-- docs/tutorials/01-introduction.md | 34 ++++++++------------- docs/tutorials/02-parameterization.md | 2 +- docs/tutorials/03-trigger-sources.md | 21 ++++++------- docs/tutorials/04-standard-k8s-resources.md | 4 +-- docs/tutorials/06-trigger-conditions.md | 4 +-- docs/tutorials/07-filters.md | 10 +++--- 40 files changed, 143 insertions(+), 167 deletions(-) diff --git a/docs/concepts/event_source.md b/docs/concepts/event_source.md index f203cc79d7..a4c1592768 100644 --- a/docs/concepts/event_source.md +++ b/docs/concepts/event_source.md @@ -35,4 +35,4 @@ Available event-sources: The complete specification is available [here](https://github.com/argoproj/argo-events/blob/master/api/event-source.md). ## Examples -Examples are located under `examples/event-sources`. +Examples are located under [examples/event-sources](https://github.com/argoproj/argo-events/tree/master/examples/event-sources). diff --git a/docs/concepts/sensor.md b/docs/concepts/sensor.md index 44cb5282b7..5f700a2c4b 100644 --- a/docs/concepts/sensor.md +++ b/docs/concepts/sensor.md @@ -9,4 +9,4 @@ A dependency is an event the sensor is waiting to happen. Complete specification is available [here](https://github.com/argoproj/argo-events/blob/master/api/sensor.md). ## Examples -Examples are located under `examples/sensors`. +Examples are located under [examples/sensors](https://github.com/argoproj/argo-events/tree/master/examples/sensors). \ No newline at end of file diff --git a/docs/developer_guide.md b/docs/developer_guide.md index 023d74a5ff..1a235c24d1 100644 --- a/docs/developer_guide.md +++ b/docs/developer_guide.md @@ -13,21 +13,21 @@ another cluster you can ignore the Minikube specific step 3. ### Installation & Setup -#### 1. Get the project +#### 1. Get the project. ``` git clone git@github.com:argoproj/argo-events cd argo-events ``` -#### 2. Start Minikube and point Docker Client to Minikube's Docker Daemon +#### 2. Start Minikube and point Docker Client to Minikube's Docker Daemon. ``` minikube start eval $(minikube docker-env) ``` -#### 3. Build the project +#### 3. Build the project. ``` make all diff --git a/docs/eventsources/generic.md b/docs/eventsources/generic.md index 7fcde3c1b8..0de8953487 100644 --- a/docs/eventsources/generic.md +++ b/docs/eventsources/generic.md @@ -7,7 +7,7 @@ implementation. ## Contract In order to qualify as generic eventsource, the eventsource server needs to -implement following gRPC contract, +implement following gRPC contract. syntax = "proto3"; @@ -34,14 +34,13 @@ implement following gRPC contract, bytes payload = 2; } -The proto file is available -[here](https://github.com/argoproj/argo-events/blob/master/eventsources/sources/generic/generic.proto). +The proto file is available [here](https://github.com/argoproj/argo-events/blob/master/eventsources/sources/generic/generic.proto). ## Architecture ![arch](../assets/generic-eventsource.png) -Consider a generic eventsource, +Consider a generic eventsource. apiVersion: argoproj.io/v1alpha1 kind: EventSource diff --git a/docs/eventsources/setup/amqp.md b/docs/eventsources/setup/amqp.md index a11c83b926..ef0cd8a13a 100644 --- a/docs/eventsources/setup/amqp.md +++ b/docs/eventsources/setup/amqp.md @@ -38,7 +38,7 @@ The structure of an event dispatched by the event-source over the eventbus looks ## Setup -1. Lets set up RabbitMQ locally, +1. Lets set up RabbitMQ locally. apiVersion: v1 kind: Service @@ -78,7 +78,7 @@ The structure of an event dispatched by the event-source over the eventbus looks 2. Make sure the RabbitMQ controller pod is up and running before proceeding further. -3. Expose the RabbitMQ server to local publisher using `port-forward`, +3. Expose the RabbitMQ server to local publisher using `port-forward`. kubectl -n argo-events port-forward 5672:5672 @@ -88,11 +88,11 @@ The structure of an event dispatched by the event-source over the eventbus looks 6. Inspect the event-source pod logs to make sure it was able to subscribe to the exchange specified in the event source to consume messages. -7. Create the sensor by running the following command, +7. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/amqp.yaml -8. Lets set up a rabbitmq publisher. If you don't have `pika` installed, run, +8. Lets set up a rabbitmq publisher. If you don't have `pika` installed, run. python -m pip install pika --upgrade diff --git a/docs/eventsources/setup/aws-sns.md b/docs/eventsources/setup/aws-sns.md index c8028a3130..8da58c3267 100644 --- a/docs/eventsources/setup/aws-sns.md +++ b/docs/eventsources/setup/aws-sns.md @@ -27,7 +27,7 @@ The structure of an event dispatched by the event-source over eventbus looks lik 1. Fetch your access and secret key for AWS account and base64 encode them. -1. Create a secret called `aws-secret` as follows, +1. Create a secret called `aws-secret` as follows. apiVersion: v1 kind: Secret @@ -38,7 +38,7 @@ The structure of an event dispatched by the event-source over eventbus looks lik accesskey: secretkey: -1. Deploy the secret +1. Deploy the secret. kubectl -n argo-events apply -f aws-secret.yaml @@ -53,7 +53,7 @@ The structure of an event dispatched by the event-source over eventbus looks lik 1. Go to SNS settings on AWS and verify the webhook is registered. You can also check it by inspecting the event-source pod logs. -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/aws-sns.yaml diff --git a/docs/eventsources/setup/aws-sqs.md b/docs/eventsources/setup/aws-sqs.md index 955b16be85..bf015af130 100644 --- a/docs/eventsources/setup/aws-sqs.md +++ b/docs/eventsources/setup/aws-sqs.md @@ -35,7 +35,7 @@ The structure of an event dispatched by the event-source over the eventbus looks 1. Fetch your access and secret key for AWS account and base64 encode them. -1. Create a secret called `aws-secret` as follows, +1. Create a secret called `aws-secret` as follows. apiVersion: v1 kind: Secret @@ -46,7 +46,7 @@ The structure of an event dispatched by the event-source over the eventbus looks accesskey: secretkey: -1. Deploy the secret +1. Deploy the secret. kubectl -n argo-events apply -f aws-secret.yaml @@ -56,11 +56,11 @@ The structure of an event dispatched by the event-source over the eventbus looks 1. Inspect the event-source pod logs to make sure it was able to subscribe to the queue specified in the event source to consume messages. -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/aws-sqs.yaml -1. Dispatch a message on sqs queue, +1. Dispatch a message on sqs queue. aws sqs send-message --queue-url https://sqs.us-east-1.amazonaws.com/XXXXX/test --message-body '{"message": "hello"}' diff --git a/docs/eventsources/setup/calendar.md b/docs/eventsources/setup/calendar.md index 626a4779aa..ea49ceb695 100644 --- a/docs/eventsources/setup/calendar.md +++ b/docs/eventsources/setup/calendar.md @@ -27,11 +27,11 @@ Calendar event-source specification is available [here](https://github.com/argop ## Setup -1. Install the event source in the `argo-events` namespace, +1. Install the event source in the `argo-events` namespace. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/calendar.yaml -1. The event-source will generate events at every 10 seconds. Let's create the sensor, +1. The event-source will generate events at every 10 seconds. Let's create the sensor. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/calendar.yaml diff --git a/docs/eventsources/setup/emitter.md b/docs/eventsources/setup/emitter.md index 5b9f9d06df..482fcf17a1 100644 --- a/docs/eventsources/setup/emitter.md +++ b/docs/eventsources/setup/emitter.md @@ -28,7 +28,7 @@ Emitter event-source specification is available [here](https://github.com/argopr ## Setup -1. Deploy the emitter in your local K8s cluster, +1. Deploy the emitter in your local K8s cluster. --- apiVersion: v1 @@ -87,11 +87,11 @@ Emitter event-source specification is available [here](https://github.com/argopr 1. Inspect the event-source pod logs to make sure it was able to subscribe to the topic specified in the event source to consume messages. -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/emitter.yaml -1. Send a message on emitter channel using one of the clients https://emitter.io/develop/golang/ +1. Send a message on emitter channel using one of the clients https://emitter.io/develop/golang/. 1. Once a message is published, an argo workflow will be triggered. Run `argo list` to find the workflow. diff --git a/docs/eventsources/setup/file.md b/docs/eventsources/setup/file.md index b2b5d1c859..9c45279103 100644 --- a/docs/eventsources/setup/file.md +++ b/docs/eventsources/setup/file.md @@ -34,11 +34,11 @@ File event-source specification is available [here](https://github.com/argoproj/ 1. The event source has configuration to listen to file system events for `test-data` directory and file called `x.txt`. -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/file.yaml -1. Log into the event-source pod by running following command, +1. Log into the event-source pod by running following command. kubectl -n argo-events exec -it -c file-events -- /bin/bash diff --git a/docs/eventsources/setup/gcp-pub-sub.md b/docs/eventsources/setup/gcp-pub-sub.md index 6b8e770fc5..5224bfca25 100644 --- a/docs/eventsources/setup/gcp-pub-sub.md +++ b/docs/eventsources/setup/gcp-pub-sub.md @@ -38,7 +38,7 @@ GCP Pub/Sub event-source specification is available [here](https://github.com/ar If you use Workload Identity, you can skip this and next steps. -1. Create a K8s secret called `gcp-credentials` to store the credentials file +1. Create a K8s secret called `gcp-credentials` to store the credentials file. ```yaml apiVersion: v1 @@ -61,7 +61,7 @@ GCP Pub/Sub event-source specification is available [here](https://github.com/ar 1. Inspect the event-source pod logs to make sure it was able to subscribe to the topic. -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. ```sh kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/gcp-pubsub.yaml diff --git a/docs/eventsources/setup/github.md b/docs/eventsources/setup/github.md index 422f15f1b2..cf9fa4f2b6 100644 --- a/docs/eventsources/setup/github.md +++ b/docs/eventsources/setup/github.md @@ -32,7 +32,7 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events 1. Create an API token if you don't have one. Follow [instructions](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) to create a new GitHub API Token. Grant it the `repo_hook` permissions. -1. Base64 encode your api token key, +1. Base64 encode your api token key. echo -n | base64 @@ -46,7 +46,7 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events data: token: -1. Deploy the secret into K8s cluster +1. Deploy the secret into K8s cluster. kubectl -n argo-events apply -f github-access.yaml @@ -59,10 +59,9 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events kubectl apply -n argo-events -f -1. Go to `Webhooks` under your project settings on GitHub and verify the webhook is registered. You can also do the same by - looking at the event-source pod logs. +1. Go to `Webhooks` under your project settings on GitHub and verify the webhook is registered. You can also do the same by looking at the event-source pod logs. -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/github.yaml diff --git a/docs/eventsources/setup/gitlab.md b/docs/eventsources/setup/gitlab.md index 291c001f57..6def7b7f8f 100644 --- a/docs/eventsources/setup/gitlab.md +++ b/docs/eventsources/setup/gitlab.md @@ -32,7 +32,7 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events 1. Create an API token if you don't have one. Follow [instructions](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) to create a new GitLab API Token. Grant it the `api` permissions. -1. Base64 encode your api token key, +1. Base64 encode your api token key. echo -n | base64 @@ -61,7 +61,7 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events 1. Go to `Webhooks` under your project settings on GitLab and verify the webhook is registered. -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/gitlab.yaml diff --git a/docs/eventsources/setup/kafka.md b/docs/eventsources/setup/kafka.md index c237fa66d7..7c9af8ad8f 100644 --- a/docs/eventsources/setup/kafka.md +++ b/docs/eventsources/setup/kafka.md @@ -29,18 +29,17 @@ Kafka event-source specification is available [here](https://github.com/argoproj ## Setup -1. Make sure to set up the Kafka cluster in Kubernetes if you don't already have one. You can refer to https://github.com/Yolean/kubernetes-kafka -for installation instructions. +1. Make sure to set up the Kafka cluster in Kubernetes if you don't already have one. You can refer to https://github.com/Yolean/kubernetes-kafka for installation instructions. 1. Create the event source by running the following command. Make sure to update the appropriate fields. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/kafka.yaml -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/kafka.yaml -1. Send message by using Kafka client. More info on how to send message at https://kafka.apache.org/quickstart +1. Send message by using Kafka client. More info on how to send message at https://kafka.apache.org/quickstart. 1. Once a message is published, an argo workflow will be triggered. Run `argo list` to find the workflow. diff --git a/docs/eventsources/setup/minio.md b/docs/eventsources/setup/minio.md index effd5e91cf..6f4c082efc 100644 --- a/docs/eventsources/setup/minio.md +++ b/docs/eventsources/setup/minio.md @@ -56,11 +56,11 @@ The structure of an event dispatched by the event-source over the eventbus looks mc mb minio/input -1. Let's install event source in the `argo-events` namespace, +1. Let's install event source in the `argo-events` namespace. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/minio.yaml -1. Let's create the sensor, +1. Let's create the sensor. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/minio.yaml diff --git a/docs/eventsources/setup/mqtt.md b/docs/eventsources/setup/mqtt.md index e7d63e39a7..785e280e6a 100644 --- a/docs/eventsources/setup/mqtt.md +++ b/docs/eventsources/setup/mqtt.md @@ -36,7 +36,7 @@ MQTT event-source specification is available [here](https://github.com/argoproj/ kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/mqtt.yaml -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/mqtt.yaml diff --git a/docs/eventsources/setup/nats.md b/docs/eventsources/setup/nats.md index cd17f750b5..749a5ea49a 100644 --- a/docs/eventsources/setup/nats.md +++ b/docs/eventsources/setup/nats.md @@ -87,7 +87,7 @@ NATS event-source specification is available [here](https://github.com/argoproj/ kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/nats.yaml -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/nats.yaml diff --git a/docs/eventsources/setup/nsq.md b/docs/eventsources/setup/nsq.md index 02eaccc81f..022e27d71d 100644 --- a/docs/eventsources/setup/nsq.md +++ b/docs/eventsources/setup/nsq.md @@ -29,7 +29,7 @@ NSQ event-source is available [here](https://github.com/argoproj/argo-events/blo ## Setup -1. Deploy NSQ on local K8s cluster +1. Deploy NSQ on local K8s cluster. apiVersion: v1 kind: Service @@ -230,11 +230,11 @@ NSQ event-source is available [here](https://github.com/argoproj/argo-events/blo - nsqlookupd.argo-events.svc:4161 terminationGracePeriodSeconds: 5 -1. Expose NSQD by kubectl `port-forward`, +1. Expose NSQD by kubectl `port-forward`. kubectl -n argo-events port-forward service/nsqd 4151:4151 -1. Create topic `hello` and channel `my-channel` +1. Create topic `hello` and channel `my-channel`. curl -X POST 'http://localhost:4151/topic/create?topic=hello' @@ -244,11 +244,11 @@ NSQ event-source is available [here](https://github.com/argoproj/argo-events/blo kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/nsq.yaml -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/nsq.yaml -1. Publish a message on topic `hello` and channel `my-channel`, +1. Publish a message on topic `hello` and channel `my-channel`. curl -d '{"message": "hello"}' 'http://localhost:4151/pub?topic=hello&channel=my-channel' diff --git a/docs/eventsources/setup/pulsar.md b/docs/eventsources/setup/pulsar.md index 601e736e0b..4a8356a5db 100644 --- a/docs/eventsources/setup/pulsar.md +++ b/docs/eventsources/setup/pulsar.md @@ -29,7 +29,7 @@ Pulsar event-source is available [here](https://github.com/argoproj/argo-events/ ## Setup -1. To test locally, deploy a standalone Pulsar, +1. To test locally, deploy a standalone Pulsar. apiVersion: apps/v1 kind: Deployment @@ -83,11 +83,11 @@ Pulsar event-source is available [here](https://github.com/argoproj/argo-events/ 1. For production deployment, follow the official Pulsar documentation online. -1. Deploy the eventsource, +1. Deploy the eventsource. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/pulsar.yaml -1. Deploy the sensor, +1. Deploy the sensor. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/pulsar.yaml diff --git a/docs/eventsources/setup/redis.md b/docs/eventsources/setup/redis.md index e79177cfa3..6b4254fa10 100644 --- a/docs/eventsources/setup/redis.md +++ b/docs/eventsources/setup/redis.md @@ -35,11 +35,11 @@ Redis event-source specification is available [here](https://github.com/argoproj kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/redis.yaml -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/redis.yaml -1. Log into redis pod using `kubectl`, +1. Log into redis pod using `kubectl`. kubectl -n argo-events exec -it -c -- /bin/bash diff --git a/docs/eventsources/setup/resource.md b/docs/eventsources/setup/resource.md index 2f2e5faf94..03a6a60346 100644 --- a/docs/eventsources/setup/resource.md +++ b/docs/eventsources/setup/resource.md @@ -33,14 +33,13 @@ Resource event-source specification is available [here](https://github.com/argop kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/resource.yaml -1. Create the sensor by running the following command, +1. Create the sensor by running the following command. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/resource.yaml -1. The event source we created in step 1 contains configuration which makes the event-source listen to - Argo workflows marked with label `app: my-workflow`. +1. The event source we created in step 1 contains configuration which makes the event-source listen to Argo workflows marked with label `app: my-workflow`. -1. Lets create a workflow called `my-workflow` with label `app: my-workflow` +1. Lets create a workflow called `my-workflow` with label `app: my-workflow`. apiVersion: argoproj.io/v1alpha1 kind: Workflow diff --git a/docs/eventsources/setup/webhook.md b/docs/eventsources/setup/webhook.md index 80cc0bf262..04e2e995ff 100644 --- a/docs/eventsources/setup/webhook.md +++ b/docs/eventsources/setup/webhook.md @@ -29,12 +29,12 @@ Webhook event-source specification is available [here](https://github.com/argopr ## Setup -1. Install the event source in the `argo-events` namespace, +1. Install the event source in the `argo-events` namespace. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/webhook.yaml 1. The event-source pod is listening for HTTP requests on port `12000` and endpoint `/example`. - It's time to create the sensor, + It's time to create the sensor. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/webhook.yaml diff --git a/docs/installation.md b/docs/installation.md index 43b2cc44b1..706b193942 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -9,11 +9,11 @@ #### Cluster-wide Installation -1. Create the namespace +1. Create the namespace. kubectl create namespace argo-events -2. Deploy Argo Events, SA, ClusterRoles, Sensor Controller, EventBus Controller and EventSource Controller +2. Deploy Argo Events, SA, ClusterRoles, Sensor Controller, EventBus Controller and EventSource Controller. kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/install.yaml # Install with a validating admission controller @@ -30,17 +30,17 @@ oc adm policy add-scc-to-user anyuid system:serviceaccount:argo-events:default -3. Deploy the eventbus, +3. Deploy the eventbus. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml #### Namespace Installation -1. Create the namespace +1. Create the namespace. kubectl create namespace argo-events -2. Deploy Argo Events, SA, Roles, Sensor Controller, EventBus Controller and EventSource Controller +2. Deploy Argo Events, SA, Roles, Sensor Controller, EventBus Controller and EventSource Controller. kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/namespace-install.yaml @@ -54,7 +54,7 @@ oc adm policy add-scc-to-user anyuid system:serviceaccount:argo-events:default -3. Deploy the eventbus, +3. Deploy the eventbus. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml @@ -78,14 +78,14 @@ Make sure you have helm client installed and Tiller server is running. To instal 1. Create namespace called argo-events. -1. Add `argoproj` repository +1. Add `argoproj` repository. helm repo add argo https://argoproj.github.io/argo-helm 1. The helm chart for argo-events is maintained solely by the community and hence the image version for controllers can go out of sync. Update the image version in values.yaml to v1.0.0. -1. Install `argo-events` chart +1. Install `argo-events` chart. helm install argo-events argo/argo-events diff --git a/docs/managed-namespace.md b/docs/managed-namespace.md index e69b9f645b..01d180d960 100644 --- a/docs/managed-namespace.md +++ b/docs/managed-namespace.md @@ -1,13 +1,8 @@ # Managed Namespace -You can install `argo-events` in either cluster scoped or namespace scoped -configuration, accordingly you need to set up ClusterRole or normal Role for -service account `argo-events-sa`. +You can install `argo-events` in either cluster scoped or namespace scoped configuration, accordingly you need to set up ClusterRole or normal Role for service account `argo-events-sa`. -In namespace scope installation, you must run `eventbus-controller`, -`eventsource-controller` and `sensor-controller` with `--namespaced`. If you -would like to have the controllers watching a separated namespace, add -`--managed-namespace` as well. +In namespace scope installation, you must run `eventbus-controller`, `eventsource-controller` and `sensor-controller` with `--namespaced`. If you would like to have the controllers watching a separated namespace, add `--managed-namespace` as well. For example: diff --git a/docs/quick_start.md b/docs/quick_start.md index b3a321d622..cec7480cc1 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md @@ -4,11 +4,11 @@ We are going to set up a sensor and event-source for webhook. The goal is to tri Note: You will need to have [Argo Workflows](https://argoproj.github.io/argo-workflows/) installed to make this work. -1. Make sure to have the eventbus pods running in the namespace. Run following command to create the eventbus, +1. Make sure to have the eventbus pods running in the namespace. Run following command to create the eventbus. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml -1. Setup event-source for webhook as follows, +1. Setup event-source for webhook as follows. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/webhook.yaml @@ -16,7 +16,7 @@ Note: You will need to have [Argo Workflows](https://argoproj.github.io/argo-wor After running the above command, the event-source controller will create a pod and service. -1. Create webhook sensor, +1. Create webhook sensor. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/webhook.yaml @@ -26,7 +26,7 @@ Note: You will need to have [Argo Workflows](https://argoproj.github.io/argo-wor kubectl -n argo-events port-forward $(kubectl -n argo-events get pod -l eventsource-name=webhook -o name) 12000:12000 & -1. Use either Curl or Postman to send a post request to the http://localhost:12000/example +1. Use either Curl or Postman to send a post request to the http://localhost:12000/example. curl -d '{"message":"this is my first webhook"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example diff --git a/docs/sensors/triggers/argo-workflow.md b/docs/sensors/triggers/argo-workflow.md index 0875aef00e..d98efaabca 100644 --- a/docs/sensors/triggers/argo-workflow.md +++ b/docs/sensors/triggers/argo-workflow.md @@ -22,7 +22,7 @@ Argo workflow is K8s custom resource which help orchestrating parallel jobs on K kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/webhook.yaml -1. Create the sensor, +1. Create the sensor. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/webhook.yaml @@ -30,7 +30,7 @@ Argo workflow is K8s custom resource which help orchestrating parallel jobs on K kubectl -n argo-events port-forward 12000:12000 -1. Use either Curl or Postman to send a post request to the `http://localhost:12000/example` +1. Use either Curl or Postman to send a post request to the `http://localhost:12000/example`. curl -d '{"message":"ok"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example diff --git a/docs/sensors/triggers/aws-lambda.md b/docs/sensors/triggers/aws-lambda.md index 5ea2fbd566..43e034dd88 100644 --- a/docs/sensors/triggers/aws-lambda.md +++ b/docs/sensors/triggers/aws-lambda.md @@ -19,12 +19,11 @@ that are not native to AWS. 1. Make sure to have eventbus deployed in the namespace. -1. Make sure your AWS account has permissions to execute Lambda. More info on AWS permissions is available - [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html). +1. Make sure your AWS account has permissions to execute Lambda. More info on AWS permissions is available [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html). 1. Fetch your access and secret key for AWS account and base64 encode them. -1. Create a secret called `aws-secret` as follows, +1. Create a secret called `aws-secret` as follows. apiVersion: v1 kind: Secret @@ -50,7 +49,7 @@ that are not native to AWS. kubectl -n argo-events port-forward 12000:12000 -1. Deploy the webhook sensor with AWS Lambda trigger +1. Deploy the webhook sensor with AWS Lambda trigger. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/aws-lambda-trigger.yaml @@ -98,8 +97,7 @@ The `payload` declared above will generate a request payload like below, The above payload will be passed in the request to invoke the AWS lambda. You can add however many number of `src` and `dest` under `payload`. -**Note**: Take a look at [Parameterization](https://argoproj.github.io/argo-events/tutorials/02-parameterization/) in order to understand how to extract particular key-value from -event data. +**Note**: Take a look at [Parameterization](https://argoproj.github.io/argo-events/tutorials/02-parameterization/) in order to understand how to extract particular key-value from event data. ## Parameterization Similar to other type of triggers, sensor offers parameterization for the AWS Lambda trigger. Parameterization is specially useful when diff --git a/docs/sensors/triggers/azure-event-hubs.md b/docs/sensors/triggers/azure-event-hubs.md index 7737c72f55..358d713ab2 100644 --- a/docs/sensors/triggers/azure-event-hubs.md +++ b/docs/sensors/triggers/azure-event-hubs.md @@ -12,11 +12,11 @@ The Azure Event Hubs trigger specification is available [here](https://github.co 1. Make sure to have the eventbus deployed in the namespace. -1. [Create an event hub](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create) +1. [Create an event hub](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create). 1. Make sure that the Shared Access Key used to connect to Azure Event Hubs has the `Send` policy. -1. Get the `Primary Key` of the Shared Access Policy, the `Name` of the Shared Access Policy, the `Hub Name`, and the `FQDN` of the Azure Event Hubs Namespace +1. Get the `Primary Key` of the Shared Access Policy, the `Name` of the Shared Access Policy, the `Hub Name`, and the `FQDN` of the Azure Event Hubs Namespace. 1. Create a secret called `azure-event-hubs-secret` as follows: @@ -81,7 +81,7 @@ The Azure Event Hubs trigger specification is available [here](https://github.co kubectl -n argo-events port-forward 12000:12000 -1. Use either Curl or Postman to send a post request to the `http://localhost:12000/example` +1. Use either Curl or Postman to send a post request to the `http://localhost:12000/example`. curl -d '{"message":"ok"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example diff --git a/docs/sensors/triggers/http-trigger.md b/docs/sensors/triggers/http-trigger.md index 479ba87fad..6f1aa76a3d 100644 --- a/docs/sensors/triggers/http-trigger.md +++ b/docs/sensors/triggers/http-trigger.md @@ -24,7 +24,7 @@ can help. The HTTP trigger takes the task of consuming events from event-sources We will set up a basic go http server and connect it with the minio events. -1. The HTTP server simply prints the request body as follows, +1. The HTTP server simply prints the request body as follows. package main @@ -50,15 +50,15 @@ We will set up a basic go http server and connect it with the minio events. http.ListenAndServe(":8090", nil) } -2. Deploy the HTTP server, +2. Deploy the HTTP server. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/09-http-trigger/http-server.yaml -3. Create a service to expose the http server +3. Create a service to expose the http server. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/09-http-trigger/http-server-svc.yaml -4. Either use Ingress, OpenShift Route or port-forwarding to expose the http server.. +4. Either use Ingress, OpenShift Route or port-forwarding to expose the http server. kubectl -n argo-events port-forward 8090:8090 @@ -66,14 +66,14 @@ We will set up a basic go http server and connect it with the minio events. lets set up the Minio event-source available [here](https://argoproj.github.io/argo-events/setup/minio/). Don't create the sensor as we will be deploying it in next step. -6. Create a sensor as follows, +6. Create a sensor as follows. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/http-trigger.yaml 7. Now, drop a file onto `input` bucket in Minio server. -8. The sensor has triggered a http request to the http server. Take a look at the logs +8. The sensor has triggered a http request to the http server. Take a look at the logs. server is listening on 8090 {"type":"minio","bucket":"input"} @@ -157,7 +157,7 @@ to invoke OpenFaas function. 1. If you don't have OpenFaas installed, follow the [instructions](https://docs.openfaas.com/deployment/kubernetes/). -2. Let's create a basic function. You can follow the [steps](https://blog.alexellis.io/serverless-golang-with-openfaas/) +2. Let's create a basic function. You can follow the [steps](https://blog.alexellis.io/serverless-golang-with-openfaas/). to set up the function. @@ -180,7 +180,7 @@ to invoke OpenFaas function. 5. Let's set up the Redis Database, Redis PubSub event-source as specified [here](https://argoproj.github.io/argo-events/setup/redis/). Do not create the Redis sensor, we are going to create it in next step. -6. Let's create the sensor with OpenFaas trigger +6. Let's create the sensor with OpenFaas trigger. apiVersion: argoproj.io/v1alpha1 kind: Sensor @@ -214,7 +214,7 @@ Similar to REST API calls, you can easily invoke Kubeless functions using HTTP t 1. If you don't have Kubeless installed, follow the [installation](https://kubeless.io/docs/quick-start/). -2. Lets create a basic function, +2. Lets create a basic function. def hello(event, context): print event @@ -227,7 +227,7 @@ Similar to REST API calls, you can easily invoke Kubeless functions using HTTP t 5. Let's set up the NATS event-source. Follow [instructions](https://argoproj.github.io/argo-events/setup/nats/#setup) for details. Do not create the NATS sensor, we are going to create it in next step. -6. Let's create NATS sensor with HTTP trigger, +6. Let's create NATS sensor with HTTP trigger. apiVersion: argoproj.io/v1alpha1 kind: Sensor @@ -254,11 +254,11 @@ Similar to REST API calls, you can easily invoke Kubeless functions using HTTP t dest: last_name method: POST -7. Once event-source and sensor pod are up and running, dispatch a message on `foo` subject using nats client, +7. Once event-source and sensor pod are up and running, dispatch a message on `foo` subject using nats client. go run main.go -s localhost foo '{"first_name": "foo", "last_name": "bar"}' -8. It will invoke Kubeless function `hello`, +8. It will invoke Kubeless function `hello`. {'event-time': None, 'extensions': {'request': }, 'event-type': None, 'event-namespace': None, 'data': '{"first_name":"foo","last_name":"bar"}', 'event-id': None} diff --git a/docs/sensors/triggers/k8s-object-trigger.md b/docs/sensors/triggers/k8s-object-trigger.md index 71359ba406..419f736926 100644 --- a/docs/sensors/triggers/k8s-object-trigger.md +++ b/docs/sensors/triggers/k8s-object-trigger.md @@ -22,7 +22,7 @@ set up event-driven pipelines for existing workloads. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/webhook.yaml -1. To trigger a pod, we need to create a sensor as defined below, +1. To trigger a pod, we need to create a sensor as defined below. apiVersion: argoproj.io/v1alpha1 kind: Sensor @@ -65,7 +65,7 @@ set up event-driven pipelines for existing workloads. 1. The `group`, `version` and `resource` under `k8s` in the trigger template determines the type of K8s object. Change it accordingly if you want to trigger something else than a pod. -1. Create the sensor, +1. Create the sensor. kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/trigger-standard-k8s-resource.yaml @@ -73,11 +73,11 @@ set up event-driven pipelines for existing workloads. kubectl -n argo-events port-forward 12000:12000 -1. Use either Curl or Postman to send a post request to the `http://localhost:12000/example` +1. Use either Curl or Postman to send a post request to the `http://localhost:12000/example`. curl -d '{"message":"ok"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example -1. Inspect the logs of the pod, you will something similar as below, +1. Inspect the logs of the pod, you will something similar as below. _________________________________________ / {"context":{"type":"webhook","specVersi \ @@ -110,7 +110,7 @@ set up event-driven pipelines for existing workloads. You can specify the operation for the trigger using the `operation` key under triggers->template->k8s. -Operation can be either, +Operation can be either. 1. `create`: Creates the object if not available in K8s cluster. 2. `update`: Updates the object. diff --git a/docs/sensors/triggers/kafka-trigger.md b/docs/sensors/triggers/kafka-trigger.md index 6fb066f58e..7be5d565fd 100644 --- a/docs/sensors/triggers/kafka-trigger.md +++ b/docs/sensors/triggers/kafka-trigger.md @@ -8,13 +8,12 @@ The Kafka trigger specification is available [here](https://github.com/argoproj/ ## Walkthrough -1. Consider a scenario where you are expecting a file drop onto a Minio bucket and want to place that event - on a Kafka topic. +1. Consider a scenario where you are expecting a file drop onto a Minio bucket and want to place that event on a Kafka topic. 1. Set up the Minio Event Source [here](https://argoproj.github.io/argo-events/setup/minio/). Do not create the Minio sensor, we are going to create it in next step. -1. Lets create the sensor, +1. Lets create the sensor. apiVersion: argoproj.io/v1alpha1 kind: Sensor @@ -50,7 +49,7 @@ The Kafka trigger specification is available [here](https://github.com/argoproj/ The `payload` contains the list of `src` which refers to the source event and `dest` which refers to destination key within result request payload. - The `payload` declared above will generate a message body like below, + The `payload` declared above will generate a message body like below. { "fileName": "hello.txt" // name/key of the object diff --git a/docs/sensors/triggers/nats-trigger.md b/docs/sensors/triggers/nats-trigger.md index b8490239b7..3fee66ed5d 100644 --- a/docs/sensors/triggers/nats-trigger.md +++ b/docs/sensors/triggers/nats-trigger.md @@ -13,7 +13,7 @@ The NATS trigger specification is available [here](https://github.com/argoproj/a 1. Set up the Minio Event Source [here](https://argoproj.github.io/argo-events/setup/minio/). Do not create the Minio sensor, we are going to create it in next step. -1. Lets create the sensor, +1. Lets create the sensor. apiVersion: argoproj.io/v1alpha1 kind: Sensor @@ -54,7 +54,7 @@ The NATS trigger specification is available [here](https://github.com/argoproj/a "bucket": "input" // name of the bucket } -1. If you are running NATS on local K8s cluster, make sure to `port-forward` to pod, +1. If you are running NATS on local K8s cluster, make sure to `port-forward` to pod. kubectl -n argo-events port-forward 4222:4222 @@ -62,7 +62,6 @@ The NATS trigger specification is available [here](https://github.com/argoproj/a go run main.go -s localhost minio-events' -1. Drop a file called `hello.txt` onto the bucket `input` and you will receive the message on NATS subscriber - as follows, +1. Drop a file called `hello.txt` onto the bucket `input` and you will receive the message on NATS subscriber as follows. [#1] Received on [minio-events]: '{"bucket":"input","fileName":"hello.txt"}' diff --git a/docs/sensors/triggers/slack-trigger.md b/docs/sensors/triggers/slack-trigger.md index a3c31fd4a0..ba1ee654fe 100644 --- a/docs/sensors/triggers/slack-trigger.md +++ b/docs/sensors/triggers/slack-trigger.md @@ -19,21 +19,21 @@ The Slack trigger is used to send a custom message to a desired Slack channel in ## Create a Slack App We need to create a Slack App which will send messages to your Slack Workspace. We will add OAuth Permissions and add the OAuth token to the k8s cluster via a secret. -1. Create a Slack app by clicking `Create New App` at the [Slack API Page](https://api.slack.com/apps). Name your app and choose your intended Slack Workspace +1. Create a Slack app by clicking `Create New App` at the [Slack API Page](https://api.slack.com/apps). Name your app and choose your intended Slack Workspace. -2. Navigate to your app, then to `Features > OAuth & Permissions` +2. Navigate to your app, then to `Features > OAuth & Permissions`. -3. Scroll down to `Scopes` and add the scopes `channels:join`, `channels:read`, `groups:read` and `chat:write` to the _Bot Token Scopes_ +3. Scroll down to `Scopes` and add the scopes `channels:join`, `channels:read`, `groups:read` and `chat:write` to the _Bot Token Scopes_. -4. Scroll to the top of the `OAuth & Permissions` page and click `Install App to Workspace` and follow the install Wizard +4. Scroll to the top of the `OAuth & Permissions` page and click `Install App to Workspace` and follow the install Wizard. 5. You should land back on the `OAuth & Permissions` page. Copy your app's OAuth Access Token. This will allow the trigger to act on behalf of your newly created Slack app. -6. Encode your OAuth token in base64. This can done easily with the command line +6. Encode your OAuth token in base64. This can done easily with the command line. echo -n "YOUR-OAUTH-TOKEN" | base64 -7. Create a kubernetes secret file `slack-secret.yaml` with your OAuth token in the following format +7. Create a kubernetes secret file `slack-secret.yaml` with your OAuth token in the following format. apiVersion: v1 kind: Secret @@ -42,7 +42,7 @@ We need to create a Slack App which will send messages to your Slack Workspace. data: token: YOUR-BASE64-ENCODED-OAUTH-TOKEN -12. Apply the kubernetes secret +12. Apply the kubernetes secret. kubectl -n argo-events apply -f slack-secret.yaml diff --git a/docs/service-accounts.md b/docs/service-accounts.md index 9dfd008d78..973769113e 100644 --- a/docs/service-accounts.md +++ b/docs/service-accounts.md @@ -10,11 +10,11 @@ resource being watched. For example, if you want to watch actions on `Deployment` objects, you need to: -1. Create a Service Account +1. Create a Service Account. kubectl -n your-namespace create sa my-sa -2. Grant RBAC privileges to it +2. Grant RBAC privileges to it. kubectl -n your-namespace create role deployments-watcher --verb=list,watch --resource=deployments.apps diff --git a/docs/tutorials/01-introduction.md b/docs/tutorials/01-introduction.md index 9e06beaaa7..ac1cdfc9dd 100644 --- a/docs/tutorials/01-introduction.md +++ b/docs/tutorials/01-introduction.md @@ -11,21 +11,16 @@ to any type of event-source. - Make sure to configure Argo Workflow controller to listen to workflow objects created in `argo-events` namespace. - Make sure to read the concepts behind - [eventbus](https://argoproj.github.io/argo-events/concepts/eventbus/), - [sensor](https://argoproj.github.io/argo-events/concepts/sensor/), + [eventbus](https://argoproj.github.io/argo-events/concepts/eventbus/). + [sensor](https://argoproj.github.io/argo-events/concepts/sensor/). [event source](https://argoproj.github.io/argo-events/concepts/event_source/). -- Follow the - [instruction](https://github.com/argoproj/argo-events/tree/master/examples) to - create a Service Account `operate-workflow-sa` with proper privileges, and - make sure the Service Account used by Workflows (here we use `default` in the - turorials for demonstration purpose) has proper RBAC settings. +- Follow the [instruction](https://github.com/argoproj/argo-events/tree/master/examples) to create a Service Account `operate-workflow-sa` with proper privileges, and make sure the Service Account used by Workflows (here we use `default` in the turorials for demonstration purpose) has proper RBAC settings. ## Get Started -We are going to set up a sensor and event-source for webhook. The goal is to -trigger an Argo workflow upon a HTTP Post request. +We are going to set up a sensor and event-source for webhook. The goal is to trigger an Argo workflow upon a HTTP Post request. -- Let' set up the eventbus, +- Let' set up the eventbus. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml @@ -37,17 +32,14 @@ trigger an Argo workflow upon a HTTP Post request. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/webhook.yaml -If the commands are executed successfully, the eventbus, event-source and sensor -pods will get created. You will also notice that a service is created for the -event-source. +If the commands are executed successfully, the eventbus, event-source and sensor pods will get created. You will also notice that a service is created for the event-source. -- Expose the event-source pod via Ingress, OpenShift Route or port forward to - consume requests over HTTP. +- Expose the event-source pod via Ingress, OpenShift Route or port forward to consume requests over HTTP. kubectl -n argo-events port-forward 12000:12000 - Use either Curl or Postman to send a post request to the - `http://localhost:12000/example` +`http://localhost:12000/example`. curl -d '{"message":"this is my first webhook"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example @@ -93,19 +85,19 @@ pass it to the workflow as arguments. If you don't see the event-source and sensor pod in `argo-events` namespace, -1. Inspect the event-source +1. Inspect the event-source. kubectl -n argo-events get eventsource event-source-object-name -o yaml - Inspect the sensor, +2. Inspect the sensor. kubectl -n argo-events get sensor sensor-object-name -o yaml and look for any errors within the `Status`. -2. Make sure the correct Role and RoleBindings are applied to the service +3. Make sure the correct Role and RoleBindings are applied to the service account and there are no errors in both event-source and sensor controller. -3. Check the logs of event-source and sensor controller. Make sure the +4. Check the logs of event-source and sensor controller. Make sure the controllers have processed the event-source and sensor objects and there are no errors. -4. Raise an issue on GitHub or post a question on `argo-events` slack channel. +5. Raise an issue on GitHub or post a question on `argo-events` slack channel. diff --git a/docs/tutorials/02-parameterization.md b/docs/tutorials/02-parameterization.md index adf6154660..c50d463b3f 100644 --- a/docs/tutorials/02-parameterization.md +++ b/docs/tutorials/02-parameterization.md @@ -43,7 +43,7 @@ The structure of the event the Webhook sensor receives from the event-source ove 1. `Context`: This is the CloudEvent context and it is populated by the event-source regardless of type of HTTP request. -2. `Data`: Data contains following fields, +2. `Data`: Data contains following fields. 1. `Header`: The `header` within event `data` contains the headers in the HTTP request that was dispatched to the event-source. The event-source extracts the headers from the request and put it in the `header` within event `data`. diff --git a/docs/tutorials/03-trigger-sources.md b/docs/tutorials/03-trigger-sources.md index beba4797e0..16a27283bb 100644 --- a/docs/tutorials/03-trigger-sources.md +++ b/docs/tutorials/03-trigger-sources.md @@ -3,8 +3,7 @@ A trigger source is the source of trigger resource. It can be either external so as `Git`, `S3`, `K8s Configmap`, `File`, any valid `URL` that hosts the resource or an internal resource which is defined in the sensor object itself like `Inline` or `Resource`. -In the previous sections, you have been dealing with the `Resource` trigger source. In this tutorial, we -will explore other trigger sources. +In the previous sections, you have been dealing with the `Resource` trigger source. In this tutorial, we will explore other trigger sources. ## Prerequisites @@ -17,9 +16,9 @@ The specification for the Git source is available [here](https://github.com/argo 1. In order to fetch data from git, you need to set up the private SSH key in sensor. -2. If you don't have ssh keys available, create them following this [guide](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) +2. If you don't have ssh keys available, create them following this [guide](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). -3. Create a K8s secret that holds the SSH keys +3. Create a K8s secret that holds the SSH keys. kubectl -n argo-events create secret generic git-ssh --from-file=key=.ssh/ @@ -27,12 +26,11 @@ The specification for the Git source is available [here](https://github.com/argo kubectl -n argo-events create secret generic git-known-hosts --from-file=ssh_known_hosts=.ssh/known_hosts -5. Create a sensor with the git trigger source and refer it to the `hello world` workflow stored - on the Argo Git project +5. Create a sensor with the git trigger source and refer it to the `hello world` workflow stored on the Argo Git project. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/03-trigger-sources/sensor-git.yaml -6. Use either Curl or Postman to send a post request to the `http://localhost:12000/example` +6. Use either Curl or Postman to send a post request to the `http://localhost:12000/example`. curl -d '{"message":"ok"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example @@ -46,8 +44,7 @@ You can refer to the K8s resource stored on S3 compliant store as the trigger so For this tutorial, lets set up a minio server which is S3 compliant store. 1. Create a K8s secret called `artifacts-minio` that holds your minio access key and secret key. - The access key must be stored under `accesskey` key and secret key must be stored under - `secretkey`. + The access key must be stored under `accesskey` key and secret key must be stored under `secretkey`. 2. Follow steps described [here](https://github.com/minio/minio/blob/master/docs/orchestration/kubernetes/k8s-yaml.md#minio-standalone-server-deployment) to set up the minio server. @@ -59,7 +56,7 @@ For this tutorial, lets set up a minio server which is S3 compliant store. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/03-trigger-sources/sensor-minio.yaml -6. Use either Curl or Postman to send a post request to the `http://localhost:12000/example` +6. Use either Curl or Postman to send a post request to the `http://localhost:12000/example`. curl -d '{"message":"ok"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example @@ -78,7 +75,7 @@ K8s configmap can be treated as trigger source if needed. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/03-trigger-sources/sensor-cm.yaml -3. Use either Curl or Postman to send a post request to the `http://localhost:12000/example` +3. Use either Curl or Postman to send a post request to the `http://localhost:12000/example`. curl -d '{"message":"ok"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example @@ -87,4 +84,4 @@ K8s configmap can be treated as trigger source if needed. kubectl -n argo-events get wf ## File & URL -File and URL trigger sources are pretty self explanatory. The example sensors are available under `examples/sensors` folder. +File and URL trigger sources are pretty self explanatory. The example sensors are available under [examples/sensors](https://github.com/argoproj/argo-events/tree/master/examples/sensors) folder. diff --git a/docs/tutorials/04-standard-k8s-resources.md b/docs/tutorials/04-standard-k8s-resources.md index 55024a6f28..1c4524ba9f 100644 --- a/docs/tutorials/04-standard-k8s-resources.md +++ b/docs/tutorials/04-standard-k8s-resources.md @@ -47,7 +47,7 @@ provides an avenue to set up pipelines for existing workloads. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/04-standard-k8s-resources/sensor-pod.yaml 2. Use either Curl or Postman to send a post request to the - `http://localhost:12000/example` + `http://localhost:12000/example`. curl -d '{"message":"ok"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example @@ -90,7 +90,7 @@ Output kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/04-standard-k8s-resources/sensor-deployment.yaml 2. Use either Curl or Postman to send a post request to the - `http://localhost:12000/example` + `http://localhost:12000/example`. curl -d '{"message":"ok"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example diff --git a/docs/tutorials/06-trigger-conditions.md b/docs/tutorials/06-trigger-conditions.md index 3571698f5c..aa9de64a79 100644 --- a/docs/tutorials/06-trigger-conditions.md +++ b/docs/tutorials/06-trigger-conditions.md @@ -23,7 +23,7 @@ want to trigger an Argo workflow if the sensor receives an event from the `Minio` event-source. 1. Create the webhook event-source and event-source. The event-source listens - to HTTP requests on port `12000` + to HTTP requests on port `12000`. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/06-trigger-conditions/webhook-event-source.yaml @@ -41,7 +41,7 @@ Make sure there are no errors in any of the event-sources. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/06-trigger-conditions/sensor-01.yaml -4. Send a HTTP request to Webhook event-source, +4. Send a HTTP request to Webhook event-source. curl -d '{"message":"this is my first webhook"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example diff --git a/docs/tutorials/07-filters.md b/docs/tutorials/07-filters.md index 7d4a63d3ce..f7391896ee 100644 --- a/docs/tutorials/07-filters.md +++ b/docs/tutorials/07-filters.md @@ -71,14 +71,14 @@ If data types is bool or float, then you need to pass the exact value. kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/07-filters/sensor-data-filters.yaml -2. Send a HTTP request to event-source +2. Send a HTTP request to event-source. curl -d '{"message":"this is my first webhook"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example 3. You will notice that the sensor logs prints the event is invalid as the sensor expects for either `hello` or `hey` as the value of `body.message`. -4. Send a valid HTTP request to event-source +4. Send a valid HTTP request to event-source. curl -d '{"message":"hello"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example @@ -148,7 +148,7 @@ Change the subscriber in the webhook event-source to point it to `context-filter kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/tutorials/07-filters/sensor-context-filter.yaml -2. Send a HTTP request to event-source +2. Send a HTTP request to event-source. curl -d '{"message":"this is my first webhook"}' -H "Content-Type: application/json" -X POST http://localhost:12000/example @@ -167,7 +167,7 @@ The diagrams below illustlate these behavior. An example of time filter is available under `examples/sensors`. -1. if `start` < `stop`: event time must be in `[start, stop)` +1. if `start` < `stop`: event time must be in `[start, stop)`. 00:00:00 00:00:00 00:00:00 ┃ start stop ┃ start stop ┃ @@ -175,7 +175,7 @@ An example of time filter is available under `examples/sensors`. ╰───────── OK ──────────╯ ╰───────── OK ──────────╯ 2. if `stop` < `start`: event time must be in `[start, stop@Next day)` - (this is equivalent to: event time must be in `[00:00:00, stop) || [start, 00:00:00@Next day)`) + (this is equivalent to: event time must be in `[00:00:00, stop) || [start, 00:00:00@Next day)`). 00:00:00 00:00:00 00:00:00 ┃ stop start ┃ stop start ┃