gitea
by k8s-home-lab
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
- https://github.com/go-gitea/gitea
- https://github.com/k8s-home-lab/helm-charts/tree/master/charts/stable/gitea
Requirements
Kubernetes: >=1.32.0
Dependencies
| Repository | Name | Version |
|---|---|---|
| https://k8s-home-lab.github.io/helm-charts/ | common | 4.5.5 |
| oci://ghcr.io/cloudpirates-io/helm-charts | mariadb | 0.17.0 |
| oci://ghcr.io/cloudpirates-io/helm-charts | postgres | 0.22.1 |
| oci://ghcr.io/cloudpirates-io/helm-charts | redis | 0.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
| Key | Type | Default | Description |
|---|---|---|---|
| addons.codeserver | object | See values.yaml | The 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.args | list | ["--auth","none"] | Set codeserver command line arguments. Consider setting --user-data-dir to a persistent location to preserve code-server setting changes |
| addons.codeserver.enabled | bool | false | Enable running a code-server container in the pod |
| addons.codeserver.env | object | {} | Set any environment variables for code-server here |
| addons.codeserver.git | object | See below | Optionally allow access a Git repository by passing in a private SSH key |
| addons.codeserver.git.deployKey | string | "" | Raw SSH private key |
| addons.codeserver.git.deployKeyBase64 | string | "" | Base64-encoded SSH private key. When both variables are set, the raw SSH key takes precedence. |
| addons.codeserver.git.deployKeySecret | string | "" | Existing secret containing SSH private key The chart expects it to be present under the id_rsa key. |
| addons.codeserver.image.pullPolicy | string | "IfNotPresent" | Specify the code-server image pull policy |
| addons.codeserver.image.repository | string | "codercom/code-server" | Specify the code-server image |
| addons.codeserver.image.tag | string | "4.146.0" | Specify the code-server image tag |
| addons.codeserver.ingress.enabled | bool | false | Enable an ingress for the code-server add-on. |
| addons.codeserver.service.enabled | bool | true | Enable a service for the code-server add-on. |
| addons.codeserver.service.ipFamilies | list | ["IPv4"] | The ip families that should be used. Options: IPv4, IPv6 |
| addons.codeserver.service.ipFamilyPolicy | string | "SingleStack" | Specify the ip policy. Options: SingleStack, PreferDualStack, RequireDualStack |
| addons.codeserver.volumeMounts | list | [] | Specify a list of volumes that get mounted in the code-server container. At least 1 volumeMount is required! |
| addons.codeserver.workingDir | string | "" | 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 |
| config | string | See https://docs.gitea.io/en-us/config-cheat-sheet/ | gitea specific configuration keys. Must be formatted as GITEA__[section]__variable |
| env | object | See below | environment variables. See more environment variables in the gitea documentation. |
| env.TZ | string | "UTC" | Set the container timezone |
| image.pullPolicy | string | "IfNotPresent" | image pull policy |
| image.repository | string | "gitea/gitea" | image repository |
| image.tag | string | nil | image tag |
| ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. |
| mariadb | object | See values.yaml | Enable and configure mariadb database subchart under this key. For more options see mariadb chart documentation |
| persistence | object | See values.yaml | Configure persistence settings for the chart under this key. |
| postgresql | object | See values.yaml | Enable and configure postgresql database subchart under this key. For more options see postgresql chart documentation |
| redis | object | See values.yaml | Enable and configure redis subchart under this key. For more options see redis chart documentation |
| service | object | See values.yaml | Configures 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartgitea is pinned at v3.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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