github-runners

by volodymyr.stetsenko

Helm chartv1.0.2

A helm chart for github runners

About this chart

Description

This helm chart allows to create RunnerDeployment and HorizontalRunnerAutoscaler resources for actions-runner-controller.

This is useful if you want to install these resources via helm_release in the Terraform.

What need to change

  1. You can set both the list of repositories and organization name
repositories: ["oufinx/repo1", "oufinx/repo2"]
organization: "oufinx"
  1. Set label that will be added for runner
labels: ["abc-production"]

By default it has the next metrics

metrics:
- type: PercentageRunnersBusy
  scaleUpThreshold: '0.75'    # The percentage of busy runners at which the number of desired runners are re-evaluated to scale up
  scaleDownThreshold: '0.3'   # The percentage of busy runners at which the number of desired runners are re-evaluated to scale down
  scaleUpFactor: '1.4'        # The scale up multiplierез factor applied to desired count
  scaleDownFactor: '0.7'      # The scale down multiplier factor applied to desired count

How to install

  1. Add repo
helm repo add oufinx https://oufinx.github.io/helm-charts/ 
  1. Make repo updates
helm repo update
  1. Create my_values.yaml and set your changes

  2. Install chart

helm install runners oufinx/github-runners -f my_values.yaml

Deploy github-runners with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has github-runners on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgithub-runners is pinned at v1.0.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply