gitea

by k8s-home-lab

Helm chartv3.1.0App 28.4.0

Gitea self-hosted github-styled git repository manager

About this chart

gitea

Gitea self-hosted github-styled git repository manager

This chart is not maintained by the upstream project and any issues with the chart should be raised here

Source Code

Requirements

Kubernetes: >=1.32.0

Dependencies

RepositoryNameVersion
https://k8s-home-lab.github.io/helm-charts/common4.5.5
oci://ghcr.io/cloudpirates-io/helm-chartsmariadb0.17.0
oci://ghcr.io/cloudpirates-io/helm-chartspostgres0.22.1
oci://ghcr.io/cloudpirates-io/helm-chartsredis0.40.0

TL;DR

helm repo add k8s-home-lab https://k8s-home-lab.github.io/helm-charts/
helm repo update
helm install gitea k8s-home-lab/gitea

Installing the Chart

To install the chart with the release name gitea

helm install gitea k8s-home-lab/gitea

Uninstalling the Chart

To uninstall the gitea deployment

helm uninstall gitea

The command removes all the Kubernetes components associated with the chart including persistent volumes and deletes the release.

Configuration

Read through the values.yaml file. It has several commented out suggested values. Other values may be used from the values.yaml from the common library.

Specify each parameter using the --set key=value[,key=value] argument to helm install.

helm install gitea \
  --set env.TZ="America/New York" \
    k8s-home-lab/gitea

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.

helm install gitea k8s-home-lab/gitea -f values.yaml

Custom configuration

Set Gitea parameters with:

config:
  GITEA__APP_NAME: "Gitea: Git with a cup of tea"
  GITEA__RUN_MODE: prod
  GITEA__repository__ROOT: /data/git/repositories
  GITEA__server__APP_DATA_PATH: /data/gitea
  GITEA__service__DISABLE_REGISTRATION: false
  GITEA__service__REQUIRE_SIGNIN_VIEW: false

All options can be found here.

Values

Important: When deploying an application Helm chart you can add more values from our common library chart here

KeyTypeDefaultDescription
addons.codeserverobjectSee values.yamlThe common library supports adding a code-server add-on to access files. It can be configured under this key. For more info, check out our docs
addons.codeserver.argslist["--auth","none"]Set codeserver command line arguments. Consider setting --user-data-dir to a persistent location to preserve code-server setting changes
addons.codeserver.enabledboolfalseEnable running a code-server container in the pod
addons.codeserver.envobject{}Set any environment variables for code-server here
addons.codeserver.gitobjectSee belowOptionally allow access a Git repository by passing in a private SSH key
addons.codeserver.git.deployKeystring""Raw SSH private key
addons.codeserver.git.deployKeyBase64string""Base64-encoded SSH private key. When both variables are set, the raw SSH key takes precedence.
addons.codeserver.git.deployKeySecretstring""Existing secret containing SSH private key The chart expects it to be present under the id_rsa key.
addons.codeserver.image.pullPolicystring"IfNotPresent"Specify the code-server image pull policy
addons.codeserver.image.repositorystring"codercom/code-server"Specify the code-server image
addons.codeserver.image.tagstring"4.146.0"Specify the code-server image tag
addons.codeserver.ingress.enabledboolfalseEnable an ingress for the code-server add-on.
addons.codeserver.service.enabledbooltrueEnable a service for the code-server add-on.
addons.codeserver.service.ipFamilieslist["IPv4"]The ip families that should be used. Options: IPv4, IPv6
addons.codeserver.service.ipFamilyPolicystring"SingleStack"Specify the ip policy. Options: SingleStack, PreferDualStack, RequireDualStack
addons.codeserver.volumeMountslist[]Specify a list of volumes that get mounted in the code-server container. At least 1 volumeMount is required!
addons.codeserver.workingDirstring""Specify the working dir that will be opened when code-server starts If not given, the app will default to the mountpah of the first specified volumeMount
configstringSee https://docs.gitea.io/en-us/config-cheat-sheet/gitea specific configuration keys. Must be formatted as GITEA__[section]__variable
envobjectSee belowenvironment variables. See more environment variables in the gitea documentation.
env.TZstring"UTC"Set the container timezone
image.pullPolicystring"IfNotPresent"image pull policy
image.repositorystring"gitea/gitea"image repository
image.tagstringnilimage tag
ingress.mainobjectSee values.yamlEnable and configure ingress settings for the chart under this key.
mariadbobjectSee values.yamlEnable and configure mariadb database subchart under this key. For more options see mariadb chart documentation
persistenceobjectSee values.yamlConfigure persistence settings for the chart under this key.
postgresqlobjectSee values.yamlEnable and configure postgresql database subchart under this key. For more options see postgresql chart documentation
redisobjectSee values.yamlEnable and configure redis subchart under this key. For more options see redis chart documentation
serviceobjectSee values.yamlConfigures service settings for the chart.

Changelog

Version 3.1.0

Deploy gitea with OpenTenant

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