Argo Workflows est un moteur d'orchestration de workflows natif Kubernetes, CNCF Graduated, développé par argoproj. Chaque step d'un workflow s'exécute dans un pod Kubernetes dédié. Il supporte deux modèles d'orchestration : steps (séquentiel ou parallèle) et dag (graphe acyclique dirigé). Conçu pour les pipelines CI/CD, le batch processing, les data pipelines et les workloads ML/AI. S'intègre naturellement avec les autres outils Argo (Events, Rollouts, CD).
Informations essentielles
Origine : Applatix → Intuit → CNCF Graduated · Licence : Apache 2.0 · Architectures : x86_64, ARM64
Liens : Site officiel · Documentation · GitHub · Releases
Support : CNCF Graduated. Communauté active, utilisé par Intuit, Alibaba, BlackRock en production.
Stack par défaut
| Composant | Valeur |
|---|---|
| Backend | Go (contrôleur + serveur) |
| Frontend | UI web React |
| Port | 2746 (HTTP/HTTPS) |
| Exécution | Un pod par step de workflow |
| Stockage artifacts | S3, GCS, MinIO (optionnel) |
| Auth | SSO (OIDC), tokens ServiceAccount |
Prérequis
| Ressource | Valeur |
|---|---|
| Kubernetes | 1.25+ |
| Storage (optionnel) | S3/MinIO pour les artifacts |
Installation
kubectl create namespace argo
kubectl apply -n argo -f \
https://github.com/argoproj/argo-workflows/releases/latest/download/install.yaml
# Vérifier l'installation
kubectl get pods -n argo
# workflow-controller et argo-server Running
Accéder à l'UI
kubectl port-forward svc/argo-server -n argo 2746:2746
# Ouvrir https://localhost:2746 (certificat auto-signé, accepter l'exception)
# Token de connexion
kubectl -n argo create token argo-server
CLI argo
curl -sLO \
https://github.com/argoproj/argo-workflows/releases/latest/download/argo-linux-amd64.gz
gunzip argo-linux-amd64.gz
chmod +x argo-linux-amd64
sudo mv argo-linux-amd64 /usr/local/bin/argo
argo version
Workflows Steps (séquentiel / parallèle)
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: ci-pipeline-
namespace: argo
spec:
entrypoint: pipeline
templates:
- name: pipeline
steps:
- - name: test # step 1 - séquentiel
template: run-tests
- - name: build # step 2 - après test
template: build-image
- name: lint # step 2bis - en parallèle avec build
template: lint-code
- - name: deploy # step 3 - après build ET lint
template: deploy-app
- name: run-tests
container:
image: golang:1.22
command: [go, test, ./...]
- name: build-image
container:
image: gcr.io/kaniko-project/executor:latest
args: [--context=., --destination=ghcr.io/org/app:latest]
- name: lint-code
container:
image: golangci/golangci-lint:latest
command: [golangci-lint, run]
- name: deploy-app
container:
image: bitnami/kubectl:latest
command: [kubectl, apply, -f, manifests/]
Workflows DAG (graphe de dépendances)
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: dag-pipeline-
namespace: argo
spec:
entrypoint: dag-tasks
templates:
- name: dag-tasks
dag:
tasks:
- name: A
template: run-task
arguments:
parameters: [{name: message, value: "A"}]
- name: B
dependencies: [A]
template: run-task
arguments:
parameters: [{name: message, value: "B"}]
- name: C
dependencies: [A]
template: run-task
arguments:
parameters: [{name: message, value: "C"}]
- name: D
dependencies: [B, C]
template: run-task
arguments:
parameters: [{name: message, value: "D"}]
- name: run-task
inputs:
parameters:
- name: message
container:
image: alpine
command: [echo, "{{inputs.parameters.message}}"]
WorkflowTemplate - templates réutilisables
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: build-template
namespace: argo
spec:
templates:
- name: build
inputs:
parameters:
- name: image
container:
image: gcr.io/kaniko-project/executor:latest
args: [--context=., --destination={{inputs.parameters.image}}]
# Soumettre un workflow depuis un template
argo submit --from workflowtemplate/build-template \
-p image=ghcr.io/org/app:latest -n argo
CronWorkflow - planification
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: nightly-backup
namespace: argo
spec:
schedule: "0 2 * * *"
timezone: "Europe/Paris"
workflowSpec:
entrypoint: backup
templates:
- name: backup
container:
image: alpine
command: [sh, -c, "echo 'backup started'"]
Mise à jour
kubectl apply -n argo -f \
https://github.com/argoproj/argo-workflows/releases/latest/download/install.yaml
Troubleshooting
# État des pods
kubectl get pods -n argo
# Lister les workflows
argo list -n argo
# Logs d'un workflow
argo logs <workflow-name> -n argo --follow
# Workflow bloqué en Pending
argo get <workflow-name> -n argo
kubectl describe pod <pod-name> -n argo
# Logs du contrôleur
kubectl logs -n argo -l app=workflow-controller --tail=100
Commandes utiles
argo submit workflow.yaml -n argo # Soumettre un workflow
argo list -n argo # Lister les workflows
argo get <nom> -n argo # Détails d'un workflow
argo logs <nom> -n argo -f # Logs en temps réel
argo delete <nom> -n argo # Supprimer un workflow
argo retry <nom> -n argo # Rejouer un workflow échoué
argo stop <nom> -n argo # Arrêter un workflow en cours
Ressources
- Documentation : https://argo-workflows.readthedocs.io/
- GitHub : https://github.com/argoproj/argo-workflows
- Exemples : https://github.com/argoproj/argo-workflows/tree/master/examples
- Releases : https://github.com/argoproj/argo-workflows/releases