0

I have been struggling with all the documentation on Github and broader, on how to deploy ARC runners to our Github organisation

I have followed these guides: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api

https://pkg.go.dev/github.com/summerwind/actions-runner-controller#section-readme

https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/deploying-runner-scale-sets-with-actions-runner-controller

I have managed so far to create these "runners" in our namespace, with all that is required

But these are not linked to our Github. I have added the app to Github for ARC runners, and have included the appID, installationID and key as a secret

kubectl create secret generic controller-manager \
    -n actions-runner-system \
    --from-literal=github_app_id={appID} \
    --from-literal=github_app_installation_id={installID} \
    --from-file=github_app_private_key=/Users/keys/privatekeys/{key.pem}

It seems to me that the tags or references in the kubectl/helm commands are more linking the resources created to our organisation, rather than to Github. Is there any clear guides on how to deploy the runners to be used by a Github org? We have Github Enterprise Cloud

Essentially, I have deployed runners as documented. Docs claim that runners will be listed under Github org's runners, but are not

I have tried the create commands with the following files:

kubectl create -f /Users/git/arc-runners/runner.yaml

# runner.yaml
apiVersion: actions.summerwind.dev/v1alpha1
kind: Runner
metadata:
  name: example-org-runner
spec:
  organization: {our-org}

kubectl create -f /Users/git/arc-runners/runnerdeployment.yaml

# runnerdeployment.yaml
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  name: arc-runners
  namespace: arc-runner-system
spec:
  # This will deploy 1 runners now
  replicas: 1
  template:
    spec:
      repository: mumoshu/actions-runner-controller-ci
      organization: {our-org}
      nodeSelector:
        kubernetes.io/os: linux
        kubernetes.io/arch: amd64
      labels:
        - linux
        - X64

kubectl create -f /Users/git/arc-runners/runnerorg.yaml

apiVersion: v1
kind: Secret
metadata:
   name: org1-github-app
   namespace: actions-runner-system
type: opaque
stringData:
    github_app_id: {id}
    github_app_installation_id: {id2}
    github_app_private_key: {pem file contents}
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  namespace: actions-runner-system
  name: org1-runner
spec:
  template:
    spec:
      organization: {our-org}
      githubAPICredentialsFrom:
        secretRef:
          name: org1-github-app
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
  namespace: actions-runner-system
  name: org1-autoscaler
spec:
  githubAPICredentialsFrom:
    secretRef:
      name: org1-github-app

And have tried various helm commands with a values file:

helm install arc-set \
    --namespace arc-runner-system \
    --create-namespace \
    --set githubConfigUrl="https://github.com/{org}" \
    -f /Users/git/arc-runners/values.yaml\
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set

Secret made last time was controller-manager Values.yaml

labels: [arc,arc-test]
githubConfigURL: https://github.com/{org}
githubConfigSecret: controller-manager
#runs-on: [self-hosted, linux]
Nicholas Aysen
  • 568
  • 3
  • 18
  • 40

0 Answers0