juntekim.com/mist_infra/arc/update_arc.sh
Jun-te Kim 5453f92c69 push
2025-12-13 23:22:24 +00:00

43 lines
1.1 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# ==========================================================
# Update / Install GitHub Actions Runner Controller (ARC)
#
# - Safe to run multiple times
# - Applies changes from arc/values.yaml
# - Does NOT assume fresh cluster
#
# ==========================================================
NAMESPACE="actions-runner-system"
RELEASE_NAME="actions-runner-controller"
CHART="actions-runner-controller/actions-runner-controller"
VALUES_FILE="$(dirname "$0")/values.yaml"
echo "=== Updating ARC (GitHub Actions Runner Controller) ==="
echo "→ Ensuring namespace exists: $NAMESPACE"
kubectl create namespace "$NAMESPACE" \
--dry-run=client -o yaml | kubectl apply -f -
echo "→ Adding Helm repo (if missing)"
helm repo add actions-runner-controller \
https://actions-runner-controller.github.io/actions-runner-controller \
>/dev/null 2>&1 || true
helm repo update
echo "→ Applying Helm upgrade"
helm upgrade --install \
"$RELEASE_NAME" \
"$CHART" \
-n "$NAMESPACE" \
-f "$VALUES_FILE"
echo
echo "✅ ARC update complete"
echo
echo "Next steps:"
echo "- kubectl get pods -n $NAMESPACE"
echo "- kubectl get runners"