github-actions-runner

by serge.logvinov

Helm chartv2.24.2App 2.338.2Verified publisher

Github Actions with container registry and mirrors

About this chart

github-actions-runner

Github Actions with container registry and mirrors

Github Actions runners with:

  • docker as sidecar for running docker-in-docker
  • docker registry to cache images between builds
  • oci mirror to pull images and avoid hitting rate limits
  • http proxy to reduce external traffic

Homepage: https://github.com/sergelogvinov/helm-charts

Maintainers

NameEmailUrl
sergelogvinovhttps://github.com/sergelogvinov

Source Code

Before starting, you need to deploy the controller:

helm upgrade -i arc oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller

Then, you can deploy the runner using the following values:

# helm values

maxRunners: 8
minRunners: 1

githubConfigUrl: https://github.com/...
githubConfigSecret:
  github_app_id: "123"
  github_app_installation_id: "123"
  github_app_private_key: |
    KEY

controllerServiceAccount:
  name: arc

envs:
  BUILDKIT_PROGRESS: plain
  DOCKER_BUILDKIT: "1"

persistence:
  enabled: true
  storageClass: local-path
  size: 16Gi

mirrors:
  persistence:
    enabled: true
    storageClass: local-path
    size: 150Gi

registry:
  persistence:
    enabled: true
    storageClass: local-path
    size: 200Gi

  nodeSelector:
    node-role.kubernetes.io/builder: ""

nodeSelector:
  node-role.kubernetes.io/builder: ""

Values

KeyTypeDefaultDescription
image.repositorystring"ghcr.io/sergelogvinov/github-actions-runner"
image.pullPolicystring"IfNotPresent"
image.tagstring""
imagePullSecretslist[]
nameOverridestring""
fullnameOverridestring""
installationTypestring"statefulset"Type of installation Can be: statefulset, crd
autoscaling.enabledboolfalse
autoscaling.minReplicasint1
autoscaling.maxReplicasint9
autoscaling.targetUtilizationPercentageint90
autoscaling.scaleDown.stabilizationWindowSecondsint600
autoscaling.scaleUp.stabilizationWindowSecondsint30
runnerReposstring""
runnerGroupstring"default"
runnerScaleSetNamestring""
runnerVersionstring"0.15.1"
githubConfigUrlstring"https://github.com/..."
githubConfigSecretobject{}
controllerServiceAccount.namestring"arc"
controllerServiceAccount.namespacestring""
dind.enabledbooltrue
dind.imageobject{"pullPolicy":"IfNotPresent","repository":"docker","tag":"29.0-dind"}Docker in Docker image. ref: https://hub.docker.com/_/docker/tags?page=1&name=dind
dind.resourcesobject{"limits":{"cpu":1,"memory":"1Gi"},"requests":{"cpu":"500m","memory":"256Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
dind.extraVolumeMountslist[]Additional container volume mounts.
dind.extraVolumeslist[]Additional volumes.
dind.persistenceobject{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"100Gi"}Persistence parameters for source code ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
proxy.enabledboolfalse
proxy.image.repositorystring"ubuntu/squid"
proxy.image.pullPolicystring"IfNotPresent"
proxy.image.tagstring"4.13-21.10_beta"
proxy.command[0]string"/bin/sh"
proxy.command[1]string"/etc/proxy/proxy.sh"
proxy.resourcesobject{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"100m","memory":"256Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
proxy.persistenceobject{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"10Gi"}Persistence parameters for source code ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
proxy.nodeSelectorobject{}Node labels for mirrors deploy assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
proxy.tolerationslist[]Tolerations for mirrors deploy assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
proxy.podAntiAffinityPresetstring"soft"Anti-affinity for pod assignment. options: soft, hard, null
proxy.affinityobject{}Affinity for mirrors deploy assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
mirrors.enabledbooltrue
mirrors.image.repositorystring"ghcr.io/project-zot/zot"
mirrors.image.pullPolicystring"IfNotPresent"
mirrors.image.tagstring"v2.1.23"
mirrors.registrylist[{"host":"docker.io","source":"https://registry-1.docker.io"},{"host":"gcr.io","source":"https://gcr.io"},{"host":"ghcr.io","source":"https://ghcr.io"},{"host":"registry.gitlab.com","source":"https://registry.gitlab.com"},{"host":"quay.io","source":"https://quay.io"},{"host":"mcr.microsoft.com","source":"https://mcr.microsoft.com"},{"host":"registry.k8s.io","source":"https://registry.k8s.io"}]Container registry list. ref: https://docs.docker.com/registry/recipes/mirror/
mirrors.resourcesobject{"limits":{"cpu":1,"memory":"2Gi"},"requests":{"cpu":"200m","memory":"512Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
mirrors.persistenceobject{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"100Gi"}Persistence parameters for source code ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
mirrors.serviceAccountobject{"annotations":{},"create":false,"name":""}Registry Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
mirrors.nodeSelectorobject{}Node labels for mirrors deploy assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
mirrors.tolerationslist[]Tolerations for mirrors deploy assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
mirrors.affinityobject{}Affinity for mirrors deploy assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
registry.enabledboolfalse
registry.image.repositorystring"ghcr.io/project-zot/zot"
registry.image.pullPolicystring"IfNotPresent"
registry.image.tagstring"v2.1.23"
registry.storagestringnil
registry.ingressobject{"annotations":{"nginx.ingress.kubernetes.io/proxy-body-size":0},"auth":{},"className":"","enabled":false,"hosts":[],"tls":null}Registry ingress parameters ref: http://kubernetes.io/docs/user-guide/ingress/
registry.resourcesobject{"limits":{"cpu":1,"memory":"2Gi"},"requests":{"cpu":"100m","memory":"512Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
registry.extraVolumeMountslist[]
registry.extraVolumeslist[]
registry.persistenceobject{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"100Gi"}Persistence parameters for source code ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
registry.serviceAccountobject{"annotations":{},"create":false,"name":""}Registry Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
registry.nodeSelectorobject{}Node labels for local registry deploy assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
registry.tolerationslist[]Tolerations for local registry deploy assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
registry.affinityobject{}Affinity for local registry deploy assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
metrics.enabledboolfalse
metrics.image.repositorystring"ghcr.io/sergelogvinov/github-actions-exporter"
metrics.image.pullPolicystring"IfNotPresent"
metrics.image.tagstring"v1.9.0-beta"
metrics.resourcesobject{"limits":{"cpu":"100m","memory":"256Mi"},"requests":{"cpu":"50m","memory":"192Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
metrics.nodeSelectorobject{}Node labels for local registry deploy assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
metrics.tolerationslist[]Tolerations for local registry deploy assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
metrics.affinityobject{}Affinity for local registry deploy assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
listenerobject{"affinity":{},"nodeSelector":{},"tolerations":[]}Github Actions Runner Listener parameters
listener.nodeSelectorobject{}Node labels for pod assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
listener.tolerationslist[]Tolerations for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
listener.affinityobject{}Affinity for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
serviceAccountobject{"annotations":{},"create":true,"name":""}Pods Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
podAnnotationsobject{}Annotations for pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podSecurityContextobject{}Pod Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"runAsGroup":0,"runAsUser":1001,"seccompProfile":{"type":"RuntimeDefault"}}Container Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
serviceobject{"ipFamilies":["IPv4"]}Service parameters ref: https://kubernetes.io/docs/user-guide/services/
resourcesobject{"requests":{"cpu":"200m","memory":"512Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
persistenceobject{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"8Gi"}Persistence parameters for source code ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
extraVolumeMountslist[]Additional container volume mounts.
extraVolumeslist[]Additional volumes.
nodeSelectorobject{}Node labels for pod assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
tolerationslist[]Tolerations for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
podAntiAffinityPresetstring"soft"Anti-affinity for pod assignment. options: soft, hard, null
affinityobject{}Affinity for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity

Deploy github-actions-runner with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has github-actions-runner 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-actions-runner is pinned at v2.24.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