Agent skill
argo-workflows-patterns
Production Argo Workflows patterns: reusable templates, error handling, concurrency control, composition, and scheduled automation for Kubernetes operators.
Install this agent skill to your Project
npx add-skill https://github.com/adaptive-enforcement-lab/claude-skills/tree/main/plugins/patterns/skills/argo-workflows-patterns
SKILL.md
Argo Workflows Patterns
When to Use This Skill
Production patterns for Argo Workflows: reusable templates, error handling, concurrency control, workflow composition, and scheduled automation.
Implementation
- Define WorkflowTemplates - Create reusable, tested building blocks
- Add Error Handling - Configure retry strategies for transient failures
- Control Concurrency - Use mutexes or semaphores for shared resources
- Compose Workflows - Chain templates into complex pipelines
- Schedule Automation - Run workflows on cron schedules
Techniques
Why Argo Workflows?
Kubernetes provides primitives (Pods, Jobs, CronJobs), but building complex automation from primitives is painful. You end up with shell scripts that check Pod status in loops, cleanup logic scattered across multiple places, and debugging that requires correlating logs from dozens of sources.
Argo Workflows provides higher-level abstractions designed for automation. Define workflows declaratively. Let the controller handle scheduling, retries, and cleanup. Visualize execution in a purpose-built UI. Focus on what the automation does, not how to orchestrate it.
Pattern Categories
| Category | Description |
|---|---|
| WorkflowTemplate Patterns | Reusable workflow definitions with error handling, volumes, and RBAC |
| Concurrency Control | Mutex synchronization, semaphores, and TTL strategies |
| Workflow Composition | Parent/child workflows, orchestration, and cross-workflow communication |
| Scheduled Workflows | CronWorkflow patterns and GitHub integration |
Quick Start
- Define WorkflowTemplates - Create reusable, tested building blocks
- Add Error Handling - Configure retry strategies for transient failures
- Control Concurrency - Use mutexes or semaphores for shared resources
- Compose Workflows - Chain templates into complex pipelines
- Schedule Automation - Run workflows on cron schedules
Troubleshooting
Workflow Stuck in Pending
- Check service account permissions:
kubectl describe rolebinding -n argo-workflows - Verify resource quotas:
kubectl describe quota -n argo-workflows - Check node resources:
kubectl top nodes - Look for mutex waits:
kubectl get workflows -l workflows.argoproj.io/sync-id
Workflow Failed with RBAC Error
- Verify ServiceAccount exists in workflow namespace
- Check ClusterRoleBinding subjects match namespace
- Use
kubectl auth can-ito test permissions:
kubectl auth can-i patch deployments \
--as=system:serviceaccount:argo-workflows:my-sa \
-n target-namespace
Mutex Deadlock
- Find workflows waiting on mutex:
kubectl get workflows -l workflows.argoproj.io/sync-id - Identify the workflow holding the lock
- Check if the holding workflow is stuck or failed
- Terminate stuck workflows to release mutex
Prerequisites
Argo Workflows must be installed in your cluster. See the official installation guide for setup instructions.
Related
- Argo Events Setup - EventSource, EventBus, and Sensor configuration
- ConfigMap as Cache - Volume mounts for zero-API reads
- Event-Driven Deployments - The journey to zero-latency automation
Troubleshooting
See troubleshooting.md for common issues and solutions.
Related Patterns
- Argo Events Setup
- ConfigMap as Cache
- Event-Driven Deployments
References
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
github-token-permissions-overview
Understanding GITHUB_TOKEN scope, default permissions, and implementing least-privilege principle for GitHub Actions workflows.
secure
Find and fix security issues before they become incidents. Vulnerability scanning, SBOM generation, supply chain security, and secure authentication workflows.
complete-workflow-examples
Copy-paste hardened CI/CD workflows with SHA-pinned actions, minimal GITHUB_TOKEN permissions, OIDC authentication, and comprehensive security scanning for GitHub Actions.
ephemeral-runner-patterns
Disposable runner patterns for GitHub Actions. Container-based, VM-based, and ARC deployment strategies with complete state isolation between jobs.
action-pinning-overview
Why pinning GitHub Actions to SHA-256 commits matters for supply chain security. Attack vectors from unpinned actions and comparison of tag vs SHA pinning.
github-actions-security-patterns-hub
Complete security patterns for GitHub Actions covering action pinning, GITHUB_TOKEN permissions, third-party action risks, secret management, and runner security.
Didn't find tool you were looking for?