feat!: remove the postgresql sub-chart

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>
This commit is contained in:
2026-10-04 00:39:05 +02:00
co-authored by Copilot
parent 1b82a15b7f
commit 27db0d26b0
13 changed files with 36 additions and 275 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
## Project Overview ## Project Overview
Kubernetes Helm chart for deploying [Gitea](https://gitea.com). Uses Go/Helm templating (`templates/`), YAML values (`values.yaml`), and includes sub-charts for PostgreSQL, Valkey, and Valkey-cluster. The HA-ready database is provisioned as a CloudNativePG `Cluster` resource, the operator itself is not part of the chart. Kubernetes Helm chart for deploying [Gitea](https://gitea.com). Uses Go/Helm templating (`templates/`), YAML values (`values.yaml`), and includes a sub-chart for Valkey. The database is provisioned as a CloudNativePG `Cluster` resource, the operator itself is not part of the chart.
## Build & Test ## Build & Test
+2 -5
View File
@@ -1,9 +1,6 @@
dependencies: dependencies:
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 16.7.27
- name: valkey - name: valkey
repository: https://valkey.io/valkey-helm repository: https://valkey.io/valkey-helm
version: 0.10.0 version: 0.10.0
digest: sha256:40619b69b9527f2044de588b227cf6b174011d4aa16cc048690cc970ce9ecd35 digest: sha256:c3deb43d02228f143e1c9525f5ce06dc6a78646e763c7a73c5ec8ea0101ed2f5
generated: "2026-10-03T23:18:30.630364276+02:00" generated: "2026-10-04T00:24:11.331968211+02:00"
-5
View File
@@ -36,11 +36,6 @@ maintainers:
email: christopher.homberger@web.de email: christopher.homberger@web.de
dependencies: dependencies:
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 16.7.27
condition: postgresql.enabled
# https://github.com/bitnami/charts/blob/main/bitnami/valkey/Chart.yaml # https://github.com/bitnami/charts/blob/main/bitnami/valkey/Chart.yaml
- name: valkey - name: valkey
repository: https://valkey.io/valkey-helm repository: https://valkey.io/valkey-helm
+18 -62
View File
@@ -4,7 +4,6 @@
- [Update and versioning policy](#update-and-versioning-policy) - [Update and versioning policy](#update-and-versioning-policy)
- [Dependencies](#dependencies) - [Dependencies](#dependencies)
- [HA Dependencies](#ha-dependencies) - [HA Dependencies](#ha-dependencies)
- [Non-HA Dependencies](#non-ha-dependencies)
- [Dependency Versioning](#dependency-versioning) - [Dependency Versioning](#dependency-versioning)
- [Installing](#installing) - [Installing](#installing)
- [High Availability](#high-availability) - [High Availability](#high-availability)
@@ -59,7 +58,6 @@
- [StartupProbe](#startupprobe) - [StartupProbe](#startupprobe)
- [valkey](#valkey) - [valkey](#valkey)
- [CloudNativePG](#cloudnativepg) - [CloudNativePG](#cloudnativepg)
- [PostgreSQL](#postgresql)
- [Advanced](#advanced) - [Advanced](#advanced)
- [Contributing](#contributing) - [Contributing](#contributing)
- [Upgrading](#upgrading) - [Upgrading](#upgrading)
@@ -103,21 +101,15 @@ Users can also configure their own external providers via the configuration.
CloudNativePG is **not** bundled as a sub-chart. CloudNativePG is **not** bundled as a sub-chart.
Only the `Cluster` resource is rendered by this chart, the [CloudNativePG operator](https://cloudnative-pg.io/documentation/current/installation_upgrade/) must already be installed cluster-wide. Only the `Cluster` resource is rendered by this chart, the [CloudNativePG operator](https://cloudnative-pg.io/documentation/current/installation_upgrade/) must already be installed cluster-wide.
Because that operator cannot be assumed to be present, `cloudnativePG.enabled` defaults to `false`. Because that operator cannot be assumed to be present, `cloudnativePG.enabled` defaults to `false`.
Set it to `true` once the operator is installed, or use either the `postgresql` sub-chart or an external database instead. Set it to `true` once the operator is installed, or use an external database instead.
### Non-HA Dependencies
Alternatively, the following non-HA replacements are available:
- PostgreSQL ([Bitnami PostgreSQL](https://github.com/bitnami/charts/blob/main/bitnami/postgresql/Chart.yaml))
### Dependency Versioning ### Dependency Versioning
Updates of sub-charts will be incorporated into the Gitea chart as they are released. Updates of sub-charts will be incorporated into the Gitea chart as they are released.
The reasoning behind this is that new users of the chart will start with the most recent sub-chart dependency versions. The reasoning behind this is that new users of the chart will start with the most recent sub-chart dependency versions.
**Note** If you want to stay on an older appVersion of a sub-chart dependency (e.g. PostgreSQL), you need to override the image tag in your `values.yaml` file. **Note** If you want to stay on an older appVersion of a dependency (e.g. PostgreSQL), you need to override the image tag in your `values.yaml` file.
In fact, we recommend to do so right from the start to be independent of major sub-chart dependency changes as they are released. In fact, we recommend to do so right from the start to be independent of major dependency changes as they are released.
There is no need to update to every new PostgreSQL major version - you can happily skip some and do larger updates when you are ready for them. There is no need to update to every new PostgreSQL major version - you can happily skip some and do larger updates when you are ready for them.
We recommend to use a rolling tag like `:<majorVersion>-debian-<debian major version>` to incorporate minor and patch updates for the respective major version as they are released. We recommend to use a rolling tag like `:<majorVersion>-debian-<debian major version>` to incorporate minor and patch updates for the respective major version as they are released.
@@ -126,7 +118,6 @@ Alternatively you can also use a versioning helper tool like [renovate](https://
Please double-check the image repository and available tags in the sub-chart: Please double-check the image repository and available tags in the sub-chart:
- [CloudNativePG](https://github.com/cloudnative-pg/postgres-containers/pkgs/container/postgresql) - [CloudNativePG](https://github.com/cloudnative-pg/postgres-containers/pkgs/container/postgresql)
- [PostgreSQL](https://hub.docker.com/r/bitnami/postgresql/tags)
- [Valkey](https://hub.docker.com/r/valkey/valkey/tags) - [Valkey](https://hub.docker.com/r/valkey/valkey/tags)
and look up the image tag which fits your needs on Dockerhub. and look up the image tag which fits your needs on Dockerhub.
@@ -341,7 +332,7 @@ External tools such as `valkey` or `memcached` handle these workloads much bette
If HA is not needed/desired, the following configurations can be used to deploy a single-pod Gitea instance. If HA is not needed/desired, the following configurations can be used to deploy a single-pod Gitea instance.
1. For a production-ready single-pod Gitea instance without external dependencies (using the chart dependency `postgresql` and `valkey`): 1. For a production-ready single-pod Gitea instance (using the chart dependency `valkey` and a single-instance CloudNativePG `Cluster`):
<details> <details>
@@ -350,10 +341,9 @@ If HA is not needed/desired, the following configurations can be used to deploy
```yaml ```yaml
valkey: valkey:
enabled: true enabled: true
postgresql:
enabled: true
cloudnativePG: cloudnativePG:
enabled: false enabled: true
instances: 1
persistence: persistence:
enabled: true enabled: true
@@ -381,8 +371,6 @@ If HA is not needed/desired, the following configurations can be used to deploy
```yaml ```yaml
valkey: valkey:
enabled: false enabled: false
postgresql:
enabled: false
cloudnativePG: cloudnativePG:
enabled: false enabled: false
@@ -495,7 +483,7 @@ Priority (highest to lowest) for defining app.ini variables:
Any external database listed in [https://docs.gitea.com/installation/database-prep/](https://docs.gitea.com/installation/database-prep/) can be used instead of the built-in PostgreSQL. Any external database listed in [https://docs.gitea.com/installation/database-prep/](https://docs.gitea.com/installation/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. 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` and `cloudnativePG.enabled` to `false` to disable the use of the built-in PostgreSQL. If an external database is used, no matter which type, make sure to set `cloudnativePG.enabled` to `false` to disable the use of the built-in PostgreSQL.
```yaml ```yaml
gitea: gitea:
@@ -508,9 +496,6 @@ gitea:
PASSWD: gitea PASSWD: gitea
SCHEMA: gitea SCHEMA: gitea
postgresql:
enabled: false
cloudnativePG: cloudnativePG:
enabled: false enabled: false
``` ```
@@ -614,14 +599,14 @@ persistence:
In case that persistence 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. The CloudNativePG `Cluster` handles the persistence on its own.
You can interact with the postgres settings as displayed in the following example: You can interact with its storage settings as displayed in the following example:
```yaml ```yaml
postgresql: cloudnativePG:
persistence: storage:
enabled: true size: 20Gi
existingClaim: MyAwesomeGiteaPostgresClaim storageClass: myOwnStorageClass
``` ```
### Admin User ### Admin User
@@ -1431,25 +1416,6 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `valkey.metrics.exporter.image.repository` | Image repository. | `oliver006/redis_exporter` | | `valkey.metrics.exporter.image.repository` | Image repository. | `oliver006/redis_exporter` |
| `valkey.metrics.exporter.image.tag` | Image tag. | `""` | | `valkey.metrics.exporter.image.tag` | Image tag. | `""` |
### PostgreSQL
| Name | Description | Value |
| ------------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------- |
| `postgresql.enabled` | Enable PostgreSQL. | `false` |
| `postgresql.global.postgresql.auth.password` | Password for the `gitea` user (overrides `auth.password`). | `gitea` |
| `postgresql.global.postgresql.auth.database` | Name for a custom database to create (overrides `auth.database`). | `gitea` |
| `postgresql.global.postgresql.auth.username` | Name for a custom user to create (overrides `auth.username`). | `gitea` |
| `postgresql.global.postgresql.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`). | `5432` |
| `postgresql.image.repository` | Image repository, eg. `bitnamilegacy/postgresql`. | `bitnamilegacy/postgresql` |
| `postgresql.primary.persistence.enabled` | Enable persistence. | `true` |
| `postgresql.primary.persistence.storageClass` | Persistent Volume storage class. | `""` |
| `postgresql.primary.persistence.size` | PVC Storage Request for PostgreSQL volume. | `10Gi` |
| `postgresql.readReplicas.persistence.enabled` | Enable PostgreSQL read only data persistence using PVC. | `true` |
| `postgresql.readReplicas.persistence.storageClass` | Persistent Volume storage class. | `""` |
| `postgresql.readReplicas.persistence.size` | PVC Storage Request for PostgreSQL volume. | `""` |
| `postgresql.metrics.image.repository` | Image repository, eg. `bitnamilegacy/postgres-exporter`. | `bitnamilegacy/postgres-exporter` |
| `postgresql.volumePermissions.image.repository` | Image repository, eg. `bitnamilegacy/os-shell`. | `bitnamilegacy/os-shell` |
### Advanced ### Advanced
| Name | Description | Value | | Name | Description | Value |
@@ -1697,28 +1663,18 @@ If you want to switch to a RWX volume and go for HA, you need to
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line --> <!-- markdownlint-disable-next-line -->
**Transitioning from Postgres to Postgres HA** **Transitioning from Postgres or Postgres HA to CloudNativePG**
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
If you are running with a non-HA PG DB from a previous chart release, you need to set The `postgresql` and `postgresql-ha` sub-charts have been replaced by a [CloudNativePG](https://cloudnative-pg.io/) `Cluster` resource, configured via `cloudnativePG`.
- `cloudnativePG.enabled=false`
- `postgresql.enabled=true`
This is needed to stay with your existing single-instance DB (as the HA-variant is the new default).
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line -->
**Transitioning from Postgres HA to CloudNativePG**
<!-- prettier-ignore-end -->
The `postgresql-ha` sub-chart has been replaced by a [CloudNativePG](https://cloudnative-pg.io/) `Cluster` resource, configured via `cloudnativePG`.
The CloudNativePG operator is not bundled with this chart and has to be installed cluster-wide beforehand. The CloudNativePG operator is not bundled with this chart and has to be installed cluster-wide beforehand.
There is no in-place migration path between the two: dump the database of the old `postgresql-ha` deployment with `pg_dump`, remove the `postgresql-ha` values and deploy the chart with `cloudnativePG.enabled=true`. There is no in-place migration path: dump the database of the old deployment with `pg_dump`, remove the `postgresql` or `postgresql-ha` values and deploy the chart with `cloudnativePG.enabled=true`.
Afterwards restore the dump into the new cluster. Afterwards restore the dump into the new cluster.
Alternatively, point the new `Cluster` at the existing data via one of the [CloudNativePG bootstrap methods](https://cloudnative-pg.io/documentation/current/bootstrap/). Alternatively, point the new `Cluster` at the existing data via one of the [CloudNativePG bootstrap methods](https://cloudnative-pg.io/documentation/current/bootstrap/).
For a single-instance database, set `cloudnativePG.instances=1`.
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line --> <!-- markdownlint-disable-next-line -->
**Change of env-to-ini prefix** **Change of env-to-ini prefix**
+3 -5
View File
@@ -28,8 +28,8 @@ In addition, the following components are required for full HA-readiness:
- A HA-ready cache (`valkey-cluster`) - A HA-ready cache (`valkey-cluster`)
- A HA-ready DB - A HA-ready DB
`postgresql.enabled`, which defaults to `false`, must stay disabled for a HA setup. `cloudnativePG.enabled`, which defaults to `false`, must be enabled for a HA setup.
The `postgresql` chart dependency is not HA-ready, use the `cloudnativePG` option instead. It requires the CloudNativePG operator to be installed cluster-wide beforehand.
The following sections discuss each of the components in more detail. The following sections discuss each of the components in more detail.
Note that for each component discussed, the shown configurations only provides a (working) starting point, not necessarily the most optimal setup. Note that for each component discussed, the shown configurations only provides a (working) starting point, not necessarily the most optimal setup.
@@ -171,13 +171,11 @@ cloudnativePG:
``` ```
If you do not want to run the operator, using a managed database service in the cloud might be the easiest and most robust solution. If you do not want to run the operator, using a managed database service in the cloud might be the easiest and most robust solution.
Remember: keep `cloudnativePG` and `postgresql` disabled and configure the database connection manually via `gitea.config.database`: Remember: keep `cloudnativePG` disabled and configure the database connection manually via `gitea.config.database`:
```yml ```yml
cloudnativePG: cloudnativePG:
enabled: false enabled: false
postgresql:
enabled: false
gitea: gitea:
config: config:
-15
View File
@@ -180,12 +180,6 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "postgresql.dns" -}}
{{- if (index .Values "postgresql").enabled -}}
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.service.ports.postgresql -}}
{{- end -}}
{{- end -}}
{{- define "valkey.dns" -}} {{- define "valkey.dns" -}}
{{- if (index .Values "valkey").enabled -}} {{- if (index .Values "valkey").enabled -}}
{{- printf "redis://:%s@%s-valkey.%s.svc.%s:%g/0?pool_size=100&idle_timeout=180s&" (index (index .Values "valkey").auth.aclUsers "default").password .Release.Name .Release.Namespace .Values.clusterDomain (index .Values "valkey").service.port -}} {{- printf "redis://:%s@%s-valkey.%s.svc.%s:%g/0?pool_size=100&idle_timeout=180s&" (index (index .Values "valkey").auth.aclUsers "default").password .Release.Name .Release.Namespace .Values.clusterDomain (index .Values "valkey").service.port -}}
@@ -450,15 +444,6 @@ https
{{- $_ := set .Values.gitea.config.database "NAME" .Values.cloudnativePG.credentials.database -}} {{- $_ := set .Values.gitea.config.database "NAME" .Values.cloudnativePG.credentials.database -}}
{{- $_ := set .Values.gitea.config.database "USER" .Values.cloudnativePG.credentials.username -}} {{- $_ := set .Values.gitea.config.database "USER" .Values.cloudnativePG.credentials.username -}}
{{- end -}} {{- end -}}
{{- if (index .Values "postgresql" "enabled") -}}
{{- $_ := set .Values.gitea.config.database "DB_TYPE" "postgres" -}}
{{- if not (.Values.gitea.config.database.HOST) -}}
{{- $_ := set .Values.gitea.config.database "HOST" (include "postgresql.dns" .) -}}
{{- end -}}
{{- $_ := set .Values.gitea.config.database "NAME" .Values.postgresql.global.postgresql.auth.database -}}
{{- $_ := set .Values.gitea.config.database "USER" .Values.postgresql.global.postgresql.auth.username -}}
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.postgresql.global.postgresql.auth.password -}}
{{- end -}}
{{- end -}} {{- end -}}
{{- define "gitea.container-additional-mounts" -}} {{- define "gitea.container-additional-mounts" -}}
+5
View File
@@ -95,6 +95,11 @@
{{- fail "`openshift.hostUsers` does no longer exist. Please refer to the changelog and configure `deployment.hostUsers` instead." -}} {{- fail "`openshift.hostUsers` does no longer exist. Please refer to the changelog and configure `deployment.hostUsers` instead." -}}
{{- end -}} {{- end -}}
{{/* POSTGRESQL */}}
{{- if index .Values "postgresql" -}}
{{- fail "`postgresql` does no longer exist. Please refer to the changelog and configure `cloudnativePG` instead, which requires the CloudNativePG operator to be installed in the cluster." -}}
{{- end -}}
{{/* POSTGRESQL HA */}} {{/* POSTGRESQL HA */}}
{{- if index .Values "postgresql-ha" -}} {{- if index .Values "postgresql-ha" -}}
{{- fail "`postgresql-ha` does no longer exist. Please refer to the changelog and configure `cloudnativePG` instead, which requires the CloudNativePG operator to be installed in the cluster." -}} {{- fail "`postgresql-ha` does no longer exist. Please refer to the changelog and configure `cloudnativePG` instead, which requires the CloudNativePG operator to be installed in the cluster." -}}
-5
View File
@@ -21,11 +21,6 @@ data:
{{- define "gitea.config.assertions" -}} {{- define "gitea.config.assertions" -}}
{{- /*assert that only one PG dep is enabled */ -}}
{{- if and (.Values.postgresql.enabled) (.Values.cloudnativePG.enabled) -}}
{{- fail "Only one of postgresql or cloudnativePG can be enabled at the same time." -}}
{{- end }}
{{- /* multiple replicas assertions */ -}} {{- /* multiple replicas assertions */ -}}
{{- if gt (.Values.deployment.replicas | int) 1 -}} {{- if gt (.Values.deployment.replicas | int) 1 -}}
{{- if .Values.gitea.config.cron -}} {{- if .Values.gitea.config.cron -}}
-11
View File
@@ -46,14 +46,3 @@ tests:
HOST=gitea-unittests-postgresql-rw.testing.svc.cluster.local:5432 HOST=gitea-unittests-postgresql-rw.testing.svc.cluster.local:5432
NAME=gitea-database NAME=gitea-database
USER=gitea-username USER=gitea-username
- it: "Fail when postgresql and cloudnativePG are enabled at the same time"
template: templates/secret_config.yaml
set:
postgresql:
enabled: true
cloudnativePG:
enabled: true
asserts:
- failedTemplate:
errorMessage: "Only one of postgresql or cloudnativePG can be enabled at the same time."
@@ -1,102 +0,0 @@
suite: Test dependency customization integrity of postgresql
release:
name: gitea-unittests
namespace: testing
set:
cloudnativePG:
enabled: false
postgresql:
enabled: true
global:
postgresql:
auth:
password: gitea-password
database: gitea-database
username: gitea-username
service:
ports:
postgresql: 1234
primary:
persistence:
size: 1337Mi
tests:
- it: "[postgresql] Apply the database settings"
template: charts/postgresql/templates/primary/statefulset.yaml
asserts:
- documentIndex: 0
contains:
path: spec.template.spec.containers[0].env
content:
name: POSTGRES_DATABASE
value: "gitea-database"
- documentIndex: 0
contains:
path: spec.template.spec.containers[0].env
content:
name: POSTGRES_USER
value: "gitea-username"
- it: "[postgresql] Apply the database password"
template: charts/postgresql/templates/secrets.yaml
asserts:
- documentIndex: 0
equal:
path: data["password"]
value: "Z2l0ZWEtcGFzc3dvcmQ="
- it: "[postgresql] Apply primary.persistence.size"
template: charts/postgresql/templates/primary/statefulset.yaml
asserts:
- documentIndex: 0
equal:
path: spec.volumeClaimTemplates[0].spec.resources.requests.storage
value: "1337Mi"
- it: "[postgresql] Apply global.postgresql.service.ports.postgresql"
template: charts/postgresql/templates/primary/svc.yaml
asserts:
- documentIndex: 0
equal:
path: spec.ports[0].port
value: 1234
- it: "[postgresql] Render the referenced Service"
template: charts/postgresql/templates/primary/svc.yaml
asserts:
- containsDocument:
kind: Service
apiVersion: v1
name: gitea-unittests-postgresql
namespace: testing
- it: "[gitea] Connect to the postgresql Service"
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
matchRegex:
path: data.database
decodeBase64: true
pattern: HOST=gitea-unittests-postgresql.testing.svc.cluster.local:1234
- it: "[gitea] Connect to the postgresql Service with a custom cluster domain"
set:
clusterDomain: my-special-cluster.local
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
matchRegex:
path: data.database
decodeBase64: true
pattern: HOST=gitea-unittests-postgresql.testing.svc.my-special-cluster.local:1234
- it: "[gitea] Connect to the configured database"
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
matchRegex:
path: data.database
decodeBase64: true
pattern: NAME=gitea-database
- documentIndex: 0
matchRegex:
path: data.database
decodeBase64: true
pattern: USER=gitea-username
- documentIndex: 0
matchRegex:
path: data.database
decodeBase64: true
pattern: PASSWD=gitea-password
@@ -3,19 +3,6 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
tests: tests:
- it: "[postgresql] Detect major image version upgrades"
template: charts/postgresql/templates/primary/statefulset.yaml
set:
postgresql:
enabled: true
cloudnativePG:
enabled: false
asserts:
- documentIndex: 0
matchRegex:
path: spec.template.spec.containers[0].image
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
pattern: bitnamilegacy/postgresql:17.+$
- it: "[valkey] Detect major image version upgrades" - it: "[valkey] Detect major image version upgrades"
template: charts/valkey/templates/deploy_valkey.yaml template: charts/valkey/templates/deploy_valkey.yaml
set: set:
@@ -98,6 +98,13 @@ tests:
asserts: asserts:
- failedTemplate: - failedTemplate:
errorMessage: "`openshift.hostUsers` does no longer exist. Please refer to the changelog and configure `deployment.hostUsers` instead." errorMessage: "`openshift.hostUsers` does no longer exist. Please refer to the changelog and configure `deployment.hostUsers` instead."
- it: "Fail when the removed `postgresql` value is set"
set:
postgresql:
enabled: true
asserts:
- failedTemplate:
errorMessage: "`postgresql` does no longer exist. Please refer to the changelog and configure `cloudnativePG` instead, which requires the CloudNativePG operator to be installed in the cluster."
- it: "Fail when the removed `postgresql-ha` value is set" - it: "Fail when the removed `postgresql-ha` value is set"
set: set:
postgresql-ha: postgresql-ha:
-51
View File
@@ -1251,57 +1251,6 @@ valkey:
tag: "" tag: ""
## @section PostgreSQL
postgresql:
## @param postgresql.enabled Enable PostgreSQL.
enabled: false
## @param postgresql.global.postgresql.auth.password Password for the `gitea` user (overrides `auth.password`).
## @param postgresql.global.postgresql.auth.database Name for a custom database to create (overrides `auth.database`).
## @param postgresql.global.postgresql.auth.username Name for a custom user to create (overrides `auth.username`).
## @param postgresql.global.postgresql.service.ports.postgresql PostgreSQL service port (overrides `service.ports.postgresql`).
global:
postgresql:
auth:
password: gitea
database: gitea
username: gitea
service:
ports:
postgresql: 5432
## @param postgresql.image.repository Image repository, eg. `bitnamilegacy/postgresql`.
image:
repository: bitnamilegacy/postgresql
primary:
## @param postgresql.primary.persistence.enabled Enable persistence.
## @param postgresql.primary.persistence.storageClass Persistent Volume storage class.
## @param postgresql.primary.persistence.size PVC Storage Request for PostgreSQL volume.
persistence:
enabled: true
storageClass: ""
size: 10Gi
readReplicas:
## @param postgresql.readReplicas.persistence.enabled Enable PostgreSQL read only data persistence using PVC.
## @param postgresql.readReplicas.persistence.storageClass Persistent Volume storage class.
## @param postgresql.readReplicas.persistence.size PVC Storage Request for PostgreSQL volume.
persistence:
enabled: true
storageClass: ""
size: ""
## @param postgresql.metrics.image.repository Image repository, eg. `bitnamilegacy/postgres-exporter`.
metrics:
image:
repository: bitnamilegacy/postgres-exporter
## @param postgresql.volumePermissions.image.repository Image repository, eg. `bitnamilegacy/os-shell`.
volumePermissions:
image:
repository: bitnamilegacy/os-shell
# By default, removed or moved settings that still remain in a user defined values.yaml will cause Helm to fail running the install/update. # 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. # Set it to false to skip this basic validation check.
## @section Advanced ## @section Advanced