Skip to content

Commit

Permalink
chore: Remove PostGIS and Timescale (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemnoel authored Sep 22, 2024
1 parent 45bc4d8 commit 199d94c
Show file tree
Hide file tree
Showing 31 changed files with 7 additions and 531 deletions.
2 changes: 0 additions & 2 deletions charts/paradedb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| recovery.secret.name | string | `""` | Name of the backup credentials secret |
| type | string | `"paradedb"` | Type of the CNPG database. Available types: * `paradedb` |
| version.paradedb | string | `"0.10.0"` | The ParadeDB version, set in the publish CI workflow from the latest paradedb/paradedb GitHub tag |
| version.postgis | string | `"3.4"` | If using PostGIS, specify the version |
| version.postgresql | string | `"16"` | PostgreSQL major version to use |
| version.timescaledb | string | `"2.15"` | If using TimescaleDB, specify the version |

## Maintainers

Expand Down
2 changes: 1 addition & 1 deletion charts/paradedb/docs/Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ via a GitOps solution or directly via Helm is up to you. The following sections

Currently the chart supports two database types. These are configured via the `type` parameter. These are:
* `postgresql` - A standard PostgreSQL database.
* `postgis` - A PostgreSQL database with the PostGIS extension installed.
* `paradedb` - Postgres for Search and Analytics

Depending on the type the chart will use a different Docker image and fill in some initial setup, like extension installation.

Expand Down
2 changes: 1 addition & 1 deletion charts/paradedb/examples/image-catalog-ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: postgresql
mode: standalone
version:
major: "16"
timescaledb: "2.15"
paradedb: "0.10.0"
cluster:
instances: 1
imageCatalogRef:
Expand Down
2 changes: 1 addition & 1 deletion charts/paradedb/examples/image-catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: postgresql
mode: standalone
version:
major: "16"
timescaledb: "2.15"
paradedb: "0.10.0"
cluster:
instances: 1
backups:
Expand Down
9 changes: 0 additions & 9 deletions charts/paradedb/examples/postgis.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions charts/paradedb/examples/timescaledb.yaml

This file was deleted.

9 changes: 1 addition & 8 deletions charts/paradedb/templates/_bootstrap.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@ bootstrap:
owner: {{ tpl .Values.cluster.initdb.owner . }}
{{- end }}
postInitApplicationSQL:
{{- if eq .Values.type "postgis" }}
- CREATE EXTENSION IF NOT EXISTS postgis;
- CREATE EXTENSION IF NOT EXISTS postgis_topology;
- CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
- CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
{{- else if eq .Values.type "timescaledb" }}
- CREATE EXTENSION IF NOT EXISTS timescaledb;
{{- else if eq .Values.type "paradedb" }}
{{- if eq .Values.type "paradedb" }}
- CREATE EXTENSION IF NOT EXISTS pg_search;
- CREATE EXTENSION IF NOT EXISTS pg_analytics;
- CREATE EXTENSION IF NOT EXISTS pg_ivm;
Expand Down
19 changes: 0 additions & 19 deletions charts/paradedb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: cloudnative-pg
{{- end }}

{{/*
Whether we need to use TimescaleDB defaults
*/}}
{{- define "cluster.useTimescaleDBDefaults" -}}
{{ and (eq .Values.type "timescaledb") .Values.imageCatalog.create (empty .Values.cluster.imageCatalogRef.name) (empty .Values.imageCatalog.images) (empty .Values.cluster.imageName) }}
{{- end -}}

{{/*
Get the PostgreSQL major version from .Values.version.postgresql
*/}}
Expand All @@ -74,8 +67,6 @@ If a custom imageName is available, use it, otherwise use the defaults based on
{{- .Values.cluster.imageName -}}
{{- else if eq .Values.type "postgresql" -}}
{{- printf "ghcr.io/cloudnative-pg/postgresql:%s" .Values.version.postgresql -}}
{{- else if eq .Values.type "postgis" -}}
{{- printf "ghcr.io/cloudnative-pg/postgis:%s-%s" .Values.version.postgresql .Values.version.postgis -}}
{{- else if eq .Values.type "paradedb" -}}
{{- printf "paradedb/paradedb:%s-v%s" .Values.version.postgresql .Values.version.paradedb -}}
{{- else -}}
Expand All @@ -99,12 +90,6 @@ imageCatalogRef:
kind: ImageCatalog
name: {{ include "cluster.fullname" . }}
major: {{ include "cluster.postgresqlMajor" . }}
{{- else if eq (include "cluster.useTimescaleDBDefaults" .) "true" -}}
imageCatalogRef:
apiGroup: postgresql.cnpg.io
kind: ImageCatalog
name: {{ include "cluster.fullname" . }}-timescaledb-ha
major: {{ include "cluster.postgresqlMajor" . }}
{{- else }}
imageName: {{ include "cluster.imageName" . }}
{{- end }}
Expand All @@ -116,8 +101,6 @@ Postgres UID
{{- define "cluster.postgresUID" -}}
{{- if ge (int .Values.cluster.postgresUID) 0 -}}
{{- .Values.cluster.postgresUID }}
{{- else if and (eq (include "cluster.useTimescaleDBDefaults" .) "true") (eq .Values.type "timescaledb") -}}
{{- 1000 -}}
{{- else -}}
{{- 26 -}}
{{- end -}}
Expand All @@ -129,8 +112,6 @@ Postgres GID
{{- define "cluster.postgresGID" -}}
{{- if ge (int .Values.cluster.postgresGID) 0 -}}
{{- .Values.cluster.postgresGID }}
{{- else if and (eq (include "cluster.useTimescaleDBDefaults" .) "true") (eq .Values.type "timescaledb") -}}
{{- 1000 -}}
{{- else -}}
{{- 26 -}}
{{- end -}}
Expand Down
4 changes: 1 addition & 3 deletions charts/paradedb/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ spec:
{{ end }}
postgresql:
shared_preload_libraries:
{{- if eq .Values.type "timescaledb" }}
- timescaledb
{{- else if eq .Values.type "paradedb" }}
{{- if eq .Values.type "paradedb" }}
- pg_search
- pg_analytics
- pg_cron
Expand Down
18 changes: 0 additions & 18 deletions charts/paradedb/templates/image-catalog-timescaledb-ha.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 199d94c

Please sign in to comment.