[Breaking] Bump postgres chart to latest release (#391)

See discussion in #387

Upgrade notes to Chart v11.x and Postgres 14.x: https://docs.bitnami.com/kubernetes/infrastructure/postgresql/administration/upgrade/

The current version in Gitea is using `11.11.0-debian-10-r62` from 2021-04.

Bumping the chart to the latest (v12.x) would use the image `15.2.0-debian-11-r14` which would be a jump from postgres 11 to postgres 15. There are no specific notes for the v12.x chart release, hence we might be able to just go to 12.x directly.

There have been some param renamings which I've reflected in the README.

**⚠️ BREAKING**

Users have to migrate their Postgres DB by e.g. restoring a previously created database dump into a clean installation.

Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/391
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io>
Reviewed-by: justusbunsi <justusbunsi@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-28 01:12:29 +08:00 committed by pat-s
parent fdac9e9048
commit 5cb0802b7b
5 changed files with 45 additions and 35 deletions

View File

@ -6,10 +6,10 @@ dependencies:
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 6.14.10 version: 6.14.10
- name: postgresql - name: postgresql
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami repository: oci://registry-1.docker.io/bitnamicharts
version: 10.3.17 version: 12.2.6
- name: mariadb - name: mariadb
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 9.3.6 version: 9.3.6
digest: sha256:eb786e862718ddd8c66d66b0a7d3501bd7fbb3c8edef12a406c9544159971965 digest: sha256:2115873999bfccaaa3308dd4cd374def696572938cc240079ea338b9d8fd9723
generated: "2023-02-26T13:51:59.1429398+01:00" generated: "2023-03-27T10:04:33.619453+02:00"

View File

@ -41,9 +41,10 @@ dependencies:
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 6.14.10 version: 6.14.10
condition: mysql.enabled condition: mysql.enabled
# Chart release date: 2023-02
- name: postgresql - name: postgresql
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami repository: oci://registry-1.docker.io/bitnamicharts
version: 10.3.17 version: 12.2.6
condition: postgresql.enabled condition: postgresql.enabled
- name: mariadb - name: mariadb
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami

View File

@ -368,7 +368,7 @@ persistence:
existingClaim: MyAwesomeGiteaClaim 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. PostgreSQL handles the persistence in the exact same way.
You can interact with the postgres settings as displayed in the following example: You can interact with the postgres settings as displayed in the following example:
@ -782,13 +782,13 @@ gitea:
### PostgreSQL ### PostgreSQL
| Name | Description | Value | | Name | Description | Value |
| ------------------------------------------------- | -------------------------------------------------------- | ------- | | ------------------------------------------------------- | ---------------------------------------------------------------- | ------- |
| `postgresql.enabled` | Enable PostgreSQL | `true` | | `postgresql.enabled` | Enable PostgreSQL | `true` |
| `postgresql.global.postgresql.postgresqlDatabase` | PostgreSQL database (overrides postgresqlDatabase) | `gitea` | | `postgresql.global.postgresql.auth.password` | Password for the "Gitea" user (overrides `auth.password`) | `gitea` |
| `postgresql.global.postgresql.postgresqlUsername` | PostgreSQL username (overrides postgresqlUsername) | `gitea` | | `postgresql.global.postgresql.auth.database` | Name for a custom database to create (overrides `auth.database`) | `gitea` |
| `postgresql.global.postgresql.postgresqlPassword` | PostgreSQL admin password (overrides postgresqlPassword) | `gitea` | | `postgresql.global.postgresql.auth.username` | Name for a custom user to create (overrides `auth.username`) | `gitea` |
| `postgresql.global.postgresql.servicePort` | PostgreSQL port (overrides service.port) | `5432` | | `postgresql.global.postgresql.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`) | `5432` |
| `postgresql.persistence.size` | PVC Storage Request for PostgreSQL volume | `10Gi` | | `postgresql.primary.persistence.size` | PVC Storage Request for PostgreSQL volume | `10Gi` |
### MySQL ### MySQL
@ -834,12 +834,18 @@ See [CONTRIBUTORS GUIDE](CONTRIBUTING.md) for details.
This section lists major and breaking changes of each Helm Chart version. This section lists major and breaking changes of each Helm Chart version.
Please read them carefully to upgrade successfully. Please read them carefully to upgrade successfully.
### To 8.0.0
#### Postgres Update from v11 to v15
This Chart version updates the Postgres chart dependency and subsequently Postgres from v11 to v15.
Please read the [Postgres Release Notes](https://www.postgresql.org/docs/release/) for version-specific changes.
With respect to `values.yaml`, parameters `username`, `database` and `password` have been regrouped under `auth` and slightly renamed.
`persistence` has also been regrouped under the `primary` key.
Please adjust your `values.yaml` accordingly.
### To 7.0.0 ### To 7.0.0
#### Gitea 1.18.1
This Chart version updates Gitea to 1.18.1. Don't miss any application related [breaking changes of 1.18.0](https://blog.gitea.io/2022/12/gitea-1.18.0-is-released/#breaking-changes).
#### Private GPG key configuration for Gitea signing actions #### Private GPG key configuration for Gitea signing actions
Having `signing.enabled=true` now requires to use either `signing.privateKey` or `signing.existingSecret` so that the Chart can automatically prepare the GPG key for Gitea internal signing actions. Having `signing.enabled=true` now requires to use either `signing.privateKey` or `signing.existingSecret` so that the Chart can automatically prepare the GPG key for Gitea internal signing actions.

View File

@ -92,7 +92,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}} {{- end -}}
{{- define "postgresql.dns" -}} {{- define "postgresql.dns" -}}
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.servicePort -}} {{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.service.ports.postgresql -}}
{{- end -}} {{- end -}}
{{- define "mysql.dns" -}} {{- define "mysql.dns" -}}
@ -292,9 +292,9 @@ https
{{- if not (.Values.gitea.config.database.HOST) -}} {{- if not (.Values.gitea.config.database.HOST) -}}
{{- $_ := set .Values.gitea.config.database "HOST" (include "postgresql.dns" .) -}} {{- $_ := set .Values.gitea.config.database "HOST" (include "postgresql.dns" .) -}}
{{- end -}} {{- end -}}
{{- $_ := set .Values.gitea.config.database "NAME" .Values.postgresql.global.postgresql.postgresqlDatabase -}} {{- $_ := set .Values.gitea.config.database "NAME" .Values.postgresql.global.postgresql.auth.database -}}
{{- $_ := set .Values.gitea.config.database "USER" .Values.postgresql.global.postgresql.postgresqlUsername -}} {{- $_ := set .Values.gitea.config.database "USER" .Values.postgresql.global.postgresql.auth.username -}}
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.postgresql.global.postgresql.postgresqlPassword -}} {{- $_ := set .Values.gitea.config.database "PASSWD" .Values.postgresql.global.postgresql.auth.password -}}
{{- else if .Values.mysql.enabled -}} {{- else if .Values.mysql.enabled -}}
{{- $_ := set .Values.gitea.config.database "DB_TYPE" "mysql" -}} {{- $_ := set .Values.gitea.config.database "DB_TYPE" "mysql" -}}
{{- if not (.Values.gitea.config.database.HOST) -}} {{- if not (.Values.gitea.config.database.HOST) -}}

View File

@ -125,7 +125,6 @@ service:
loadBalancerSourceRanges: [] loadBalancerSourceRanges: []
annotations: {} annotations: {}
## @section Ingress ## @section Ingress
## @param ingress.enabled Enable ingress ## @param ingress.enabled Enable ingress
## @param ingress.className Ingress class name ## @param ingress.className Ingress class name
@ -424,19 +423,23 @@ memcached:
## @section PostgreSQL ## @section PostgreSQL
# #
## @param postgresql.enabled Enable PostgreSQL ## @param postgresql.enabled Enable PostgreSQL
## @param postgresql.global.postgresql.postgresqlDatabase PostgreSQL database (overrides postgresqlDatabase) ## @param postgresql.global.postgresql.auth.password Password for the "gitea" user (overrides `auth.password`)
## @param postgresql.global.postgresql.postgresqlUsername PostgreSQL username (overrides postgresqlUsername) ## @param postgresql.global.postgresql.auth.database Name for a custom database to create (overrides `auth.database`)
## @param postgresql.global.postgresql.postgresqlPassword PostgreSQL admin password (overrides postgresqlPassword) ## @param postgresql.global.postgresql.auth.username Name for a custom user to create (overrides `auth.username`)
## @param postgresql.global.postgresql.servicePort PostgreSQL port (overrides service.port) ## @param postgresql.global.postgresql.service.ports.postgresql PostgreSQL service port (overrides `service.ports.postgresql`)
## @param postgresql.persistence.size PVC Storage Request for PostgreSQL volume ## @param postgresql.primary.persistence.size PVC Storage Request for PostgreSQL volume
postgresql: postgresql:
enabled: true enabled: true
global: global:
postgresql: postgresql:
postgresqlDatabase: gitea auth:
postgresqlUsername: gitea password: gitea
postgresqlPassword: gitea database: gitea
servicePort: 5432 username: gitea
service:
ports:
postgresql: 5432
primary:
persistence: persistence:
size: 10Gi size: 10Gi