
Argo Events v1.0 Released!
By Derek Wang & Vaibhav Page
We are very excited to announce Argo Events v1.0! Apropos to the naming, the new release introduces a re-architecture and many new features, enhancements, and community contributions. Enjoy the more user-friendly, reliable, secure eventing framework for Kubernetes that is Argo Events v1.0!
Architecture
Starting from v0.17.0, we gradually re-architected Argo Events.
- Introduced EventBus
- Merged Gateway with EventSource
- Re-implemented Controller, EventSource and Sensor
Here is the new high-level architecture -

EventBus
EventBus is a newly introduced required Custom Resource that provides a pub/sub service sitting between event detectors (EventSources) and consumers (Sensors). All events detected in EventSources will be sent to the EventBus, and the Sensors listen to the EventBus to consume the events. This decouples the original Gateway and Sensor services and provides better reliability for in-system event delivery. Although the current EventBus implementation is backed by NATS Streaming (a huge shout out to the contributors to this great project!), we plan to support other messaging systems in the future.
A simple EventBus spec is provided below. It will bring up a NATS Streaming StatefulSet as an EventBus.
apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
name: default
spec:
nats:
native: {}
Or you can use an existing NATS Streaming service.
apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
name: default
spec:
nats:
exotic:
url: nats://xxxxx:xxx
clusterID: cluster-id
auth: token
accessSecret:
name: my-secret-name
key: secret-key
See more details about EventBus here.
Gateway merged with EventSource
The Gateway CRD has been merged with the EventSource. There’s no longer a need to manage a separate Gateway spec. For example, a Calendar type EventSource will be simply:
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: calendar
spec:
calendar:
example:
interval: 60s
This EventSource object will bring up a POD that generates events every 60 seconds and publish the events to an EventBus named default
(the name of the default EventBus).
More EventSource examples can be found here.
Controllers and Services
Argo Events now has three CRDs: EventBus, EventSource, and Sensor. Each has an associated controller implemented using controller-runtime.
The new implementation enables us to run EventSources and Sensors deployments with Service Accounts configured with minimum RBAC privileges, making the system more secure. Yay!
Features and Enhancements
Pulsar EventSource support
Apache Pulsar is now supported in Argo Events as an EventSource, check the example here.
Kafka EventSource support for Consumer Group
Consume Group support is added in Kafka EventSource, here is an example spec.
GCP Pub/Sub EventSource support for re-using existing Subscription
Listening to an existing GCP Pub/Sub Subscription is a high demanded feature in the community, now it is supported in v1.0. Check the example for spec detail.
Simple Webhook Authentication
A simple webhook authentication option is added to all webhook
EventSources. The HTTP requests are authenticated with a token stored in a K8s secret. This is a simple authentication option for EventSources that do not have native authentication support.
Webhook Health Check
When a webhook
EventSource (for example, Github
) is exposed with a LoadBalancer or an Ingress, a health check endpoint is usually needed. For these types of EventSources, an extra health check endpoint is automatically exposed. Here is the detail.
Mixed Types of Events Configuration
Starting with v1.0, you can aggregate different types of event sources with a single EventSource object in a single deployment for convenience and reduce resource consumption. Here is the detail.
Simplified Secrets and ConfigMaps Configuration
All the K8s Secrets (e.g. TLS Config) and ConfigMaps referenced in EventSources and Sensors used to require three steps to use:
- Create a Secret or ConfigMap;
- Configure
volumes
andvolumeMounts
withspec.template.volumes
andspec.template.container.volumeMounts
; - Reference the volume mount path in EventSource or Sensor spec, for example:
tls.clientCertPath
,tls.clientKeyPath
.
Now you only need two steps:
- Create a Secret or ConfigMap;
- Reference the Secret or ConfigMap with
secretKeySelector
orconfigMapKeySelector
.
Here is a Kafka example.
Trigger Conditions
A new property spec.triggers.template[].conditions
is introduced in Sensor spec, it is a boolean expression used to replace legacy Circuit
and Switch
specs. Here is an example trigger with conditions
.
- template:
conditions: "(dep01 || dep02) && dep03"
name: trigger01
http:
url: https://medium.com
method: GET
The&&
and ||
operators are supported in conditions
. Here is the detail.
Finally….
Let’s use an example, creating workflows based on Kafka events, to bring all the concepts together to illustrate how much easier it is to use Argo Events!
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: kafka-example
spec:
kafka:
example:
url: kafka-broker:9092
topic: topic-id
partition: "1"
---
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: sensor-example
spec:
template:
serviceAccountName: create-wf-sa
dependencies:
- name: dep01
eventSourceName: kafka-example
eventName: example
triggers:
- template:
name: workflow-trigger
k8s:
group: argoproj.io
version: v1alpha1
resource: workflows
operation: create
source:
git:
url: "https://github.com/argoproj/argo"
cloneDirectory: "/tmp"
filePath: "examples/hello-world.yaml"
As you can see, Argo Events v1.0 has been re-architected to provide a more user-friendly, reliable, and secure eventing framework for Kubernetes! We hope that you like it as much as we do. A big thanks to our fabulous community of contributors and users for making v1.0 possible!