Actions Runner Controller
Kubernetes operator that orchestrates and scales self-hosted runners for GitHub Actions.
Kubernetes
Scalable
Open Source
Pricing:Free
Self-hosted
Easy Setup
Auto-scaling
Cloud:ANY
Architecture Overview
Actions Runner Controller (ARC) operates as a Kubernetes operator, managing the lifecycle of GitHub Actions runners within a cluster. It consists of several key components:
- Controller Manager: Orchestrates runner deployments and scaling
- Runner Pods: Ephemeral pods that execute GitHub Actions jobs
- Webhook Server: Handles GitHub webhook events for autoscaling (Summerwind variant, legacy)
- Runner Scale Set Controller: Manages runner scale sets (Runner Scale Set variant, since ~2022)
Summerwind vs Runner Scale Set Variants
Summerwind Variant
- Uses webhook-based autoscaling
- Simpler setup, suitable for smaller deployments
- Requires exposing webhook endpoint to GitHub
- Can be more responsive to sudden job spikes
Runner Scale Set Variant
- Uses polling-based autoscaling
- More scalable, suitable for large enterprise deployments
- No need to expose webhook endpoint
- Potentially higher latency for scaling events
- Supports advanced features like job assignment and runner groups
Requirements
-
Kubernetes Cluster:
- Must support CustomResourceDefinitions (CRDs)
-
Custom Runner Images:
- Default images are minimal; you’ll need to build custom images for most workflows
- Consider using tools like Packer or Docker to create images with pre-installed dependencies
-
Docker-in-Docker Limitations:
- Running Docker inside runner pods can be challenging
- Options: a. Use privileged containers (security implications) b. Implement alternative container runtimes (e.g., Kaniko) c. Use host Docker socket (potential resource conflicts)
-
Networking:
- Outbound internet access for runners to communicate with GitHub
- Inbound access to webhook server (Summerwind variant only)
-
RBAC:
- Proper permissions for the controller to manage runner pods and related resources
-
Storage:
- Persistent volume claims for caching and workspace storage (optional but recommended)
-
Scaling Considerations:
- Set appropriate resource requests and limits
- Configure horizontal pod autoscaling for the controller itself
-
Monitoring and Logging:
- Implement Prometheus metrics collection
- Set up centralized logging for troubleshooting
When choosing between Summerwind and Runner Scale Set variants, consider your scale, security requirements, and desired level of control over runner management. The Runner Scale Set variant is generally recommended for newer deployments due to its enhanced scalability and feature set.