Commit new Chart releases for TrueCharts

Signed-off-by: TrueCharts-Bot <bot@truecharts.org>
This commit is contained in:
TrueCharts-Bot 2022-12-02 10:56:31 +00:00
parent 7bfef10fe7
commit ab68c8146f
14 changed files with 2702 additions and 0 deletions

View File

@ -0,0 +1,99 @@
**Important:**
*for the complete changelog, please refer to the website*
## [gitea-12.0.9](https://github.com/truecharts/charts/compare/gitea-12.0.8...gitea-12.0.9) (2022-12-02)
### Fix
- default to nodeIP for DOMAIN and ROOT_URL ([#5003](https://github.com/truecharts/charts/issues/5003))
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.8](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.8) (2022-11-30)
## [gitea-12.0.7](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.7) (2022-11-29)
## [gitea-12.0.7](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.7) (2022-11-29)
## [gitea-12.0.7](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.7) (2022-11-29)
## [gitea-12.0.7](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.7) (2022-11-29)
## [gitea-12.0.7](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.7) (2022-11-29)
## [gitea-12.0.7](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.7) (2022-11-29)
## [gitea-12.0.7](https://github.com/truecharts/charts/compare/gitea-12.0.6...gitea-12.0.7) (2022-11-29)

View File

@ -0,0 +1,43 @@
apiVersion: v2
appVersion: "1.17.3"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 11.0.4
- condition: postgresql.enabled
name: postgresql
repository: https://charts.truecharts.org/
version: 11.0.5
- condition: memcached.enabled
name: memcached
repository: https://charts.truecharts.org/
version: 5.0.6
deprecated: false
description: Self hosted GIT repositories
home: https://truecharts.org/docs/charts/stable/gitea
icon: https://truecharts.org/img/hotlink-ok/chart-icons/gitea.png
keywords:
- git
- issue tracker
- code review
- wiki
- gitea
- gogs
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: gitea
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/gitea
- https://gitea.com/gitea/helm-chart
- https://github.com/go-gitea/gitea
- https://hub.docker.com/r/gitea/gitea/
type: application
version: 12.0.9
annotations:
truecharts.org/catagories: |
- GIT
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U

View File

@ -0,0 +1,110 @@
# gitea
Self hosted GIT repositories
TrueCharts can be installed as both *normal* Helm Charts or as Apps on TrueNAS SCALE.
This readme is just an automatically generated general guide on installing our Helm Charts and Apps.
For more information, please click here: [gitea](https://truecharts.org/docs/charts/stable/gitea)
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)**
## Source Code
* <https://github.com/truecharts/charts/tree/master/charts/stable/gitea>
* <https://gitea.com/gitea/helm-chart>
* <https://github.com/go-gitea/gitea>
* <https://hub.docker.com/r/gitea/gitea/>
## Requirements
Kubernetes: `>=1.16.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
| https://charts.truecharts.org/ | memcached | 3.0.120 |
| https://charts.truecharts.org/ | postgresql | 8.0.122 |
| https://library-charts.truecharts.org | common | 10.9.4 |
## Installing the Chart
### TrueNAS SCALE
To install this Chart on TrueNAS SCALE check our [Quick-Start Guide](https://truecharts.org/docs/manual/SCALE%20Apps/Installing-an-App).
### Helm
To install the chart with the release name `gitea`
```console
helm repo add TrueCharts https://charts.truecharts.org
helm repo update
helm install gitea TrueCharts/gitea
```
## Uninstall
### TrueNAS SCALE
**Upgrading, Rolling Back and Uninstalling the Chart**
To upgrade, rollback or delete this Chart from TrueNAS SCALE check our [Quick-Start Guide](https://truecharts.org/docs/manual/SCALE%20Apps/Upgrade-rollback-delete-an-App).
### Helm
To uninstall the `gitea` deployment
```console
helm uninstall gitea
```
## Configuration
### Helm
#### Available Settings
Read through the values.yaml file. It has several commented out suggested values.
Other values may be used from the [values.yaml](https://github.com/truecharts/library-charts/tree/main/charts/stable/common/values.yaml) from the [common library](https://github.com/truecharts/library-charts/tree/main/charts/common).
#### Configure using the command line
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
```console
helm install gitea \
--set env.TZ="America/New York" \
TrueCharts/gitea
```
#### Configure using a yaml file
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
```console
helm install gitea TrueCharts/gitea -f values.yaml
```
#### Connecting to other charts
If you need to connect this Chart to other Charts on TrueNAS SCALE, please refer to our [Linking Charts Internally](https://truecharts.org/docs/manual/SCALE%20Apps/linking-apps) quick-start guide.
## Support
- Please check our [quick-start guides for TrueNAS SCALE](https://truecharts.org/docs/manual/SCALE%20Apps/Important-MUST-READ).
- See the [Website](https://truecharts.org)
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
- Open a [issue](https://github.com/truecharts/apps/issues/new/choose)
---
## Sponsor TrueCharts
TrueCharts can only exist due to the incredible effort of our staff.
Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can!
---
All Rights Reserved - The TrueCharts Project

View File

@ -0,0 +1,9 @@
## [gitea-12.0.9](https://github.com/truecharts/charts/compare/gitea-12.0.8...gitea-12.0.9) (2022-12-02)
### Fix
- default to nodeIP for DOMAIN and ROOT_URL ([#5003](https://github.com/truecharts/charts/issues/5003))

View File

@ -0,0 +1,8 @@
Self hosted GIT repositories
This App is supplied by TrueCharts, for more information visit the manual: [https://truecharts.org/docs/charts/stable/gitea](https://truecharts.org/docs/charts/stable/gitea)
---
TrueCharts can only exist due to the incredible effort of our staff.
Please consider making a [donation](https://truecharts.org/docs/about/sponsor) or contributing back to the project any way you can!

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,145 @@
image:
repository: tccr.io/truecharts/gitea
tag: 1.17.3@sha256:04cac022cb72cfaaf65aca0c0aaf160c1f625c649d36842ced438d746653de0b
pullPolicy: IfNotPresent
podSecurityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
service:
main:
ports:
main:
port: 10037
targetPort: 3000
ssh:
enabled: true
ports:
ssh:
enabled: true
port: 2222
targetPort: 2222
envFrom:
- configMapRef:
name: gitea-env
initContainers:
1-init-directories:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command: ["/usr/sbin/init_directory_structure.sh"]
securityContext:
runAsUser: 0
runAsNonRoot: false
envFrom:
- configMapRef:
name: gitea-env
volumeMounts:
- name: init
mountPath: "/usr/sbin"
- name: temp
mountPath: "/tmp"
- name: config
mountPath: "/etc/gitea/conf"
- name: data
mountPath: "/data"
2-configure-gitea:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command: ["/usr/sbin/configure_gitea.sh"]
envFrom:
- configMapRef:
name: gitea-env
volumeMounts:
- name: init
mountPath: "/usr/sbin"
- name: temp
mountPath: "/tmp"
- name: data
mountPath: "/data"
persistence:
data:
enabled: true
mountPath: "/data"
temp:
enabled: true
mountPath: "/tmp"
type: emptyDir
varlib:
enabled: true
mountPath: "/var/lib/gitea"
type: emptyDir
# Configure commit/action signing prerequisites
signing:
enabled: true
gpgHome: /data/git/.gnupg
admin:
username: giteaadmin
password: r8sA8CPHD9!bt6d
email: "gitea@local.domain"
metrics:
enabled: false
serviceMonitor:
enabled: false
# additionalLabels:
# prometheus-release: prom1
ldap:
enabled: false
# name:
# securityProtocol:
# host:
# port:
# userSearchBase:
# userFilter:
# adminFilter:
# emailAttribute:
# bindDn:
# bindPassword:
# usernameAttribute:
# sshPublicKeyAttribute:
oauth:
enabled: false
# name:
# provider:
# key:
# secret:
# autoDiscoverUrl:
# useCustomUrls:
# customAuthUrl:
# customTokenUrl:
# customProfileUrl:
# customEmailUrl:
config:
APP_NAME: "Gitea: Git with a cup of tea"
RUN_MODE: dev
ALLOWED_HOST_LIST: "127.0.0.1"
nodeIP: 127.0.0.1
customConfig:
[]
# - name: test
# keys:
# - name: testkey
# value: testvalue
# Enabled postgres
postgresql:
enabled: true
existingSecret: "dbcreds"
postgresqlUsername: gitea
postgresqlDatabase: gitea
# -- memcached dependency settings
memcached:
enabled: true
portal:
enabled: true

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
{{/* Define the configmap */}}
{{- define "gitea.configmap" -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: gitea-env
data:
GITEA_APP_INI: "/data/gitea/conf/app.ini"
GITEA_CUSTOM: "/data/gitea"
GITEA_WORK_DIR: "/data"
GITEA_TEMP: "/tmp/gitea"
GITEA_ADMIN_USERNAME: {{ .Values.admin.username }}
GITEA_ADMIN_PASSWORD: {{ .Values.admin.password }}
SSH_PORT: {{ .Values.service.ssh.ports.ssh.port | quote }}
SSH_LISTEN_PORT: {{ .Values.service.ssh.ports.ssh.targetPort | quote }}
TMPDIR: "/tmp/gitea"
GNUPGHOME: "/data/git/.gnupg"
{{- end -}}

View File

@ -0,0 +1,246 @@
{{/* Define the secrets */}}
{{- define "gitea.secrets" -}}
---
{{ $DOMAIN := .Values.config.nodeIP | quote -}}
{{ $URL := (printf "http://%s/" .Values.config.nodeIP) }}
{{- if and (.Values.ingress.main.enabled) (gt (len .Values.ingress.main.hosts) 0) -}}
{{- $DOMAIN = (index .Values.ingress.main.hosts 0).host -}}
{{- $URL = (printf "https://%s/" (index .Values.ingress.main.hosts 0).host) -}}
{{- end -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "tc.common.names.fullname" . }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
type: Opaque
stringData:
app.ini: |-
APP_NAME = {{ .Values.config.APP_NAME }}
RUN_MODE = {{ .Values.config.RUN_MODE }}
[cache]
ADAPTER = memcache
ENABLED = true
HOST = {{ printf "%v-%v:%v" .Release.Name "memcached" "11211" }}
{{- range $catindex, $catvalue := .Values.customConfig }}
{{- if eq $catvalue.name "cache" }}
{{- range $index, $value := $catvalue.keys }}
{{ $value.name }} = {{ $value.value }}
{{- end }}
{{- end }}
{{- end }}
[database]
DB_TYPE = postgres
HOST = {{ printf "%v-%v:%v" .Release.Name "postgresql" "5432" }}
NAME = {{ .Values.postgresql.postgresqlDatabase }}
PASSWD = {{ .Values.postgresql.postgresqlPassword }}
USER = {{ .Values.postgresql.postgresqlUsername }}
{{- range $catindex, $catvalue := .Values.customConfig }}
{{- if eq $catvalue.name "database" }}
{{- range $index, $value := $catvalue.keys }}
{{ $value.name }} = {{ $value.value }}
{{- end }}
{{- end }}
{{- end }}
[metrics]
ENABLED = {{ .Values.metrics.enabled }}
{{- range $catindex, $catvalue := .Values.customConfig }}
{{- if eq $catvalue.name "metrics" }}
{{- range $index, $value := $catvalue.keys }}
{{ $value.name }} = {{ $value.value }}
{{- end }}
{{- end }}
{{- end }}
[repository]
ROOT = /data/git/gitea-repositories
{{- range $catindex, $catvalue := .Values.customConfig }}
{{- if eq $catvalue.name "repository" }}
{{- range $index, $value := $catvalue.keys }}
{{ $value.name }} = {{ $value.value }}
{{- end }}
{{- end }}
{{- end }}
[security]
INSTALL_LOCK = true
{{- range $catindex, $catvalue := .Values.customConfig }}
{{- if eq $catvalue.name "security" }}
{{- range $index, $value := $catvalue.keys }}
{{ $value.name }} = {{ $value.value }}
{{- end }}
{{- end }}
{{- end }}
[webhook]
ALLOWED_HOST_LIST = {{ .Values.config.ALLOWED_HOST_LIST }}
[server]
APP_DATA_PATH = /data
DOMAIN = {{ $DOMAIN }}
ENABLE_PPROF = false
HTTP_PORT = {{ .Values.service.main.ports.main.targetPort }}
PROTOCOL = http
ROOT_URL = {{ $URL }}
SSH_DOMAIN = {{ $DOMAIN }}
SSH_LISTEN_PORT = {{ .Values.service.ssh.ports.ssh.targetPort }}
SSH_PORT = {{ .Values.service.ssh.ports.ssh.port }}
START_SSH_SERVER = true
{{- range $catindex, $catvalue := .Values.customConfig }}
{{- if eq $catvalue.name "server" }}
{{- range $index, $value := $catvalue.keys }}
{{ $value.name }} = {{ $value.value }}
{{- end }}
{{- end }}
{{- end }}
{{- range $catindex, $catvalue := .Values.customConfig }}
{{- if not ( or ( eq $catvalue.name "server" ) ( eq $catvalue.name "server" ) ( eq $catvalue.name "security" ) ( eq $catvalue.name "repository" ) ( eq $catvalue.name "metrics" ) ( eq $catvalue.name "database" ) ( eq $catvalue.name "cache" ) ) }}
[{{ $catvalue.name }}]
{{- range $index, $value := $catvalue.keys }}
{{ $value.name }} = {{ $value.value }}
{{- end }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "tc.common.names.fullname" . }}-init
labels:
{{- include "tc.common.labels" . | nindent 4 }}
type: Opaque
stringData:
init_directory_structure.sh: |-
#!/usr/bin/env bash
set -euo pipefail
{{- if .Values.initPreScript }}
# BEGIN: initPreScript
{{- with .Values.initPreScript -}}
{{ . | nindent 4}}
{{- end -}}
# END: initPreScript
{{- end }}
set -x
mkdir -p /data/git/.ssh
chmod -R 700 /data/git/.ssh
[ ! -d /data/gitea ] && mkdir -p /data/gitea/conf
# prepare temp directory structure
mkdir -p "${GITEA_TEMP}"
chown -Rf {{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} "${GITEA_TEMP}"
chmod ug+rwx "${GITEA_TEMP}"
# Copy config file to writable volume
cp /etc/gitea/conf/app.ini /data/gitea/conf/app.ini
chown -Rf {{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} "/data"
chmod a+rwx /data/gitea/conf/app.ini
# Patch dockercontainer for dynamic users
chown -Rf {{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} "/var/lib/gitea"
configure_gitea.sh: |-
#!/usr/bin/env bash
set -euo pipefail
# Connection retry inspired by https://gist.github.com/dublx/e99ea94858c07d2ca6de
function test_db_connection() {
local RETRY=0
local MAX=30
echo 'Wait for database to become avialable...'
until [ "${RETRY}" -ge "${MAX}" ]; do
nc -vz -w2 {{ printf "%v-%v" .Release.Name "postgresql" }} 5432 && break
RETRY=$[${RETRY}+1]
echo "...not ready yet (${RETRY}/${MAX})"
done
if [ "${RETRY}" -ge "${MAX}" ]; then
echo "Database not reachable after '${MAX}' attempts!"
exit 1
fi
}
test_db_connection
echo '==== BEGIN GITEA MIGRATION ===='
gitea migrate
echo '==== BEGIN GITEA CONFIGURATION ===='
{{- if or .Values.admin.existingSecret (and .Values.admin.username .Values.admin.password) }}
function configure_admin_user() {
local ACCOUNT_ID=$(gitea admin user list --admin | grep -e "\s\+${GITEA_ADMIN_USERNAME}\|{{ .Values.admin.email }}\s\+" | awk -F " " "{printf \$1}")
if [[ -z "${ACCOUNT_ID}" ]]; then
echo "No admin user '${GITEA_ADMIN_USERNAME}' found, neither email '{{ .Values.admin.email }}' is assigned to an admin. Creating now..."
gitea admin user create --admin --username "${GITEA_ADMIN_USERNAME}" --password "${GITEA_ADMIN_PASSWORD}" --email {{ .Values.admin.email | quote }} --must-change-password=false
echo '...created.'
else
echo "Admin account '${GITEA_ADMIN_USERNAME}' or email {{ .Values.admin.email }} already exist. Running update to sync password..."
gitea admin user change-password --username "${GITEA_ADMIN_USERNAME}" --password "${GITEA_ADMIN_PASSWORD}"
echo '...password sync done.'
fi
}
configure_admin_user
{{- end }}
{{- if .Values.ldap.enabled }}
function configure_ldap() {
local LDAP_NAME={{ (printf "%s" .Values.ldap.name) | squote }}
local GITEA_AUTH_ID=$(gitea admin auth list --vertical-bars | grep -E "\|${LDAP_NAME}\s+\|" | grep -iE '\|LDAP \(via BindDN\)\s+\|' | awk -F " " "{print \$1}")
if [[ -z "${GITEA_AUTH_ID}" ]]; then
echo "No ldap configuration found with name '${LDAP_NAME}'. Installing it now..."
gitea admin auth add-ldap {{- include "gitea.ldap_settings" . | indent 1 }}
echo '...installed.'
else
echo "Existing ldap configuration with name '${LDAP_NAME}': '${GITEA_AUTH_ID}'. Running update to sync settings..."
gitea admin auth update-ldap --id "${GITEA_AUTH_ID}" {{- include "gitea.ldap_settings" . | indent 1 }}
echo '...sync settings done.'
fi
}
configure_ldap
{{- end }}
{{- if .Values.oauth.enabled }}
function configure_oauth() {
local OAUTH_NAME={{ (printf "%s" .Values.oauth.name) | squote }}
local AUTH_ID=$(gitea admin auth list --vertical-bars | grep -E "\|${OAUTH_NAME}\s+\|" | grep -iE '\|OAuth2\s+\|' | awk -F " " "{print \$1}")
if [[ -z "${AUTH_ID}" ]]; then
echo "No oauth configuration found with name '${OAUTH_NAME}'. Installing it now..."
gitea admin auth add-oauth {{- include "gitea.oauth_settings" . | indent 1 }}
echo '...installed.'
else
echo "Existing oauth configuration with name '${OAUTH_NAME}': '${AUTH_ID}'. Running update to sync settings..."
gitea admin auth update-oauth --id "${AUTH_ID}" {{- include "gitea.oauth_settings" . | indent 1 }}
echo '...sync settings done.'
fi
}
configure_oauth
{{- end }}
echo '==== END GITEA CONFIGURATION ===='
{{- end -}}

View File

@ -0,0 +1,38 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{/* Render secrets for gitea */}}
{{- include "gitea.secrets" . }}
{{/* Render configmap for gitea */}}
{{- include "gitea.configmap" . }}
{{/* Append the general secret volumes to the volumes */}}
{{- define "gitea.initvolume" -}}
enabled: "true"
mountPath: "/secrets/ini"
readOnly: true
type: "custom"
volumeSpec:
secret:
secretName: {{ include "tc.common.names.fullname" . }}-init
defaultMode: 0777
{{- end -}}
{{/* Append the general secret volumes to the volumes */}}
{{- define "gitea.configvolume" -}}
enabled: "true"
mountPath: "/secrets/config"
readOnly: true
type: "custom"
volumeSpec:
secret:
secretName: {{ include "tc.common.names.fullname" . }}
{{- end -}}
{{- $_ := set .Values.persistence "init" (include "gitea.initvolume" . | fromYaml) -}}
{{- $_ := set .Values.persistence "config" (include "gitea.configvolume" . | fromYaml) -}}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}

View File