Actions Runner Controller and ArgoCD Integration Guide

Overview This guide addresses compatibility issues between Actions Runner Controller and ArgoCD, prepared in response to requirements from this PR: https://github.com/actions/actions-runner-controller/pull/3575#issuecomment-2594906700 1. Create a kind Cluster kind create cluster --image mirror.gcr.io/kindest/node:v1.32.0 2. Install ArgoCD kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml Note: To access the UI, use port forwarding: kubectl port-forward svc/argocd-server -n argocd 8080:443 3. Create GitHub PAT Secret Execute the following after the namespace is automatically created via ArgoCD Application syncOptions: kubectl create secret generic github-pat-secret \ -n default \ --from-literal=github_token='' Note: Replace with your actual Personal Access Token. 4. ArgoCD Application: gha-runner-scale-set-controller Save the following content as gha-runner-scale-set-controller-app.yaml. This uses Helm Chart version 0.10.1, specifies the image.repository while using the default tag, and adds excludeLabelPropagationPrefixes array settings: apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: gha-runner-scale-set-controller namespace: argocd finalizers: - resources-finalizer.argocd.argoproj.io spec: project: default source: repoURL: "ghcr.io/actions/actions-runner-controller-charts" chart: "gha-runner-scale-set-controller" targetRevision: "0.10.1" helm: parameters: - name: image.repository value: "quay.io/kahirokunn/gha-runner-scale-set" - name: githubConfigSecret value: "github-pat-secret" - name: serviceAccount.name value: "gha-runner-scale-set-controller" - name: flags.excludeLabelPropagationPrefixes[0] value: "argocd.argoproj.io/instance" - name: flags.excludeLabelPropagationPrefixes[1] value: "app.kubernetes.io/component" - name: flags.excludeLabelPropagationPrefixes[2] value: "app.kubernetes.io/instance" - name: flags.excludeLabelPropagationPrefixes[3] value: "app.kubernetes.io/managed-by" - name: flags.excludeLabelPropagationPrefixes[4] value: "app.kubernetes.io/name" - name: flags.excludeLabelPropagationPrefixes[5] value: "app.kubernetes.io/part-of" - name: flags.excludeLabelPropagationPrefixes[6] value: "app.kubernetes.io/version" destination: server: "https://kubernetes.default.svc" namespace: arc-systems syncPolicy: automated: prune: true selfHeal: true syncOptions: - CreateNamespace=true - ServerSideApply=true After applying, it will look like this: 5. ArgoCD Application: demo (Runner Scale Set) Save the following content as gha-runner-scale-set-app.yaml (filename is arbitrary): This uses Helm Chart version 0.10.1, sets minimum runners to 1, and configures the following Helm parameters: controllerServiceAccount.name: "gha-runner-scale-set-controller" controllerServiceAccount.namespace: "arc-systems" githubConfigSecret: "github-pat-secret" githubConfigUrl: "https://github.com/kahirokunn/actions-runner-controller" apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: demo namespace: argocd finalizers: - resources-finalizer.argocd.argoproj.io spec: project: default source: repoURL: "ghcr.io/actions/actions-runner-controller-charts" chart: "gha-runner-scale-set" targetRevision: "0.10.1" helm: parameters: - name: minRunners value: "1" - name: controllerServiceAccount.name value: "gha-runner-scale-set-controller" - name: controllerServiceAccount.namespace value: "arc-systems" - name: githubConfigSecret value: "github-pat-secret" - name: githubConfigUrl value: "https://github.com/kahirokunn/actions-runner-controller" destination: server: "https://kubernetes.default.svc" namespace: default syncPolicy: automated: prune: true selfHeal: true syncOptions: - CreateNamespace=true - ServerSideApply=true After applying, it will appear in ArgoCD as follows:

Mar 6, 2025 - 09:59
 0
Actions Runner Controller and ArgoCD Integration Guide

Overview

This guide addresses compatibility issues between Actions Runner Controller and ArgoCD, prepared in response to requirements from this PR:
https://github.com/actions/actions-runner-controller/pull/3575#issuecomment-2594906700

1. Create a kind Cluster

kind create cluster --image mirror.gcr.io/kindest/node:v1.32.0

2. Install ArgoCD

kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

Note: To access the UI, use port forwarding:

kubectl port-forward svc/argocd-server -n argocd 8080:443

3. Create GitHub PAT Secret

Execute the following after the namespace is automatically created via ArgoCD Application syncOptions:

kubectl create secret generic github-pat-secret \
  -n default \
  --from-literal=github_token=''

Note: Replace with your actual Personal Access Token.

4. ArgoCD Application: gha-runner-scale-set-controller

Save the following content as gha-runner-scale-set-controller-app.yaml.
This uses Helm Chart version 0.10.1, specifies the image.repository while using the default tag, and adds excludeLabelPropagationPrefixes array settings:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: gha-runner-scale-set-controller
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
    repoURL: "ghcr.io/actions/actions-runner-controller-charts"
    chart: "gha-runner-scale-set-controller"
    targetRevision: "0.10.1"
    helm:
      parameters:
        - name: image.repository
          value: "quay.io/kahirokunn/gha-runner-scale-set"
        - name: githubConfigSecret
          value: "github-pat-secret"
        - name: serviceAccount.name
          value: "gha-runner-scale-set-controller"
        - name: flags.excludeLabelPropagationPrefixes[0]
          value: "argocd.argoproj.io/instance"
        - name: flags.excludeLabelPropagationPrefixes[1]
          value: "app.kubernetes.io/component"
        - name: flags.excludeLabelPropagationPrefixes[2]
          value: "app.kubernetes.io/instance"
        - name: flags.excludeLabelPropagationPrefixes[3]
          value: "app.kubernetes.io/managed-by"
        - name: flags.excludeLabelPropagationPrefixes[4]
          value: "app.kubernetes.io/name"
        - name: flags.excludeLabelPropagationPrefixes[5]
          value: "app.kubernetes.io/part-of"
        - name: flags.excludeLabelPropagationPrefixes[6]
          value: "app.kubernetes.io/version"
  destination:
    server: "https://kubernetes.default.svc"
    namespace: arc-systems
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true

After applying, it will look like this:
image.png

5. ArgoCD Application: demo (Runner Scale Set)

Save the following content as gha-runner-scale-set-app.yaml (filename is arbitrary):
This uses Helm Chart version 0.10.1, sets minimum runners to 1, and configures the following Helm parameters:

  • controllerServiceAccount.name: "gha-runner-scale-set-controller"
  • controllerServiceAccount.namespace: "arc-systems"
  • githubConfigSecret: "github-pat-secret"
  • githubConfigUrl: "https://github.com/kahirokunn/actions-runner-controller"
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: demo
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
    repoURL: "ghcr.io/actions/actions-runner-controller-charts"
    chart: "gha-runner-scale-set"
    targetRevision: "0.10.1"
    helm:
      parameters:
        - name: minRunners
          value: "1"
        - name: controllerServiceAccount.name
          value: "gha-runner-scale-set-controller"
        - name: controllerServiceAccount.namespace
          value: "arc-systems"
        - name: githubConfigSecret
          value: "github-pat-secret"
        - name: githubConfigUrl
          value: "https://github.com/kahirokunn/actions-runner-controller"
  destination:
    server: "https://kubernetes.default.svc"
    namespace: default
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true

After applying, it will appear in ArgoCD as follows:
image.png