Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
2b01e6ece6 | |||
c742b5dbc3 | |||
ec8a26ecfc | |||
8d8dd0d84e | |||
0f1e991889 | |||
1eb0eee3bc | |||
9106d68cdc |
@ -3,7 +3,7 @@ name: gitea
|
|||||||
description: Gitea Helm chart for Kubernetes
|
description: Gitea Helm chart for Kubernetes
|
||||||
type: application
|
type: application
|
||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
appVersion: 1.13.2
|
appVersion: 1.13.7
|
||||||
icon: https://docs.gitea.io/images/gitea.png
|
icon: https://docs.gitea.io/images/gitea.png
|
||||||
|
|
||||||
keywords:
|
keywords:
|
||||||
|
22
README.md
22
README.md
@ -5,12 +5,12 @@
|
|||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
This helm chart has taken some inspiration from <https://github.com/jfelten/gitea-helm-chart>
|
This helm chart has taken some inspiration from <https://github.com/jfelten/gitea-helm-chart>
|
||||||
But takes a completly different approach in providing database and cache with dependencies.
|
But takes a completely different approach in providing a database and cache with dependencies.
|
||||||
Also this chart provides LDAP and admin user configuration with values as well as it is deployed as statefulset to retain stored repositories.
|
Additionally, this chart provides LDAP and admin user configuration with values, as well as being deployed as a statefulset to retain stored repositories.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
Gitea can be run with external database and cache. This chart provides those dependencies, which can be
|
Gitea can be run with an external database and cache. This chart provides those dependencies, which can be
|
||||||
enabled, or disabled via [configuration](#configuration).
|
enabled, or disabled via [configuration](#configuration).
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
@ -36,7 +36,7 @@ Dependencies:
|
|||||||
|
|
||||||
### Gitea Configuration
|
### Gitea Configuration
|
||||||
|
|
||||||
Gitea offers lots of configuration. This is fully described in the [Gitea Cheat Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/).
|
Gitea offers lots of configuration options. This is fully described in the [Gitea Cheat Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
gitea:
|
gitea:
|
||||||
@ -58,7 +58,7 @@ INSTALL_LOCK is always set to true, since we want to configure gitea with this h
|
|||||||
|
|
||||||
#### Database defaults
|
#### 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:
|
If a builtIn database is enabled the database configuration is set automatically. For example, postgresql builtIn will appear in the app.ini as:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[database]
|
[database]
|
||||||
@ -71,7 +71,7 @@ USER = gitea
|
|||||||
|
|
||||||
#### Memcached defaults
|
#### 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:
|
Memcached is handled the exact same way as database builtIn. Once memcached builtIn is enabled, this chart will generate the following part in the app.ini:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[cache]
|
[cache]
|
||||||
@ -196,8 +196,8 @@ If the built in cache should not be used simply configure the cache in gitea.con
|
|||||||
### 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
|
||||||
everything else will be taken care of. The following example will create a PVC as a part of the statefulset. This PVC will not be deleted
|
everything else will be taken care of. The following example will create a PVC as a part of the statefulset. This PVC will not be deleted even if you uninstall the chart.
|
||||||
even if you uninstall the chart.
|
|
||||||
When using Postgresql as dependency, this will also be deployed as a statefulset by default.
|
When using Postgresql as dependency, this will also be deployed as a statefulset by default.
|
||||||
|
|
||||||
If you want to manage your own PVC you can simply pass the PVC name to the chart.
|
If you want to manage your own PVC you can simply pass the PVC name to the chart.
|
||||||
@ -246,7 +246,7 @@ You cannot use `admin` as username.
|
|||||||
|
|
||||||
### LDAP Settings
|
### LDAP Settings
|
||||||
|
|
||||||
Like the admin user the LDAP settings can be updated but also disabled or deleted.
|
Like the admin user the LDAP settings can be updated, but also disabled or deleted.
|
||||||
All LDAP values from <https://docs.gitea.io/en-us/command-line/#admin> are available.
|
All LDAP values from <https://docs.gitea.io/en-us/command-line/#admin> are available.
|
||||||
You can either use them in camel case or kebab case.
|
You can either use them in camel case or kebab case.
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ Annotations can be added to the Gitea pod.
|
|||||||
| Parameter | Description | Default |
|
| Parameter | Description | Default |
|
||||||
|---------------------|-----------------------------------|------------------------------|
|
|---------------------|-----------------------------------|------------------------------|
|
||||||
|image.repository| Image to start for this pod | gitea/gitea |
|
|image.repository| Image to start for this pod | gitea/gitea |
|
||||||
|image.tag| [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated) | 1.13.2 |
|
|image.tag| [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated) | 1.13.7 |
|
||||||
|image.pullPolicy| Image pull policy | Always |
|
|image.pullPolicy| Image pull policy | Always |
|
||||||
|
|
||||||
### Persistence
|
### Persistence
|
||||||
@ -472,7 +472,7 @@ The following parameters are the defaults set by this chart
|
|||||||
|
|
||||||
### Postgresql BuiltIn
|
### Postgresql BuiltIn
|
||||||
|
|
||||||
Postgresql is loaded as a dependency from bitnami. Configuration can be found from this [Bitnami](https://github.com/bitnami/charts/tree/master/bitnami/postgresql)
|
Postgresql is loaded as a dependency from Bitnami. The chart configuration can be found from this [Bitnami](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) repository.
|
||||||
|
|
||||||
The following parameters are the defaults set by this chart
|
The following parameters are the defaults set by this chart
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
|||||||
{{- printf "%s-mysql" .Release.Name -}}
|
{{- printf "%s-mysql" .Release.Name -}}
|
||||||
{{- else if .Values.gitea.database.builtIn.mariadb.enabled -}}
|
{{- else if .Values.gitea.database.builtIn.mariadb.enabled -}}
|
||||||
{{- printf "%s-mariadb" .Release.Name -}}
|
{{- printf "%s-mariadb" .Release.Name -}}
|
||||||
{{- else -}}
|
{{- else if ne .Values.gitea.config.database.DB_TYPE "sqlite3" -}}
|
||||||
{{- $parts := split ":" .Values.gitea.config.database.HOST -}}
|
{{- $parts := split ":" .Values.gitea.config.database.HOST -}}
|
||||||
{{- printf "%s %s" $parts._0 $parts._1 -}}
|
{{- printf "%s %s" $parts._0 $parts._1 -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -16,12 +16,15 @@ stringData:
|
|||||||
# END: initPreScript
|
# END: initPreScript
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
chown 1000:1000 /data
|
||||||
mkdir -p /data/git/.ssh
|
mkdir -p /data/git/.ssh
|
||||||
chmod -R 700 /data/git/.ssh
|
chmod -R 700 /data/git/.ssh
|
||||||
mkdir -p /data/gitea/conf
|
mkdir -p /data/gitea/conf
|
||||||
cp /etc/gitea/conf/app.ini /data/gitea/conf/app.ini
|
cp /etc/gitea/conf/app.ini /data/gitea/conf/app.ini
|
||||||
chmod a+rwx /data/gitea/conf/app.ini
|
chmod a+rwx /data/gitea/conf/app.ini
|
||||||
|
{{- if include "db.servicename" . }}
|
||||||
nc -v -w2 -z {{ include "db.servicename" . }} {{ include "db.port" . }} && \
|
nc -v -w2 -z {{ include "db.servicename" . }} {{ include "db.port" . }} && \
|
||||||
|
{{- end }}
|
||||||
su git -c ' \
|
su git -c ' \
|
||||||
set -x; \
|
set -x; \
|
||||||
gitea migrate; \
|
gitea migrate; \
|
||||||
|
@ -5,8 +5,8 @@ metadata:
|
|||||||
name: {{ include "gitea.fullname" . }}
|
name: {{ include "gitea.fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
{{- if .Values.metrics.serviceMonitor.prometheusSelector }}
|
{{- if .Values.gitea.metrics.serviceMonitor.prometheusSelector }}
|
||||||
prometheus: {{ .Values.metrics.serviceMonitor.prometheusSelector }}
|
prometheus: {{ .Values.gitea.metrics.serviceMonitor.prometheusSelector }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
|
@ -9,6 +9,9 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "gitea.selectorLabels" . | nindent 6 }}
|
{{- include "gitea.selectorLabels" . | nindent 6 }}
|
||||||
|
{{- if .Values.statefulset.labels }}
|
||||||
|
{{- toYaml .Values.statefulset.labels | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
serviceName: {{ include "gitea.fullname" . }}
|
serviceName: {{ include "gitea.fullname" . }}
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
@ -21,6 +24,9 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 8 }}
|
{{- include "gitea.labels" . | nindent 8 }}
|
||||||
|
{{- if .Values.statefulset.labels }}
|
||||||
|
{{- toYaml .Values.statefulset.labels | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
|
@ -8,7 +8,7 @@ clusterDomain: cluster.local
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
repository: gitea/gitea
|
repository: gitea/gitea
|
||||||
tag: 1.13.2
|
tag: 1.13.7
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
@ -69,6 +69,7 @@ statefulset:
|
|||||||
# - name: VARIABLE
|
# - name: VARIABLE
|
||||||
# value: my-value
|
# value: my-value
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 60
|
||||||
|
labels: {}
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
Reference in New Issue
Block a user