Argo runner is a runner, which executes Argo workflows. It is used as a built-in runner for Capact Kubernetes implementation.
Before starting the runner you need to:
- Ensure the Service Account used by the Argo workflow has proper RBAC permissions. Here is an example command to add permissions for using default service account in default namespace:
kubectl create clusterrolebinding default-default-admin --clusterrole admin --serviceaccount default:default
- Create a job to use for ownerReference for the workflow and a secret for status reporting:
kubectl apply -f cmd/argo-runner/setup.yml
- Create the runner input YAML file:
cat <<EOF > /tmp/argo-runner-context.yaml
name: argo-runner-job
dryRun: false
platform:
namespace: default
ownerRef:
apiVersion: batch/v1
kind: Job
name: argo-runner-owner
uid: $(kubectl get jobs argo-runner-owner -ojsonpath='{.metadata.uid}')
EOF
- Start the runner type:
RUNNER_CONTEXT_PATH=/tmp/argo-runner-context.yaml RUNNER_ARGS_PATH=cmd/argo-runner/example-args.yaml RUNNER_LOGGER_DEV_MODE=true go run cmd/argo-runner/main.go
You can check the workflow status in Argo UI on http://localhost:2746 after setting port-forwarding:
kubectl port-forward -n capact-system svc/argo-server 2746
The following environment variables can be set:
Name | Required | Default | Description |
---|---|---|---|
RUNNER_CONTEXT_PATH | yes | Path to the YAML file with runner context | |
RUNNER_ARGS_PATH | yes | Path to the YAML file with input arguments | |
RUNNER_LOGGER_DEV_MODE | no | false |
Enable additional log messages |
KUBECONFIG | no | ~/.kube/config |
Path to kubeconfig file |
To read more about development, see the Development guide.