How argoproj/argo-workflows works
Main Components
• Client Interfaces: Represent the various client entry points such as the Argo CLI, REST/GRPC API endpoints, and the Web UI (located under the “ui” directory). These components allow users to submit, monitor, and manage workflows.
• Workflow Controller: The core component (in the “cmd/workflow-controller” and “server/workflow” directories) that watches Kubernetes CRDs and orchestrates workflow execution by coordinating with executors, managing retries, suspension, and termination.
• API Server and Supporting Services: Under “server/apiserver” and “server/info”, these serve user requests and provide endpoints for configuration, logging, and access control. Also include the authentication modules (in “server/auth”) that cover service account verification, SSO, webhooks, and gatekeeper integrations.
• Workflow Executors: The executors (in “cmd/argoexec” and related “server/artifacts”, “server/executor”) are pieces that launch container tasks in pods based on the workflow specification.
• Artifact Management and Persistence: Represent how workflows archive results (see the “workflowarchive” and “persist/sqldb” folders) and handle artifacts (with support for multiple backends like S3, GCS, Git, etc).
• Event Sources & Sensors: Capture the event-driven aspects (present in “server/event”, “server/eventsource” and in client libraries) that trigger workflows or integrate with external event-driven systems.
• Client Libraries: Although not explicitly services, note that the SDKs (in sdks/) for Java, Golang, and Python enable external systems to interact with Argo programmatically.
Relationships and Data Flow
• That the API Server communicates with the Kubernetes API and then the Workflow Controller picks up new/updated workflow CRDs.
• Authentication and authorization flow – for example, the API Server calls the authentication modules (SSO via webhooks or serviceaccounts) before processing requests.
• External integrations such as event triggers (e.g., webhooks, sensors) that feed events into the system and cause workflows to start.
Design Patterns and Technologies
• Use a microservices or modular architecture style. Different servers (API server, workflow controller, executor, artifact server) should be shown as distinct yet interconnected modules.
• That the system leverages Kubernetes CRDs for orchestration and uses the Kubernetes API for storing its state (backed by etcd).
• Technologies: container orchestration (Kubernetes), REST/GRPC APIs, CI/CD integration, and the various client libraries.