Argo Workflows Module
What is This?
This module provides the Helm values configuration for deploying Argo Workflows to a Kubernetes cluster. Argo Workflows is a container-native workflow engine for orchestrating parallel jobs on Kubernetes.
When to Use This Module
- Need to run multi-step workflows (data pipelines, ML training, batch jobs)
- Want to orchestrate parallel container tasks
- Building CI/CD pipelines
- Running scheduled or event-driven jobs
What is Argo Workflows?
Argo Workflows lets you:
- Define workflows as Kubernetes YAML
- Run tasks in parallel or sequence
- Handle retries and error handling
- Pass data between workflow steps
- Integrate with Kubernetes resources
Example Use Cases:
- Data processing pipelines
- Machine learning model training
- Batch job processing
- Multi-step deployments
- Simulation workloads
What This Module Provides
- Helm Values File: Pre-configured values for Argo Workflows
- Production Settings: Resource limits, persistence, TTL
- Security: Non-root user, proper security contexts
- Monitoring: Metrics enabled
How It Works
Workflow YAML
│
▼
┌─────────────────────────────┐
│ kubectl apply │
└─────────────────────────────┘
│
▼
┌─────────────────────────────┐
│ Argo Workflow Controller │
│ - Validates workflow │
│ - Creates pods for steps │
│ - Manages state │
└─────────────────────────────┘
│
▼
┌─────────────────────────────┐
│ Kubernetes Pods │
│ - Execute workflow steps │
│ - Pass artifacts │
└─────────────────────────────┘Usage
Using Helm Directly
bash
# Add Helm repository
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
# Install Argo Workflows
helm install argo-workflows argo/argo-workflows \
-f modules/kubernetes/argo-workflows/helm-values.yaml \
-n argo --create-namespaceVerify Installation
bash
kubectl get pods -n argo
kubectl get svc -n argoAccess the UI
bash
# Port forward to access UI
kubectl port-forward svc/argo-workflows-server 2746:2746 -n argo
# Open http://localhost:2746Configuration Explained
Resource Limits
yaml
resources:
limits:
cpu: 500m # Maximum CPU
memory: 512Mi # Maximum memory
requests:
cpu: 100m # Guaranteed CPU
memory: 128Mi # Guaranteed memoryWorkflow TTL
yaml
ttlStrategy:
secondsAfterCompletion: 86400 # Delete after 24 hours
secondsAfterSuccess: 86400
secondsAfterFailure: 604800 # Keep failures for 7 daysThis automatically cleans up completed workflows.
Persistence
yaml
persistence:
archive: true # Store workflow history
accessMode: ReadWriteOnce
size: 10Gi # Storage sizeSubmitting Workflows
Simple Workflow
yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-
namespace: argo
spec:
entrypoint: whalesay
templates:
- name: whalesay
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["Hello from Argo!"]Apply it:
bash
kubectl apply -f workflow.yaml
kubectl get workflows -n argoFiles
helm-values.yaml- Helm chart configuration valuesREADME.md- This documentation
Requirements
- Kubernetes Cluster: Version 1.20 or higher
- Helm: Version 3.x
- kubectl: Configured to access your cluster
- Storage: Persistent volume for workflow history (optional)
Components Deployed
- Workflow Controller: Manages workflow execution
- Workflow Server: Provides API and UI
- Service Account: For workflow execution
- ConfigMaps: Configuration
- Services: For UI and API access
Security Features
- Non-root User: Workflows run as non-root (UID 8737)
- RBAC: Proper role-based access control
- Service Accounts: Isolated service accounts per namespace
- Network Policies: Compatible with network policies
Monitoring
Metrics are enabled by default. Access them:
bash
kubectl port-forward svc/argo-workflows-server-metrics 9090:9090 -n argoTroubleshooting
Workflows Stuck in Pending
bash
# Check controller logs
kubectl logs -n argo -l app=workflow-controller
# Check workflow events
kubectl describe workflow <workflow-name> -n argoCannot Access UI
bash
# Check service
kubectl get svc argo-workflows-server -n argo
# Port forward as workaround
kubectl port-forward svc/argo-workflows-server 2746:2746 -n argoWorkflow Fails
bash
# View workflow details
kubectl describe workflow <workflow-name> -n argo
# Check pod logs
kubectl logs <pod-name> -n argoLearn More
Related Modules
argo-workflows-airgap- Offline deployment versioningress-nginx- Expose UI via ingress