ArkEvent

ArkEvent defines an event source that triggers one or more ArkTeam runs. Three source types are supported: HTTP webhook, cron schedule, and the output of another team. A single event can fan out to multiple teams in parallel.


Webhook trigger

Listens for inbound HTTP POST requests. The operator creates a unique bearer-token secret per event and writes the full URL to .status.webhookURL.

apiVersion: arkonis.dev/v1alpha1
kind: ArkEvent
metadata:
  name: pipeline-trigger
  namespace: ai-team
spec:
  source:
    type: webhook
  targets:
    - team: my-team

Retrieve the webhook token and fire synchronously:

TOKEN=$(kubectl get secret pipeline-trigger-webhook-token -n ai-team \
  -o jsonpath='{.data.token}' | base64 -d)

curl -X POST \
  "http://ark-operator.ai-team.svc.cluster.local:8092/triggers/ai-team/pipeline-trigger/fire?mode=sync&timeout=120s" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"topic": "quantum computing"}'

Sync mode keeps the HTTP connection open until the team run completes and returns the result directly in the response body.


Cron trigger

Fires on a standard 5-field cron schedule (UTC).

apiVersion: arkonis.dev/v1alpha1
kind: ArkEvent
metadata:
  name: daily-report
  namespace: ai-team
spec:
  source:
    type: cron
    cron: "0 8 * * *"   # every day at 08:00 UTC
  targets:
    - team: report-team

Team-output trigger

Fires when another team completes. Useful for chaining independent teams without embedding them as pipeline steps in a single ArkTeam.

apiVersion: arkonis.dev/v1alpha1
kind: ArkEvent
metadata:
  name: post-research-trigger
  namespace: ai-team
spec:
  source:
    type: team-output
    teamOutput:
      name: research-team
      onPhase: Succeeded
  targets:
    - team: summarize-team
    - team: publish-team   # fan-out: both fire in parallel

Spec reference

Field Type Required Description
spec.source.type string yes webhook, cron, or team-output
spec.source.cron string cron only Standard 5-field cron expression (UTC)
spec.source.teamOutput.name string team-output only Name of the upstream ArkTeam in the same namespace
spec.source.teamOutput.onPhase string team-output only Succeeded, Failed, or * (any terminal phase)
spec.targets[].team string yes Name of the ArkTeam to trigger

Status

status:
  webhookURL: "http://ark-operator.ai-team.svc.cluster.local:8092/triggers/ai-team/pipeline-trigger/fire"
  conditions:
    - type: Ready
      status: "True"
      reason: WebhookReady
      message: waiting for webhook POST

See also


Apache 2.0 · ARKONIS