Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
f62b82e956 | |||
ed0ce3d192 | |||
8f70a4b9a0 | |||
a4e5943ca5 | |||
fc9c49179f | |||
4c17cc839e |
@ -2,7 +2,7 @@ apiVersion: v2
|
|||||||
name: gitea
|
name: gitea
|
||||||
description: Gitea Helm chart for Kubernetes
|
description: Gitea Helm chart for Kubernetes
|
||||||
type: application
|
type: application
|
||||||
version: 1.5.4
|
version: 2.0.2
|
||||||
appVersion: 1.12.5
|
appVersion: 1.12.5
|
||||||
icon: https://docs.gitea.io/images/gitea.png
|
icon: https://docs.gitea.io/images/gitea.png
|
||||||
|
|
||||||
@ -14,6 +14,7 @@ keywords:
|
|||||||
- gitea
|
- gitea
|
||||||
- gogs
|
- gogs
|
||||||
sources:
|
sources:
|
||||||
|
- https://gitea.com/gitea/helm-chart
|
||||||
- https://github.com/go-gitea/gitea
|
- https://github.com/go-gitea/gitea
|
||||||
- https://hub.docker.com/r/gitea/gitea/
|
- https://hub.docker.com/r/gitea/gitea/
|
||||||
maintainers:
|
maintainers:
|
||||||
@ -41,5 +42,5 @@ dependencies:
|
|||||||
condition: gitea.database.builtIn.postgresql.enabled
|
condition: gitea.database.builtIn.postgresql.enabled
|
||||||
- name: mariadb
|
- name: mariadb
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://charts.bitnami.com/bitnami
|
||||||
version: 7.10.2
|
version: 8.0.0
|
||||||
condition: gitea.database.builtIn.mariadb.enabled
|
condition: gitea.database.builtIn.mariadb.enabled
|
||||||
|
71
README.md
71
README.md
@ -47,6 +47,56 @@ Gitea offers lots of configuration. This is fully described in the [Gitea Cheat
|
|||||||
repository.pull-request:
|
repository.pull-request:
|
||||||
WORK_IN_PROGRESS_PREFIXES: "WIP:,[WIP]:"
|
WORK_IN_PROGRESS_PREFIXES: "WIP:,[WIP]:"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Default Configuration
|
||||||
|
|
||||||
|
This chart will set a few defaults in the gitea configuration based on the service and ingress settings. All defaults can be overwritten in gitea.config.
|
||||||
|
|
||||||
|
INSTALL_LOCK is always set to true, since we want to configure gitea with this helm chart and everything is taken care of.
|
||||||
|
|
||||||
|
*All default settings are made directly in the generated app.ini, not in the Values.*
|
||||||
|
|
||||||
|
#### Database defaults
|
||||||
|
|
||||||
|
If a builtIn database is enabled the database configuration is set automatically. For example postgresql builtIn which will appear in the app.ini as:
|
||||||
|
|
||||||
|
```
|
||||||
|
[database]
|
||||||
|
DB_TYPE = postgres
|
||||||
|
HOST = RELEASE-NAME-postgresql.default.svc.cluster.local:5432
|
||||||
|
NAME = gitea
|
||||||
|
PASSWD = gitea
|
||||||
|
USER = gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Memcached defaults
|
||||||
|
|
||||||
|
Memcached is handled the exakt same way as database builtIn. Once memcached builtIn is enabled, this chart will generate the following part in the app.ini:
|
||||||
|
|
||||||
|
```
|
||||||
|
[cache]
|
||||||
|
ADAPTER = memcache
|
||||||
|
ENABLED = true
|
||||||
|
HOST = RELEASE-NAME-memcached.default.svc.cluster.local:11211
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Server defaults
|
||||||
|
|
||||||
|
The server defaults are a bit more complex.
|
||||||
|
If ingress is enabled, the ROOT_URL, DOMAIN and SSH_DOMAIN will be set accordingly. HTTP_PORT always defaults to 3000 as well as SSH_PORT to 22.
|
||||||
|
|
||||||
|
```
|
||||||
|
[server]
|
||||||
|
APP_DATA_PATH = /data
|
||||||
|
DOMAIN = git.example.com
|
||||||
|
HTTP_PORT = 3000
|
||||||
|
PROTOCOL = http
|
||||||
|
ROOT_URL = http://git.example.com
|
||||||
|
SSH_DOMAIN = git.example.com
|
||||||
|
SSH_LISTEN_PORT = 22
|
||||||
|
SSH_PORT = 22
|
||||||
|
```
|
||||||
|
|
||||||
### External Database
|
### External Database
|
||||||
|
|
||||||
An external Database can be used instead of builtIn postgresql or mysql.
|
An external Database can be used instead of builtIn postgresql or mysql.
|
||||||
@ -104,6 +154,7 @@ If the built in cache should not be used simply configure the cache in gitea.con
|
|||||||
INTERVAL: 60
|
INTERVAL: 60
|
||||||
HOST: 127.0.0.1:9090
|
HOST: 127.0.0.1:9090
|
||||||
```
|
```
|
||||||
|
|
||||||
### Persistence
|
### Persistence
|
||||||
|
|
||||||
Gitea will be deployed as a statefulset. By simply enabling the persistence and setting the storage class according to your cluster
|
Gitea will be deployed as a statefulset. By simply enabling the persistence and setting the storage class according to your cluster
|
||||||
@ -193,7 +244,6 @@ Annotations can be added to the Gitea pod.
|
|||||||
|statefulset.terminationGracePeriodSeconds| Image to start for this pod | gitea/gitea |
|
|statefulset.terminationGracePeriodSeconds| Image to start for this pod | gitea/gitea |
|
||||||
|statefulset.env | Additional environment variables to pass to containers | [] |
|
|statefulset.env | Additional environment variables to pass to containers | [] |
|
||||||
|
|
||||||
|
|
||||||
### Image
|
### Image
|
||||||
|
|
||||||
| Parameter | Description | Default |
|
| Parameter | Description | Default |
|
||||||
@ -210,7 +260,7 @@ Annotations can be added to the Gitea pod.
|
|||||||
|persistence.existingClaim| Use an existing claim to store repository information | |
|
|persistence.existingClaim| Use an existing claim to store repository information | |
|
||||||
|persistence.size| Size for persistence to store repo information | 10Gi |
|
|persistence.size| Size for persistence to store repo information | 10Gi |
|
||||||
|persistence.accessModes|AccessMode for persistence||
|
|persistence.accessModes|AccessMode for persistence||
|
||||||
|persistence.storageClass|Storage class for repository persistence|standard|
|
|persistence.storageClass|Storage class for repository persistence||
|
||||||
|
|
||||||
### Ingress
|
### Ingress
|
||||||
|
|
||||||
@ -262,7 +312,7 @@ The following parameters are the defaults set by this chart
|
|||||||
|mysql.mysqlPassword|Password for the new user. Ignored if existing secret is provided|gitea|
|
|mysql.mysqlPassword|Password for the new user. Ignored if existing secret is provided|gitea|
|
||||||
|mysql.mysqlDatabase|Name for new database to create.|gitea|
|
|mysql.mysqlDatabase|Name for new database to create.|gitea|
|
||||||
|mysql.service.port|Port to connect to mysql service|3306|
|
|mysql.service.port|Port to connect to mysql service|3306|
|
||||||
|mysql.persistence|Persistence size for mysql |10Gi|
|
|mysql.persistence.size|Persistence size for mysql |10Gi|
|
||||||
|
|
||||||
### Postgresql BuiltIn
|
### Postgresql BuiltIn
|
||||||
|
|
||||||
@ -277,3 +327,18 @@ The following parameters are the defaults set by this chart
|
|||||||
|postgresql.global.postgresql.postgresqlPassword| PostgreSQL admin password (overrides postgresqlPassword)|gitea|
|
|postgresql.global.postgresql.postgresqlPassword| PostgreSQL admin password (overrides postgresqlPassword)|gitea|
|
||||||
|postgresql.global.postgresql.servicePort|PostgreSQL port (overrides service.port)|5432|
|
|postgresql.global.postgresql.servicePort|PostgreSQL port (overrides service.port)|5432|
|
||||||
|postgresql.persistence.size| PVC Storage Request for PostgreSQL volume |10Gi|
|
|postgresql.persistence.size| PVC Storage Request for PostgreSQL volume |10Gi|
|
||||||
|
|
||||||
|
### MariaDB BuiltIn
|
||||||
|
|
||||||
|
MariaDB is loaded as a dependency from bitnami. Configuration can be found from this [Bitnami](https://github.com/bitnami/charts/tree/master/bitnami/mariadb)
|
||||||
|
|
||||||
|
The following parameters are the defaults set by this chart
|
||||||
|
|
||||||
|
| Parameter | Description | Default |
|
||||||
|
|---------------------|-----------------------------------|------------------------------|
|
||||||
|
|mariadb.auth.username|Username of new user to create.|gitea|
|
||||||
|
|mariadb.auth.password|Password for the new user. Ignored if existing secret is provided|gitea|
|
||||||
|
|mariadb.auth.database|Name for new database to create.|gitea|
|
||||||
|
|mariadb.auth.rootPassword|Password for the root user.|gitea|
|
||||||
|
|mariadb.primary.service.port|Port to connect to mariadb service|3306|
|
||||||
|
|mariadb.primary.persistence.size|Persistence size for mariadb |10Gi|
|
||||||
|
@ -70,28 +70,28 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
|||||||
{{- else if .Values.gitea.database.builtIn.mysql.enabled -}}
|
{{- else if .Values.gitea.database.builtIn.mysql.enabled -}}
|
||||||
{{ .Values.mysql.service.port }}
|
{{ .Values.mysql.service.port }}
|
||||||
{{- else if .Values.gitea.database.builtIn.mariadb.enabled -}}
|
{{- else if .Values.gitea.database.builtIn.mariadb.enabled -}}
|
||||||
{{ .Values.mariadb.service.port }}
|
{{ .Values.mariadb.primary.service.port }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "postgresql.dns" -}}
|
{{- define "postgresql.dns" -}}
|
||||||
{{- printf "%s-postgresql.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.postgresql.global.postgresql.servicePort -}}
|
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.servicePort -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "mysql.dns" -}}
|
{{- define "mysql.dns" -}}
|
||||||
{{- printf "%s-mysql.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.mysql.service.port | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-mysql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.mysql.service.port | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "mariadb.dns" -}}
|
{{- define "mariadb.dns" -}}
|
||||||
{{- printf "%s-mariadb.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.mysql.service.port | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-mariadb.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.mariadb.primary.service.port | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "memcached.dns" -}}
|
{{- define "memcached.dns" -}}
|
||||||
{{- printf "%s-memcached.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.memcached.service.port | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-memcached.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.memcached.service.port | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "gitea.default_domain" -}}
|
{{- define "gitea.default_domain" -}}
|
||||||
{{- printf "%s-gitea.%s.svc.cluster.local" (include "gitea.fullname" .) .Release.Namespace | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-gitea.%s.svc.%s" (include "gitea.fullname" .) .Release.Namespace .Values.clusterDomain | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@ -62,6 +62,9 @@ stringData:
|
|||||||
{{- if not (hasKey .Values.gitea.config.server "SSH_LISTEN_PORT") -}}
|
{{- if not (hasKey .Values.gitea.config.server "SSH_LISTEN_PORT") -}}
|
||||||
{{- $_ := set .Values.gitea.config.server "SSH_LISTEN_PORT" .Values.gitea.config.server.SSH_PORT -}}
|
{{- $_ := set .Values.gitea.config.server "SSH_LISTEN_PORT" .Values.gitea.config.server.SSH_PORT -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- if not (hasKey .Values.gitea.config.server "APP_DATA_PATH") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.server "APP_DATA_PATH" "/data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* database default settings */ -}}
|
{{- /* database default settings */ -}}
|
||||||
{{- if .Values.gitea.database.builtIn.postgresql.enabled -}}
|
{{- if .Values.gitea.database.builtIn.postgresql.enabled -}}
|
||||||
@ -85,9 +88,9 @@ stringData:
|
|||||||
{{- if not (.Values.gitea.config.database.HOST) -}}
|
{{- if not (.Values.gitea.config.database.HOST) -}}
|
||||||
{{- $_ := set .Values.gitea.config.database "HOST" (include "mariadb.dns" .) -}}
|
{{- $_ := set .Values.gitea.config.database "HOST" (include "mariadb.dns" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $_ := set .Values.gitea.config.database "NAME" .Values.mariadb.db.name -}}
|
{{- $_ := set .Values.gitea.config.database "NAME" .Values.mariadb.auth.database -}}
|
||||||
{{- $_ := set .Values.gitea.config.database "USER" .Values.mariadb.db.user -}}
|
{{- $_ := set .Values.gitea.config.database "USER" .Values.mariadb.auth.username -}}
|
||||||
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.mariadb.db.password -}}
|
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.mariadb.auth.password -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* cache default settings */ -}}
|
{{- /* cache default settings */ -}}
|
||||||
|
@ -6,7 +6,12 @@ metadata:
|
|||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
type: {{ .Values.service.http.type }}
|
type: {{ .Values.service.http.type }}
|
||||||
|
{{- if and .Values.service.http.loadBalancerIP (eq .Values.service.http.type "LoadBalancer") }}
|
||||||
|
loadBalancerIP: {{ .Values.service.http.loadBalancerIP }}
|
||||||
|
{{- end }}
|
||||||
|
{{ if eq .Values.service.http.type "ClusterIP" }}
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
port: {{ .Values.service.http.port }}
|
port: {{ .Values.service.http.port }}
|
||||||
|
@ -5,7 +5,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
annotations:
|
annotations:
|
||||||
{{ toYaml .Values.service.ssh.annotations | indent 4 }}
|
{{- toYaml .Values.service.ssh.annotations | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
type: {{ .Values.service.ssh.type }}
|
type: {{ .Values.service.ssh.type }}
|
||||||
{{- if and .Values.service.ssh.loadBalancerIP (eq .Values.service.ssh.type "LoadBalancer") }}
|
{{- if and .Values.service.ssh.loadBalancerIP (eq .Values.service.ssh.type "LoadBalancer") }}
|
||||||
@ -16,7 +16,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.service.ssh.externalIPs }}
|
{{- if .Values.service.ssh.externalIPs }}
|
||||||
externalIPs:
|
externalIPs:
|
||||||
{{ toYaml .Values.service.ssh.externalIPs | indent 4 }}
|
{{- toYaml .Values.service.ssh.externalIPs | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.service.ssh.externalTrafficPolicy }}
|
{{- if .Values.service.ssh.externalTrafficPolicy }}
|
||||||
externalTrafficPolicy: {{ .Values.service.ssh.externalTrafficPolicy }}
|
externalTrafficPolicy: {{ .Values.service.ssh.externalTrafficPolicy }}
|
||||||
|
@ -109,7 +109,9 @@ spec:
|
|||||||
{{- range .Values.persistence.accessModes }}
|
{{- range .Values.persistence.accessModes }}
|
||||||
- {{ . | quote }}
|
- {{ . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
storageClassName: {{ .Values.persistence.storageClass | default "standard" | quote }}
|
{{- if .Values.persistence.storageClass }}
|
||||||
|
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||||
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: {{ .Values.persistence.size | quote }}
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
18
values.yaml
18
values.yaml
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
|
clusterDomain: cluster.local
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: gitea/gitea
|
repository: gitea/gitea
|
||||||
version: 1.12.5
|
version: 1.12.5
|
||||||
@ -66,7 +68,6 @@ persistence:
|
|||||||
size: 10Gi
|
size: 10Gi
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
storageClass: standard
|
|
||||||
|
|
||||||
gitea:
|
gitea:
|
||||||
admin:
|
admin:
|
||||||
@ -140,12 +141,13 @@ mysql:
|
|||||||
size: 10Gi
|
size: 10Gi
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
db:
|
auth:
|
||||||
name: gitea
|
database: gitea
|
||||||
user: gitea
|
username: gitea
|
||||||
password: gitea
|
password: gitea
|
||||||
service:
|
rootPassword: gitea
|
||||||
port: 3306
|
primary:
|
||||||
master:
|
service:
|
||||||
|
port: 3306
|
||||||
persistence:
|
persistence:
|
||||||
size: 10Gi
|
size: 10Gi
|
||||||
|
Reference in New Issue
Block a user