A custom Argo Rollouts Step Plugin that enforces mandatory pauses during rollouts to prevent users from promoting changes too quickly.
This plugin addresses the common issue where teams rush through rollout promotions despite having pause steps configured. The mandatory pause plugin:
- ✅ Enforces minimum wait times that cannot be bypassed
- ✅ Configurable pause durations per step
- ✅ Persistent state tracking across rollout controller restarts
- ✅ Proper cleanup when rollouts are terminated or aborted
- ✅ Real-time progress updates showing remaining pause time
- Mandatory Enforcement: Unlike regular pauses, these cannot be manually promoted early
- Flexible Duration: Configure different pause durations for each step
- State Persistence: Maintains pause state even if the controller restarts
- Progress Feedback: Shows remaining time in rollout status
- Proper Cleanup: Handles rollout termination and abortion gracefully
- Go 1.21 or later
- Docker (for containerization)
- Kubernetes cluster with Argo Rollouts installed
# Build for local testing
make build-local
# Build for Linux (container deployment)
make build
# Build Docker image
make docker-build
# Build everything (clean, deps, build, test)
make all# Build the Docker image
make docker-build
# Tag for your registry
docker tag argo-rollouts-mandatory-pause-plugin:latest your-registry.com/mandatory-pause-plugin:v1.0.0
# Push to registry
docker push your-registry.com/mandatory-pause-plugin:v1.0.0Update the rollout-cm.yaml with your image:
apiVersion: v1
kind: ConfigMap
metadata:
name: argo-rollouts-mandatory-pause-plugin
namespace: argo-rollouts
data:
plugin: |
apiVersion: argoproj.io/v1alpha1
kind: PluginConfig
metadata:
name: mandatory-pause
spec:
type: Step
image: your-registry.com/mandatory-pause-plugin:v1.0.0kubectl apply -f rollout-cm.yamlkubectl rollout restart deployment argo-rollouts-controller -n argo-rolloutsAdd the plugin step to your rollout specification:
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: my-app
spec:
strategy:
canary:
steps:
- setWeight: 25
- plugin:
name: mandatory-pause
config:
duration: "5m" # Mandatory 5-minute pause
- setWeight: 50
- plugin:
name: mandatory-pause
config:
duration: "3m" # Mandatory 3-minute pause
- setWeight: 100| Parameter | Description | Default | Example |
|---|---|---|---|
duration |
Pause duration (Go duration format) | 2m |
30s, 5m, 1h |
30s- 30 seconds2m- 2 minutes5m30s- 5 minutes and 30 seconds1h- 1 hour1h30m- 1 hour and 30 minutes
# View rollout status
kubectl describe rollout my-app
# Check rollout events
kubectl get events --field-selector involvedObject.name=my-app
# Watch rollout progress
kubectl argo rollouts get rollout my-app --watch# Check plugin logs (if running as separate pod)
kubectl logs -l app=mandatory-pause-plugin -n argo-rollouts
# Check rollouts controller logs
kubectl logs -l app.kubernetes.io/name=argo-rollouts -n argo-rollouts- Plugin not found: Ensure the ConfigMap is applied and controller is restarted
- Invalid duration: Check duration format (e.g.,
5m,30s) - Permission issues: Ensure proper RBAC permissions for the plugin
-
Verify plugin registration:
kubectl get configmap argo-rollouts-mandatory-pause-plugin -n argo-rollouts -o yaml
-
Check controller logs:
kubectl logs -l app.kubernetes.io/name=argo-rollouts -n argo-rollouts --tail=100
-
Validate rollout configuration:
kubectl describe rollout your-rollout-name
# Run the plugin locally
make run-local
# Run tests
make test
# Format code
make fmtThe plugin implements the Argo Rollouts Step Plugin interface:
Init()- Initialize plugin with rollout configurationRun()- Execute the mandatory pause logicTerminate()- Handle rollout terminationAbort()- Handle rollout abortion
This project is licensed under the MIT License.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request