github-runner-agent

by jkroepke

Helm chartv1.1.1Verified publisher

A Helm chart to deploy github runner for Kubernetes.

About this chart

github-runner-agent

A Helm chart to deploy github runner for Kubernetes.

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

Maintainers

NameEmailUrl
Jan-Otto Kröpkehttps://github.com/jkroepke

Source Code

Values

KeyTypeDefaultDescription
affinityobject{}
cronjob.enabledbooltrue
cronjob.image.imageNamestring"bitnami/kubectl"
cronjob.image.pullPolicystring"Always"
cronjob.image.repositorystring"docker.io"
cronjob.image.tagstring"latest"Overrides the image tag whose default is the chart appVersion.
cronjob.schedulestring"0 0 * * 0"
env.CONFIGURED_ACTIONS_RUNNER_FILES_DIRstring"/data"Path to use for runner data. It allows avoiding reregistration each the start of the runner. No default value.
env.DISABLE_AUTOMATIC_DEREGISTRATIONstring"true"Optional flag to disable signal catching for deregistration. Default is false. Any value other than exactly false is considered true.
env.DISABLE_AUTO_UPDATEstring"false"Optional environment variable to disable auto updates. Auto updates are enabled by default to preserve past behavior. Any value is considered truthy and will disable them.
env.ENTERPRISE_NAMEstring""The enterprise name for the runner to register under. Requires RUNNER_SCOPE to be 'enterprise'. No default value.
env.GITHUB_HOSTstring""Optional URL of the GitHub Enterprise server e.g github.mycompany.com. Defaults to github.com.
env.LABELSstring"self-hosted"A comma-separated string to indicate the labels. Default is 'default'
env.NO_DEFAULT_LABELSstring"false"Optional environment variable to disable adding the default self-hosted, platform, and architecture labels to the runner. Any value is considered truthy and will disable them.
env.ORG_NAMEstring""The organization name for the runner to register under. Requires RUNNER_SCOPE to be 'org'. No default value.
env.REPO_URLstring""If using a non-organization runner this is the full repository url to register under such as 'https://github.com/myoung34/repo'
env.RUNNER_GRACEFUL_STOP_TIMEOUTstring"590"Seconds to wait for the runner to shut down gracefully
env.RUNNER_GROUPstring""Name of the runner group to add this runner to (defaults to the default runner group)
env.RUNNER_NAMEstring"self-hosted-github-runner"The name of the runner to use. Supercedes (overrides) RUNNER_NAME_PREFIX
env.RUNNER_SCOPEstring"repo"The scope the runner will be registered on. Valid values are repo, org and ent. For 'org' and 'enterprise', ACCESS_TOKEN is required and REPO_URL is unnecessary. If 'org', requires ORG_NAME; if 'enterprise', requires ENTERPRISE_NAME. Default is 'repo'.
env.RUNNER_WORKDIRstring"/_work"The working directory for the runner. Runners on the same host should not share this directory. Default is '/_work'. This must match the source path for the bind-mounted volume at RUNNER_WORKDIR, in order for container actions to access files.
env.RUN_AS_ROOTboolfalseBoolean to run as root. If true: will run as root. If True and the user is overridden it will error. If any other value it will run as the runner user and allow an optional override. Default is true
env.START_DOCKER_SERVICEstring"false"Optional flag which automatically starts the docker service if set to true. Useful when using sysbox. Defaults to false.
fullnameOverridestring""
image.imageNamestring"myoung34/github-runner"
image.pullPolicystring"Always"
image.repositorystring"docker.io"
image.tagstring"latest"Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]
livenessProbeobject{}LivenessProbes
nameOverridestring""
nodeSelectorobject{}Labels for selecting the node.
persistentVolumeobject{"enabled":true,"size":"1Gi","storageClassName":""}Persistent Volume for data directory in github runner in order to utilise the RUNNER_TOKEN for unlimited time.
podAnnotationsobject{}
podSecurityContext.fsGroupint1
readinessProbeobject{}ReadinessProbes
replicaCountint1
resourcesobject{}
secrets.ACCESS_TOKENstring""A github PAT to use to generate RUNNER_TOKEN dynamically at container start. Not using this requires a valid RUNNER_TOKEN.
secrets.RUNNER_TOKENstring""If not using a PAT for ACCESS_TOKEN this will be the runner token provided by the Add Runner UI (a manual process). Note: This token is short lived and will change frequently. ACCESS_TOKEN is likely preferred.
securityContext.runAsGroupint1
securityContext.runAsNonRootbooltrue
securityContext.runAsUserint1001
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""If not set and create is true, a name is generated using the fullname template
serviceAccount.roleNamestring"cluster-admin"If not set and create is true, will use the cluster-admin role.
terminationGracePeriodSecondsint600
tolerationslist[]

Deploy github-runner-agent with OpenTenant

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