mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 19:50:30 +00:00
One of the pod recreation conditions has been modified to use hash of runner spec, so that the controller does not keep restarting pods mutated by admission webhooks. This naturally allows us, for example, to use IRSA for EKS that requires its admission webhook to mutate the runner pod to have additional, IRSA-related volumes, volume mounts and env. Resolves #200
30 lines
626 B
Bash
Executable File
30 lines
626 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
runner_name=
|
|
|
|
while [ -z "${runner_name}" ]; do
|
|
echo Finding the runner... 1>&2
|
|
sleep 1
|
|
runner_name=$(kubectl get runner --output=jsonpath="{.items[*].metadata.name}")
|
|
done
|
|
|
|
echo Found runner ${runner_name}.
|
|
|
|
pod_name=
|
|
|
|
while [ -z "${pod_name}" ]; do
|
|
echo Finding the runner pod... 1>&2
|
|
sleep 1
|
|
pod_name=$(kubectl get pod --output=jsonpath="{.items[*].metadata.name}" | grep ${runner_name})
|
|
done
|
|
|
|
echo Found pod ${pod_name}.
|
|
|
|
echo Waiting for pod ${runner_name} to become ready... 1>&2
|
|
|
|
kubectl wait pod/${runner_name} --for condition=ready --timeout 180s
|
|
|
|
echo All tests passed. 1>&2
|