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:
@@ -180,12 +180,6 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- 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" -}}
|
||||
{{- 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 -}}
|
||||
@@ -450,15 +444,6 @@ https
|
||||
{{- $_ := set .Values.gitea.config.database "NAME" .Values.cloudnativePG.credentials.database -}}
|
||||
{{- $_ := set .Values.gitea.config.database "USER" .Values.cloudnativePG.credentials.username -}}
|
||||
{{- 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 -}}
|
||||
|
||||
{{- define "gitea.container-additional-mounts" -}}
|
||||
|
||||
@@ -95,6 +95,11 @@
|
||||
{{- fail "`openshift.hostUsers` does no longer exist. Please refer to the changelog and configure `deployment.hostUsers` instead." -}}
|
||||
{{- 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 */}}
|
||||
{{- 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." -}}
|
||||
|
||||
@@ -21,11 +21,6 @@ data:
|
||||
|
||||
{{- 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 */ -}}
|
||||
{{- if gt (.Values.deployment.replicas | int) 1 -}}
|
||||
{{- if .Values.gitea.config.cron -}}
|
||||
|
||||
Reference in New Issue
Block a user