Example
End-to-end Worker examples for common deployment patterns.
Use this page for complete Worker manifests and related deployment examples.
Sleep Worker
This example runs a minimal Alpine container as a long-running Worker. The command prints a heartbeat every 30 seconds.
version: v2alpha
name: ${WORKER_NAME}
type: worker
tags:
- test
- worker
- container
description: "Minimal long-running worker (alpine sleep loop) for poros worker-reconciler smoke test"
spec:
compute: ${COMPUTE_NAME}
replicas: 1
executionMode: default
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 256Mi
stack: container
stackSpec:
image: docker.io/library/alpine:3.20
command:
- sh
arguments:
- -c
- "while true; do echo \"$(date -u +%FT%TZ) sleep-worker heartbeat\"; sleep 30; done"Deploy with a Bundle
For Workers that need verification or dependencies, package the resources in a Bundle so they are applied in order.
Verify with a Workflow
A verification Workflow can fetch Worker metadata and assert that the Worker is active and running.
Last updated
Was this helpful?