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 name: gitea
description: Gitea Helm chart for Kubernetes description: Gitea Helm chart for Kubernetes
type: application type: application
version: 1.5.5 version: 2.0.0
appVersion: 1.12.5 appVersion: 1.12.5
icon: https://docs.gitea.io/images/gitea.png icon: https://docs.gitea.io/images/gitea.png
@ -41,5 +41,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

View File

@ -336,8 +336,9 @@ The following parameters are the defaults set by this chart
| Parameter | Description | Default | | Parameter | Description | Default |
|---------------------|-----------------------------------|------------------------------| |---------------------|-----------------------------------|------------------------------|
|mariadb.db.user |Username of new user to create.|gitea| |mariadb.auth.username|Username of new user to create.|gitea|
|mariadb.db.password|Password for the new user. Ignored if existing secret is provided|gitea| |mariadb.auth.password|Password for the new user. Ignored if existing secret is provided|gitea|
|mariadb.db.name|Name for new database to create.|gitea| |mariadb.auth.database|Name for new database to create.|gitea|
|mariadb.service.port|Port to connect to mariadb service|3306| |mariadb.auth.rootPassword|Password for the root user.|gitea|
|mariadb.master.persistence.size|Persistence size for mysql |10Gi| |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 -}} {{- 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 -}}
@ -84,7 +84,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- 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.cluster.local:%g" .Release.Name .Release.Namespace .Values.mariadb.primary.service.port | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
{{- define "memcached.dns" -}} {{- define "memcached.dns" -}}

View File

@ -88,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 */ -}}

View File

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