selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
github-actions-runner-operator logo

Self-host github-actions-runner-operator

v0.11.1

K8s operator scheduling GitHub Actions runners on demand

BetaOpen SourceApache-2.0
Updated11 months ago
LanguageGo
Setup difficultyModerate
Stars
448
Ports
8080 (metrics endpoint of the operator container (Prometheus-scrapable)), 8081 (health-probe port serving the liveness and readiness endpoints)
Requires
Kubernetes
Docker
quay.io/evryfs/github-actions-runner-operator
Install with Kubernetes

What is github-actions-runner-operator?

github-actions-runner-operator (GARO) is a Kubernetes operator, written in Go with Operator SDK/Kube builder, that schedules and scales GitHub Actions self-hosted runner pods on demand in a declarative way. You define a GithubActionRunner custom resource naming the GitHub organization (optionally a repository), a minimum and maximum number of runners, and a podTemplateSpec describing the runner image, resources and environment; the operator creates runner pods and injects a registration token secret. Authentication works either as a GitHub App, whose credentials are injected into the operator deployment from a Kubernetes secret, or with personal access tokens set at the operator or custom-resource level. The deployment exposes Prometheus-scrapable metrics, and runners can be paired with a Docker-in-Docker sidecar for containerized jobs. Install it with the project's Helm chart from the evryfs Helm repository, or manually with make install (CRDs) and make deploy using Kustomize; an OperatorHub listing is announced as coming soon. The latest published release is v0.11.1 and the image lives on quay.io.

Should you self-host github-actions-runner-operator?

github-actions-runner-operator scores 50/100 on selfhost.directory (how scoring works) and ranks #76 of 166 in Developer Tools. It has 448 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is openhands (87/100, 92 079 stars). It scores higher overall, so compare the two before you pick. See github-actions-runner-operator vs openhands side by side.

Features

  • Automatic registration-token injection
  • Configurable reconciliation period
  • Customizable runner pod template
  • Declarative runner pools (CRD)
  • GitHub App and PAT authentication modes
  • Horizontal autoscaling of CI runners
  • Leader Election
  • Namespace-scoped or cluster-wide operation
  • Prometheus Metrics
  • Repository and organization runner scope

github-actions-runner-operator README

How to install github-actions-runner-operator

Install github-actions-runner-operator with Kubernetes

Kustomize
  1. Install the CRD's
make install
  1. Deploy the Operator
make deploy

Manual deploy using the manifests available within the repository.

How to configure github-actions-runner-operator

  • apiEndpointhttps://api.github.comHelm chart value (under github) for the GitHub API endpoint; change it when running GitHub Enterprise.

    Helm chart value (under github) for the GitHub API endpoint; change it when running GitHub Enterprise.

  • clusterScopedtrueWatch the whole cluster or only the target namespace.

    Watch the whole cluster or only the target namespace.

    values: true | false

  • enabledfalseHelm chart value (under githubapp) enabling GitHub App authentication.

    Helm chart value (under githubapp) enabling GitHub App authentication.

    values: true | false

  • --enable-leader-electionCommand-line argument the operator container is started with.

    Command-line argument the operator container is started with.

  • GH_TOKENPersonal access token secret key, referenced by the tokenRef field of the GithubActionRunner resource.

    Personal access token secret key, referenced by the tokenRef field of the GithubActionRunner resource.

  • GITHUB_APP_INTEGRATION_IDGitHub App integration ID, injected into the operator deployment from the github-runner-app secret.

    GitHub App integration ID, injected into the operator deployment from the github-runner-app secret.

  • GITHUB_APP_PRIVATE_KEYGitHub App private key, added from a file when creating the github-runner-app secret.

    GitHub App private key, added from a file when creating the github-runner-app secret.

  • GITHUB_V3_API_URLOperator env var set from the GitHub API endpoint value (REST v3).

    Operator env var set from the GitHub API endpoint value (REST v3).

  • GITHUB_V4_API_URLOperator env var set from the GitHub API endpoint value (GraphQL v4).

    Operator env var set from the GitHub API endpoint value (GraphQL v4).

  • imagequay.io/evryfs/github-actions-runner-operatorHelm chart block holding the operator container image repository, pull policy and tag.

    Helm chart block holding the operator container image repository, pull policy and tag.

  • integrationIdHelm chart value (under githubapp) for the GitHub App integration ID.

    Helm chart value (under githubapp) for the GitHub App integration ID.

  • maxRunnersMaximum number of runner pods (required).

    Maximum number of runner pods (required).

  • minRunnersMinimum number of running runner pods (required).

    Minimum number of running runner pods (required).

  • organizationRequired GithubActionRunner field: the GitHub user or organization to monitor.

    Required GithubActionRunner field: the GitHub user or organization to monitor.

  • podTemplateSpecDefines the runner pods the operator manages: image, resources and environment variables.

    Defines the runner pods the operator manages: image, resources and environment variables.

  • pullPolicyIfNotPresentHelm chart value (under image) for the image pull policy.

    Helm chart value (under image) for the image pull policy.

    values: IfNotPresent | Always

  • reconciliationPeriod1mHow often the operator reconciles.

    How often the operator reconciles.

  • repositoryGithubActionRunner field naming the GitHub repository to monitor (optional).

    GithubActionRunner field naming the GitHub repository to monitor (optional).

  • tagv0.11.1Helm chart value (under image) for the operator image tag; overrides the chart-version default.

    Helm chart value (under image) for the operator image tag; overrides the chart-version default.

  • tokenRefCustom-resource field pointing at the secret/key holding a PAT; a CR-level token takes precedence over the operator-level one.

    Custom-resource field pointing at the secret/key holding a PAT; a CR-level token takes precedence over the operator-level one.

  • watchNamespaceSets WATCH_NAMESPACE; when clusterScoped is false it equals the release namespace.

    Sets WATCH_NAMESPACE; when clusterScoped is false it equals the release namespace.

  • WATCH_NAMESPACENamespace the operator watches, rendered into the operator deployment.

    Namespace the operator watches, rendered into the operator deployment.

github-actions-runner-operator releases & version history

More in Kubernetes

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…