Update dependencies and add MariaDB builtIn (#33)
Update dependencies - Update Postgres version from 8.6.4 to 9.7.3 - Update Mysql version from 6.14.8 to 6.14.10 - Add MariaDB as built in dependency Co-authored-by: Lucas Hahn <lucas.hahn@novum-rgi.de> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/33 Reviewed-by: Jonas Franz <jonasfranz@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
4a618f245e
commit
0877cc81ca
10
Chart.yaml
10
Chart.yaml
@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: gitea
|
||||
description: Gitea Helm chart for Kubernetes
|
||||
type: application
|
||||
version: 1.5.1
|
||||
version: 1.5.2
|
||||
appVersion: 1.12.4
|
||||
icon: https://docs.gitea.io/images/gitea.png
|
||||
|
||||
@ -33,9 +33,13 @@ dependencies:
|
||||
condition: gitea.cache.builtIn.enabled
|
||||
- name: mysql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 6.14.8
|
||||
version: 6.14.10
|
||||
condition: gitea.database.builtIn.mysql.enabled
|
||||
- name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 8.6.4
|
||||
version: 9.7.3
|
||||
condition: gitea.database.builtIn.postgresql.enabled
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 7.10.2
|
||||
condition: gitea.database.builtIn.mariadb.enabled
|
@ -51,15 +51,13 @@ app.kubernetes.io/name: {{ include "gitea.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "postgresql.dns" -}}
|
||||
{{- printf "%s-postgresql.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.postgresql.global.postgresql.servicePort -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "db.servicename" -}}
|
||||
{{- if .Values.gitea.database.builtIn.postgresql.enabled -}}
|
||||
{{- printf "%s-postgresql" .Release.Name -}}
|
||||
{{- else if .Values.gitea.database.builtIn.mysql.enabled -}}
|
||||
{{- printf "%s-mysql" .Release.Name -}}
|
||||
{{- else if .Values.gitea.database.builtIn.mariadb.enabled -}}
|
||||
{{- printf "%s-mariadb" .Release.Name -}}
|
||||
{{- else -}}
|
||||
{{- $parts := split ":" .Values.gitea.config.database.HOST -}}
|
||||
{{- printf "%s %s" $parts._0 $parts._1 -}}
|
||||
@ -71,14 +69,24 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{ .Values.postgresql.global.postgresql.servicePort }}
|
||||
{{- else if .Values.gitea.database.builtIn.mysql.enabled -}}
|
||||
{{ .Values.mysql.service.port }}
|
||||
{{- else if .Values.gitea.database.builtIn.mariadb.enabled -}}
|
||||
{{ .Values.mariadb.service.port }}
|
||||
{{- else -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "postgresql.dns" -}}
|
||||
{{- printf "%s-postgresql.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.postgresql.global.postgresql.servicePort -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "mysql.dns" -}}
|
||||
{{- printf "%s-mysql.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.mysql.service.port | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "mariadb.dns" -}}
|
||||
{{- printf "%s-mariadb.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.mysql.service.port | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "memcached.dns" -}}
|
||||
{{- printf "%s-memcached.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.memcached.service.port | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
@ -80,6 +80,14 @@ stringData:
|
||||
{{- $_ := set .Values.gitea.config.database "NAME" .Values.mysql.db.name -}}
|
||||
{{- $_ := set .Values.gitea.config.database "USER" .Values.mysql.db.user -}}
|
||||
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.mysql.db.password -}}
|
||||
{{ else if .Values.gitea.database.builtIn.mariadb.enabled -}}
|
||||
{{- $_ := set .Values.gitea.config.database "DB_TYPE" "mysql" -}}
|
||||
{{- if not (.Values.gitea.config.database.HOST) -}}
|
||||
{{- $_ := set .Values.gitea.config.database "HOST" (include "mariadb.dns" .) -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set .Values.gitea.config.database "NAME" .Values.mariadb.db.name -}}
|
||||
{{- $_ := set .Values.gitea.config.database "USER" .Values.mariadb.db.user -}}
|
||||
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.mariadb.db.password -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* cache default settings */ -}}
|
||||
|
13
values.yaml
13
values.yaml
@ -106,6 +106,8 @@ gitea:
|
||||
enabled: true
|
||||
mysql:
|
||||
enabled: false
|
||||
mariadb:
|
||||
enabled: false
|
||||
|
||||
cache:
|
||||
builtIn:
|
||||
@ -136,3 +138,14 @@ mysql:
|
||||
port: 3306
|
||||
persistence:
|
||||
size: 10Gi
|
||||
|
||||
mariadb:
|
||||
db:
|
||||
name: gitea
|
||||
user: gitea
|
||||
password: gitea
|
||||
service:
|
||||
port: 3306
|
||||
master:
|
||||
persistence:
|
||||
size: 10Gi
|
Loading…
Reference in New Issue
Block a user