With `cloudnativePG` in place, the bundled Bitnami `postgresql` sub-chart is the second in-chart way to run a database, and the worse one. It is a single, non-HA instance without failover, backup or managed major-version upgrades, and it ships images that Bitnami no longer distributes freely. Keeping it around means maintaining two code paths for the same job, including the mutual-exclusion assertion between both dependencies and a second set of DNS, credential and image helpers. Removing it leaves exactly two supported choices: a CloudNativePG `Cluster` rendered by this chart, or an external database configured via `gitea.config.database`. Both scale from a single instance to a HA setup - `cloudnativePG.instances=1` covers the use case the `postgresql` sub-chart served - so nothing is lost besides the duplication. BREAKING CHANGE: The `postgresql` sub-chart and all `postgresql.*` values have been removed. There is no in-place migration path: dump the database of the old `postgresql` release with `pg_dump`, remove the `postgresql` values, deploy the chart with `cloudnativePG.enabled=true` and restore the dump. Alternatively point `gitea.config.database` at an externally managed database. Setting `postgresql` now fails the release with a pointer to the changelog. Co-authored-by: Copilot <copilot@github.com>
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
suite: Test config database
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
tests:
|
|
- it: "Connect to the read-write Service of the CloudNativePG Cluster"
|
|
template: templates/secret_inlineConfig.yaml
|
|
set:
|
|
cloudnativePG:
|
|
enabled: true
|
|
asserts:
|
|
- documentIndex: 0
|
|
matchRegex:
|
|
path: data.database
|
|
decodeBase64: true
|
|
pattern: HOST=gitea-unittests-postgresql-rw.testing.svc.cluster.local:5432
|
|
|
|
- it: "Connect to the read-write Service of the CloudNativePG Cluster with a custom cluster domain"
|
|
template: templates/secret_inlineConfig.yaml
|
|
set:
|
|
clusterDomain: my-special-cluster.local
|
|
cloudnativePG:
|
|
enabled: true
|
|
asserts:
|
|
- documentIndex: 0
|
|
matchRegex:
|
|
path: data.database
|
|
decodeBase64: true
|
|
pattern: HOST=gitea-unittests-postgresql-rw.testing.svc.my-special-cluster.local:5432
|
|
|
|
- it: "Connect to the configured CloudNativePG database"
|
|
template: templates/secret_inlineConfig.yaml
|
|
set:
|
|
cloudnativePG:
|
|
enabled: true
|
|
credentials:
|
|
database: gitea-database
|
|
username: gitea-username
|
|
asserts:
|
|
- documentIndex: 0
|
|
equal:
|
|
path: data.database
|
|
decodeBase64: true
|
|
value: |-
|
|
DB_TYPE=postgres
|
|
HOST=gitea-unittests-postgresql-rw.testing.svc.cluster.local:5432
|
|
NAME=gitea-database
|
|
USER=gitea-username
|