#!/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" kubectl get secret aws-secrets -n default -o yaml \ | sed 's/namespace: default/namespace: arc-systems/' \ | kubectl apply -f -