Remove mysql and mariadb chart deps #417
@ -131,8 +131,6 @@ MD044:
|
||||
names:
|
||||
- Gitea
|
||||
- PostgreSQL
|
||||
- MariaDB
|
||||
- MySQL
|
||||
- Memcached
|
||||
- Prometheus
|
||||
- Git
|
||||
|
10
Chart.lock
10
Chart.lock
@ -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: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||
version: 10.3.17
|
||||
- name: mariadb
|
||||
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||
version: 9.3.6
|
||||
digest: sha256:eb786e862718ddd8c66d66b0a7d3501bd7fbb3c8edef12a406c9544159971965
|
||||
generated: "2023-02-26T13:51:59.1429398+01:00"
|
||||
digest: sha256:64a01d4296ba5ab931fc1ca7d95f3fdf570cef1738432639a7a5278d87e5cca9
|
||||
generated: "2023-03-25T11:05:21.627487+01:00"
|
||||
|
@ -37,15 +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
|
||||
- name: postgresql
|
||||
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||
version: 10.3.17
|
||||
condition: postgresql.enabled
|
||||
- name: mariadb
|
||||
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||
version: 9.3.6
|
||||
condition: mariadb.enabled
|
||||
|
59
README.md
59
README.md
@ -37,8 +37,6 @@ Dependencies:
|
||||
|
||||
- PostgreSQL ([configuration](#postgresql))
|
||||
- Memcached ([configuration](#memcached))
|
||||
- MySQL ([configuration](#mysql))
|
||||
- MariaDB ([configuration](#mariadb))
|
||||
|
||||
## Installing
|
||||
|
||||
@ -235,14 +233,18 @@ 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.
|
||||
The built-in dependency is mainly for testing and development purposes.
|
||||
justusbunsi marked this conversation as resolved
Outdated
|
||||
|
||||
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
|
||||
@ -368,7 +370,7 @@ persistence:
|
||||
existingClaim: MyAwesomeGiteaClaim
|
||||
```
|
||||
|
||||
In case that peristence has been disabled it will simply use an empty dir volume.
|
||||
In case that persistence has been disabled it will simply use an empty dir volume.
|
||||
|
||||
PostgreSQL handles the persistence in the exact same way.
|
||||
You can interact with the postgres settings as displayed in the following example:
|
||||
@ -380,16 +382,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 +782,6 @@ gitea:
|
||||
| `postgresql.global.postgresql.servicePort` | PostgreSQL port (overrides service.port) | `5432` |
|
||||
| `postgresql.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 |
|
||||
@ -834,6 +802,11 @@ See [CONTRIBUTORS GUIDE](CONTRIBUTING.md) for details.
|
||||
This section lists major and breaking changes of each Helm Chart version.
|
||||
Please read them carefully to upgrade successfully.
|
||||
|
||||
### To 8.0.0
|
||||
|
||||
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.
|
||||
|
||||
### To 7.0.0
|
||||
|
||||
#### Gitea 1.18.1
|
||||
@ -877,7 +850,7 @@ after the upgrade.
|
||||
#### Enable Dependencies
|
||||
|
||||
The values to enable the dependencies,
|
||||
such as PostgreSQL, Memcached, MySQL and MariaDB
|
||||
such as PostgreSQL or Memcached.
|
||||
justusbunsi marked this conversation as resolved
Outdated
justusbunsi
commented
I don't think we should remove MySQL and MariaDB from older changelog entries. In those versions they are still valid. I don't think we should remove MySQL and MariaDB from older changelog entries. In those versions they are still valid.
|
||||
have been moved from `gitea.database.builtIn.` to the dependency values.
|
||||
|
||||
You can now enable the dependencies as followed:
|
||||
@ -888,12 +861,6 @@ memcached:
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
|
||||
mysql:
|
||||
justusbunsi marked this conversation as resolved
Outdated
justusbunsi
commented
I don't think we should remove MySQL and MariaDB from older changelog entries. In those versions they are still valid. I don't think we should remove MySQL and MariaDB from older changelog entries. In those versions they are still valid.
pat-s
commented
Agreed! Agreed!
|
||||
enabled: false
|
||||
|
||||
mariadb:
|
||||
enabled: false
|
||||
```
|
||||
|
||||
#### App.ini generation
|
||||
|
@ -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.servicePort -}}
|
||||
{{- 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 -}}
|
||||
@ -295,23 +287,6 @@ https
|
||||
{{- $_ := set .Values.gitea.config.database "NAME" .Values.postgresql.global.postgresql.postgresqlDatabase -}}
|
||||
{{- $_ := set .Values.gitea.config.database "USER" .Values.postgresql.global.postgresql.postgresqlUsername -}}
|
||||
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.postgresql.global.postgresql.postgresqlPassword -}}
|
||||
{{- else if .Values.mysql.enabled -}}
|
||||
{{- $_ := set .Values.gitea.config.database "DB_TYPE" "mysql" -}}
|
||||
{{- if not (.Values.gitea.config.database.HOST) -}}
|
||||
{{- $_ := set .Values.gitea.config.database "HOST" (include "mysql.dns" .) -}}
|
||||
{{- end -}}
|
||||
{{- $_ := 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.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.auth.database -}}
|
||||
{{- $_ := set .Values.gitea.config.database "USER" .Values.mariadb.auth.username -}}
|
||||
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.mariadb.auth.password -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gitea.init-additional-mounts" -}}
|
||||
|
44
values.yaml
44
values.yaml
@ -440,50 +440,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
|
||||
|
Loading…
Reference in New Issue
Block a user
While I agree with the recommendation to use an external database for a longterm stable Gitea installation, I don't agree that the built-in dependency is mainly for testing an development purposes. If that would be the case, we wouldn't release the dependency but instead have it located somewhere in a
testing
folder or similar to boostrap the dev environment with it.If users decide to rely on the built-in database, they can do so by accepting all the changes we make - e.g. updating. That is totally fine in my opinion.
Fair point! I removed the respective sentence.