Skip to main content
In this lesson you’ll create an Argo Events Sensor that invokes an HTTP endpoint whenever MinIO bucket events occur. We use an HTTP trigger to POST to a test endpoint (httpdump.app) so you can inspect the received request and payload. For background, Sensors support HTTP triggers among many other trigger types. See the official Argo Events sensors documentation: https://argoproj.github.io/argo-events/sensors/
A screenshot of the Argo Events documentation page for "HTTP Trigger" with a left-side user guide menu and top navigation bar. The central diagram shows various event sources feeding into Argo Events, which then trigger serverless targets like OpenFaaS, Kubeless, Knative and Nuclio.
Overview
  • Goal: When an object is created or removed in a specified MinIO bucket, the EventSource publishes an event to the event bus. The Sensor listens for that event and performs an HTTP POST to a configured endpoint.
  • Test target: use an HTTP dump service (httpdump.app) to inspect requests made by the Sensor.
Sensor manifest example
  • This Sensor listens for an event published by an EventSource named minio (event name example) and posts to an HTTP dump URL. The trigger uses POST and a simple retry strategy (3 attempts, 3s between retries).
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: minio
spec:
  dependencies:
    - name: test-dep
      eventSourceName: minio
      eventName: example
  triggers:
    - template:
        name: http-trigger
        http:
          url: https://httpdump.app/inspect/ee487aa0-994f-4b9f-83dd-a65e668ccfc8
          payload: null
          method: POST
      retryStrategy:
        steps: 3
        duration: "3s"
Notes on the manifest
  • dependencies: describes which EventSource and event name satisfy the Sensor.
  • http.url: replace the example URL with the dump URL you create at httpdump.app.
  • payload: when set to null, the Sensor sends an empty request body. You can instead provide a JSON payload or use payload parameters to inject event data.
  • retryStrategy: controls retries for transient failures.
Create a test endpoint on httpdump.app
  • Use httpdump.app (or similar services) to create a unique dump URL. The page shows a curl example and the generated dump endpoint you should paste into the Sensor spec.
A browser screenshot of the httpdump.app webpage showing a "Waiting for incoming requests..." message and a highlighted example curl command. The page displays a generated dump URL and instructions for POSTing JSON to that endpoint.
EventSource manifest (MinIO)
  • The EventSource listens to bucket notifications from MinIO and forwards events to the Argo Events bus. Example:
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
  name: minio
spec:
  minio:
    example:
      endpoint: minio.argo.svc.cluster.local:9000
      bucket:
        name: argo-events-bucket
      insecure: true
      accessKey:
        name: minio-creds
        key: accesskey
      secretKey:
        name: minio-creds
        key: secretkey
      events:
        - s3:ObjectCreated:Put
        - s3:ObjectRemoved:Delete
status:
  conditions:
    - type: Deployed
      status: "True"
      lastTransitionTime: "2025-10-25T11:27:04Z"
    - type: SourcesProvided
      status: "True"
      lastTransitionTime: "2025-10-25T11:27:04Z"
Quick field guide
ResourcePurposeExample field
EventSource (minio)Listens for MinIO bucket notificationsevents: [s3:ObjectCreated:Put]
SensorEvaluates dependencies and executes triggerstriggers[].http.url
HTTP dump endpointDestination to inspect POST requestshttps://httpdump.app/dumps/<id>
How the flow works
  1. Upload or delete a file in the configured MinIO bucket (argo-events-bucket).
  2. MinIO emits a bucket notification; the EventSource receives it and publishes the event to the event bus.
  3. The Sensor evaluates its dependency (test-dep) and, once satisfied, executes the HTTP trigger.
  4. The Sensor performs an HTTP POST to the configured httpdump URL (with the configured payload or empty body if payload: null).
Test with curl
  • You can directly POST test JSON to your dump URL to see how the endpoint receives requests:
curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"username":"Marcel","password":"supersecret","this is a":"test"}' \
  https://httpdump.app/dumps/6758c612-9d34-486f-b82a-63c0a7dc4054
Example logs
  • EventSource logs (show initialization, credential retrieval, client setup, and event publication):
namespace=argo-events, eventSourceName=minio, eventName=example, level=info, time=2025-10-25T11:32:53Z, msg=starting minio event source...
namespace=argo-events, eventSourceName=minio, eventName=example, level=info, time=2025-10-25T11:32:53Z, msg=retrieving access and secret key...
namespace=argo-events, eventSourceName=minio, eventName=example, level=info, time=2025-10-25T11:32:53Z, msg=setting up a minio client...
namespace=argo-events, eventSourceName=minio, eventName=example, level=info, time=2025-10-25T11:32:53Z, msg=started listening to bucket notifications...
namespace=argo-events, eventSourceName=minio, eventName=example, level=info, time=2025-10-25T11:32:53Z, msg=Succeeded to publish an event
  • Sensor logs (show dependency evaluation and trigger execution):
namespace=argo-events, sensorName=minio, level=info, time=2025-10-25T11:33:02Z, msg=starting sensor server
namespace=argo-events, sensorName=minio, level=info, time=2025-10-25T11:33:02Z, msg=Sensor started.
namespace=argo-events, sensorName=minio, triggerName=http-trigger, level=info, time=2025-10-25T11:33:02Z, msg=Dependency expression for trigger http-trigger: test-dep
namespace=argo-events, sensorName=minio, triggerName=http-trigger, level=warn, time=2025-10-25T11:33:02Z, msg=payload parameters are not specified. request payload will be an empty string
namespace=argo-events, sensorName=minio, triggerName=http-trigger, level=info, time=2025-10-25T11:33:02Z, msg=Making a http request...
namespace=argo-events, sensorName=minio, triggerName=http-trigger, level=info, time=2025-10-25T11:33:02Z, msg=Successfully processed trigger 'http-trigger'
Example dump output
  • If payload: null the request body will be empty but headers and timing information are recorded by the dump service:
POST /dumps/6758c612-9d34-486f-b82a-63c0a7dc4054
Received at: 2025-10-25 11:32:48

Headers
Accept-Encoding: gzip
Content-Length: 0
Content-Type:
Host: httpdump.app
User-Agent: Go-http-client/2.0

Request Body
Best practices and security
When testing, use ephemeral credentials and a disposable dump URL. For production, secure your triggers with authentication, TLS, and least-privilege credentials for MinIO.
Do not expose sensitive access keys or secret keys in public manifests. Use Kubernetes secrets and RBAC to restrict access to Argo Events resources.
Adaptations and next steps
  • Replace the HTTP trigger with other Argo Events targets if you want to invoke serverless functions, message queues, or custom webhooks.
  • Add payload parameters or a payload template to include event metadata (object key, bucket name, event type) in the POST request body.
  • Expand retry configuration and add backoff strategies for more resilient integrations.
Links and references This demonstrates how to detect MinIO bucket events with Argo Events and invoke HTTP APIs via Sensors. You can extend the Sensor to send structured JSON payloads, headers, or authentication to fit your integration needs.

Watch Video