Remove mysql and mariadb chart deps (#417)

As discussed in Discord.

Supersedes #412 and #407.

**⚠️ BREAKING**

Users depending on the built-in MySQL or MariaDB chart have to switch to an self-managed database, or Postgres

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/417
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io>
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Reviewed-by: yardenshoham <yardenshoham@noreply.gitea.io>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
This commit is contained in:
pat-s 2023-03-29 01:02:04 +08:00 committed by justusbunsi
parent 5cb0802b7b
commit ae9a71ea11
6 changed files with 13 additions and 110 deletions

View File

@ -131,8 +131,6 @@ MD044:
names:
- Gitea
- PostgreSQL
- MariaDB
- MySQL
- Memcached
- Prometheus
- Git

View File

@ -2,14 +2,8 @@ dependencies:
- name: memcached
repository: oci://registry-1.docker.io/bitnamicharts
version: 6.3.7
- name: mysql
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 6.14.10
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.2.6
- name: mariadb
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 9.3.6
digest: sha256:2115873999bfccaaa3308dd4cd374def696572938cc240079ea338b9d8fd9723
generated: "2023-03-27T10:04:33.619453+02:00"
digest: sha256:c2026881f71eca24c72e9da3e798a1ad2a5af8e86a39a5341015584eaacf8b64
generated: "2023-03-27T19:20:21.125036+02:00"

View File

@ -37,16 +37,7 @@ dependencies:
repository: oci://registry-1.docker.io/bitnamicharts
version: 6.3.7
condition: memcached.enabled
- name: mysql
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 6.14.10
condition: mysql.enabled
# Chart release date: 2023-02
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.2.6
condition: postgresql.enabled
- name: mariadb
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 9.3.6
condition: mariadb.enabled

View File

@ -37,8 +37,6 @@ Dependencies:
- PostgreSQL ([configuration](#postgresql))
- Memcached ([configuration](#memcached))
- MySQL ([configuration](#mysql))
- MariaDB ([configuration](#mariadb))
## Installing
@ -235,14 +233,17 @@ Priority (highest to lowest) for defining app.ini variables:
### External Database
An external Database can be used instead of builtIn PostgreSQL or MySQL.
Any external Database listed in [https://docs.gitea.io/en-us/database-prep/](https://docs.gitea.io/en-us/database-prep/) can be used instead of the built-in PostgreSQL.
In fact, it is **highly recommended** to use an external database to ensure a stable Gitea installation longterm.
If an external database is used, no matter which type, make sure to set `postgresql.enabled` to `false` to disable the use of the built-in PostgreSQL.
```yaml
gitea:
config:
database:
DB_TYPE: mysql
HOST: 127.0.0.1:3306
HOST: <mysql HOST>
NAME: gitea
USER: root
PASSWD: gitea
@ -380,16 +381,6 @@ postgresql:
existingClaim: MyAwesomeGiteaPostgresClaim
```
MySQL also handles persistence the same, even though it is not deployed as a statefulset.
You can interact with the postgres settings as displayed in the following example:
```yaml
mysql:
persistence:
enabled: true
existingClaim: MyAwesomeGiteaMysqlClaim
```
### Admin User
This chart enables you to create a default admin user. It is also possible to
@ -790,30 +781,6 @@ gitea:
| `postgresql.global.postgresql.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`) | `5432` |
| `postgresql.primary.persistence.size` | PVC Storage Request for PostgreSQL volume | `10Gi` |
### MySQL
| Name | Description | Value |
| ------------------------ | ------------------------------------------------------------------ | ------- |
| `mysql.enabled` | Enable MySQL | `false` |
| `mysql.root.password` | Password for the root user. Ignored if existing secret is provided | `gitea` |
| `mysql.db.user` | Username of new user to create. | `gitea` |
| `mysql.db.password` | Password for the new user.Ignored if existing secret is provided | `gitea` |
| `mysql.db.name` | Name for new database to create. | `gitea` |
| `mysql.service.port` | Port to connect to MySQL service | `3306` |
| `mysql.persistence.size` | PVC Storage Request for MySQL volume | `10Gi` |
### MariaDB
| Name | Description | Value |
| ---------------------------------- | ----------------------------------------------------------------- | ------- |
| `mariadb.enabled` | Enable MariaDB | `false` |
| `mariadb.auth.database` | Name of the database to create. | `gitea` |
| `mariadb.auth.username` | Username of the new user to create. | `gitea` |
| `mariadb.auth.password` | Password for the new user. Ignored if existing secret is provided | `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` |
### Advanced
| Name | Description | Value |
@ -836,6 +803,11 @@ Please read them carefully to upgrade successfully.
### To 8.0.0
#### Removal of MariaDB and MySQL DB chart dependencies
In this version support for DB chart dependencies of MySQL and MariaDB have been removed to simplify the maintenance of the helm chart.
External MySQL and MariaDB databases are still supported and will be in the future.
#### Postgres Update from v11 to v15
This Chart version updates the Postgres chart dependency and subsequently Postgres from v11 to v15.
@ -883,7 +855,7 @@ after the upgrade.
#### Enable Dependencies
The values to enable the dependencies,
such as PostgreSQL, Memcached, MySQL and MariaDB
such as PostgreSQL, Memcached, MySQL and MariaDB.
have been moved from `gitea.database.builtIn.` to the dependency values.
You can now enable the dependencies as followed:

View File

@ -95,14 +95,6 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.service.ports.postgresql -}}
{{- end -}}
{{- define "mysql.dns" -}}
{{- printf "%s-mysql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.mysql.service.port | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- define "mariadb.dns" -}}
{{- printf "%s-mariadb.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.mariadb.primary.service.port | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- define "memcached.dns" -}}
{{- printf "%s-memcached.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.memcached.service.port | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -443,50 +443,6 @@ postgresql:
persistence:
size: 10Gi
## @section MySQL
#
## @param mysql.enabled Enable MySQL
## @param mysql.root.password Password for the root user. Ignored if existing secret is provided
## @param mysql.db.user Username of new user to create.
## @param mysql.db.password Password for the new user.Ignored if existing secret is provided
## @param mysql.db.name Name for new database to create.
## @param mysql.service.port Port to connect to MySQL service
## @param mysql.persistence.size PVC Storage Request for MySQL volume
mysql:
enabled: false
root:
password: gitea
db:
user: gitea
password: gitea
name: gitea
service:
port: 3306
persistence:
size: 10Gi
## @section MariaDB
#
## @param mariadb.enabled Enable MariaDB
## @param mariadb.auth.database Name of the database to create.
## @param mariadb.auth.username Username of the new user to create.
## @param mariadb.auth.password Password for the new user. Ignored if existing secret is provided
## @param mariadb.auth.rootPassword Password for the root user.
## @param mariadb.primary.service.port Port to connect to MariaDB service
## @param mariadb.primary.persistence.size Persistence size for MariaDB
mariadb:
enabled: false
auth:
database: gitea
username: gitea
password: gitea
rootPassword: gitea
primary:
service:
port: 3306
persistence:
size: 10Gi
# By default, removed or moved settings that still remain in a user defined values.yaml will cause Helm to fail running the install/update.
# Set it to false to skip this basic validation check.
## @section Advanced