actions

by Gitea

Helm chartv0.1.4App 0.261.3MITVerified publisher

Gitea Actions Helm chart for Kubernetes

About this chart

Gitea Actions Helm Chart

This helm chart serves as the way to deploy the Gitea act-runners alongside a running Gitea instance.
It serves as a standalone chart and does not rely on Gitea to be present in the same environment, however it needs to be able to reach a Gitea instance to function.
The parameters which can be used to customize the deployment are described below, check those out if you want to see if something is supported.

If you want to propose a new feature or mechanism, submit an issue here.

Quick-start

Documentation

To get started, add the Helm repo, assuming you have not already:

helm repo add gitea-charts https://dl.gitea.com/charts/
helm repo update

Then pull the values.yaml file and fill it accordingly.

helm show values gitea-charts/actions > values.yaml

Deploy with your values, make sure the path is correct:

helm upgrade --install gitea-actions gitea-charts/actions -f values.yaml

Alternatively:

helm upgrade --install gitea-actions gitea-charts/actions \
  --set enabled=true \
  --set giteaRootURL=https://gitea.com \
  --set existingSecret=foo \
  --set existingSecretKey=bar

You should be good to go!

Runner Token Secret Template

For reference, a template for the secret is given below:

apiVersion: v1
kind: Secret
metadata:
  name: runner-secret
  namespace: "my-gitea-namespace"
type: Opaque
stringData:
    runner-token: "my-cool-runner-token-given-by-gitea"

Rootless Options

If .Values.statefulset.dind.rootless: true is set, then the following will be required:
.Values.statefulset.dind.tag must be a rootless image such as: 29.3.1-dind-rootless

Parameters

Gitea Actions

For resource limit examples (runner vs DinD), see docs/resources.md.

NameDescriptionValue
enabledCreate a Gitea Runner StatefulSet.false
statefulset.replicasthe amount of (replica) runner pods deployed1
statefulset.timezoneis the timezone that will be set in the runner imageEtc/UTC
statefulset.annotationsGitea Runner annotations{}
statefulset.labelsGitea Runner labels{}
statefulset.resourcesShared resource requests/limits for both containers. Overridden by statefulset.runner.resources and statefulset.dind.resources. See docs/resources.md.{}
statefulset.nodeSelectorNodeSelector for the statefulset{}
statefulset.tolerationsTolerations for the statefulset[]
statefulset.affinityAffinity for the statefulset{}
statefulset.extraVolumesExtra volumes for the statefulset[]
statefulset.persistence.sizeSize for persistence to store Gitea Runner data1Gi
statefulset.securityContextCustomize the SecurityContext{}
statefulset.serviceAccountNameCustomize the service account name""
statefulset.runtimeClassNameSelect a different RuntimeClass for pods""
statefulset.hostAliasesInject entries into the /etc/hosts file[]
statefulset.persistence.sizeSize for persistence to store Gitea Runner data1Gi
statefulset.runner.registryimage registry, e.g. gcr.io,docker.iodocker.gitea.com
statefulset.runner.repositoryThe Gitea Runner imagerunner
statefulset.runner.tagThe Gitea Runner tag5.2.3
statefulset.runner.digestImage digest. Allows to pin the given image tag. Useful for having control over mutable tags like latest""
statefulset.runner.pullPolicyThe Gitea Runner pullPolicyIfNotPresent
statefulset.runner.fullOverrideCompletely overrides the image registry, path/image, tag and digest.""
statefulset.runner.resourcesResource requests/limits for the runner container. Takes precedence over statefulset.resources when set.{}
statefulset.runner.extraVolumeMountsAllows mounting extra volumes in the Gitea Runner container[]
statefulset.runner.extraEnvsAllows adding custom environment variables[]
statefulset.runner.flushCachewhether to clear the .runner (cache) file by creating an extra init container, can slightly increase boot-up timefalse
statefulset.runner.configGitea Runner custom configuration. See Gitea Runner documentation for details.Too complex. See values.yaml
statefulset.dind.rootlessa simple flag to let helm know we are dealing with a rootless dind containerfalse
statefulset.dind.uida field to set the running user id for the rootless dind container, so it knows where to look for the socket""
statefulset.dind.registryimage registry, e.g. gcr.io,docker.iodocker.io
statefulset.dind.repositoryThe Docker-in-Docker imagedocker
statefulset.dind.tagThe Docker-in-Docker image tag29.9.2-dind
statefulset.dind.digestImage digest. Allows to pin the given image tag. Useful for having control over mutable tags like latest""
statefulset.dind.fullOverrideCompletely overrides the image registry, path/image, tag and digest.""
statefulset.dind.pullPolicyThe Docker-in-Docker pullPolicyIfNotPresent
statefulset.dind.resourcesResource requests/limits for the DinD sidecar container. Takes precedence over statefulset.resources when set.{}
statefulset.dind.extraVolumeMountsAllows mounting extra volumes in the Docker-in-Docker container[]
statefulset.dind.extraEnvsAllows adding custom environment variables, such as DOCKER_IPTABLES_LEGACY[]
statefulset.dind.extraArgsAllows adding custom arguments to the Docker Daemon[]

Gitea Actions Init

NameDescriptionValue
init.image.registryImage registry, e.g. gcr.io,docker.io""
init.image.repositoryThe init image (default: busyboxy but can be changed to alpine e.g.)busybox
init.image.tagThe init image tag1.38.0
init.image.digestImage digest. Allows to pin the given image tag. Useful for having control over mutable tags like latest""
init.image.pullPolicyThe init image pullPolicyIfNotPresent
init.image.fullOverrideCompletely overrides the image registry, path/image, tag and digest""
init.connectionCommandOverridePossiblity to change the command with which the container tests its connection to the Gitea server""
init.preConnectionCommandOverridePossibility to add commands that happen before the connection test loop""

Runner Token Secret Configuration

NameDescriptionValue
existingSecretSecret that contains the token""
existingSecretKeySecret key""

Gitea URL Setting

NameDescriptionValue
giteaRootURLURL the Gitea Runner registers and connects with""

Extra Init Containers

NameDescriptionValue
preExtraInitContainersAdditional init containers to run in the pod before Gitea-actions runs it owns init containers.[]
`postExtraIni

Deploy actions with OpenTenant

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