Upgrade mariadb Helm chart to 8.0.0 (#48)

Upgrade mariadb Helm chart to 8.0.0

The names of the values changed in the new Helm chart, see [1]. Thus the
Helm chart ships breaking changes and therefore bump the major version
of this Chart.yaml (not sure if you use semver?)

Furthermore, there is a bug [2] where not setting the root password
results in the mariadb entering a CrashLoopBackOff when re-installing
it. Thus set it (as done in the mysql values already).

[1] 1206942b69
[2] https://github.com/bitnami/charts/issues/3884

Co-authored-by: Andre Schröder <andre.schroedr@gmail.com>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/48
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Co-Authored-By: schra <schra@noreply.gitea.io>
Co-Committed-By: schra <schra@noreply.gitea.io>
This commit is contained in:
schra 2020-10-22 13:13:37 +08:00 committed by Lunny Xiao
parent fc9c49179f
commit a4e5943ca5
5 changed files with 20 additions and 18 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: gitea
description: Gitea Helm chart for Kubernetes
type: application
version: 1.5.5
version: 2.0.0
appVersion: 1.12.5
icon: https://docs.gitea.io/images/gitea.png
@ -41,5 +41,5 @@ dependencies:
condition: gitea.database.builtIn.postgresql.enabled
- name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 7.10.2
version: 8.0.0
condition: gitea.database.builtIn.mariadb.enabled

View File

@ -336,8 +336,9 @@ The following parameters are the defaults set by this chart
| Parameter | Description | Default |
|---------------------|-----------------------------------|------------------------------|
|mariadb.db.user |Username of new user to create.|gitea|
|mariadb.db.password|Password for the new user. Ignored if existing secret is provided|gitea|
|mariadb.db.name|Name for new database to create.|gitea|
|mariadb.service.port|Port to connect to mariadb service|3306|
|mariadb.master.persistence.size|Persistence size for mysql |10Gi|
|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|

View File

@ -70,7 +70,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- else if .Values.gitea.database.builtIn.mysql.enabled -}}
{{ .Values.mysql.service.port }}
{{- else if .Values.gitea.database.builtIn.mariadb.enabled -}}
{{ .Values.mariadb.service.port }}
{{ .Values.mariadb.primary.service.port }}
{{- else -}}
{{- end -}}
{{- end -}}
@ -84,7 +84,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{- 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.cluster.local:%g" .Release.Name .Release.Namespace .Values.mariadb.primary.service.port | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- define "memcached.dns" -}}

View File

@ -88,9 +88,9 @@ stringData:
{{- 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 -}}
{{- $_ := set .Values.gitea.config.database "NAME" .Values.mariadb.auth.database -}}
{{- $_ := set .Values.gitea.config.database "USER" .Values.mariadb.auth.username -}}
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.mariadb.auth.password -}}
{{- end -}}
{{- /* cache default settings */ -}}

View File

@ -140,12 +140,13 @@ mysql:
size: 10Gi
mariadb:
db:
name: gitea
user: gitea
auth:
database: gitea
username: gitea
password: gitea
service:
port: 3306
master:
rootPassword: gitea
primary:
service:
port: 3306
persistence:
size: 10Gi