From 90f58a157035a988918daacac3e124d0e0831e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20No=C3=ABl?= <21990816+philippemnoel@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:39:51 -0500 Subject: [PATCH] feat: Upgrade to 0.13.2 (#72) --- .github/workflows/paradedb-test-eks.yml | 2 +- README.md | 6 +-- charts/paradedb/Chart.yaml | 4 +- charts/paradedb/README.md | 4 +- charts/paradedb/README.md.gotmpl | 19 ++-------- .../paradedb/examples/image-catalog-ref.yaml | 2 +- charts/paradedb/examples/image-catalog.yaml | 2 +- charts/paradedb/examples/paradedb.yaml | 2 +- charts/paradedb/templates/_bootstrap.tpl | 5 ++- charts/paradedb/templates/cluster.yaml | 7 +--- .../01-paradedb-NCC-1701-D_cluster.yaml | 2 +- .../01-paradedb_cluster.yaml | 2 +- .../00-minio_cleanup-assert.yaml | 6 --- .../scheduledbackups/00-minio_cleanup.yaml | 16 -------- .../01-scheduledbackups_cluster-assert.yaml | 37 ------------------- .../01-scheduledbackups_cluster.yaml | 35 ------------------ .../test/scheduledbackups/chainsaw-test.yaml | 27 -------------- charts/paradedb/values.yaml | 4 +- 18 files changed, 24 insertions(+), 158 deletions(-) delete mode 100644 charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml delete mode 100644 charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml delete mode 100644 charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml delete mode 100644 charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml delete mode 100644 charts/paradedb/test/scheduledbackups/chainsaw-test.yaml diff --git a/.github/workflows/paradedb-test-eks.yml b/.github/workflows/paradedb-test-eks.yml index 76b6c3158..ef4fb5e09 100644 --- a/.github/workflows/paradedb-test-eks.yml +++ b/.github/workflows/paradedb-test-eks.yml @@ -51,7 +51,7 @@ jobs: awslocal configure set region us-east-1 # As of writing, the latest Kubernetes version available on LocalStack EKS - # is 1.29. CloudNativePG requires version 1.25+ + # is 1.29. CloudNativePG requires version 1.29+ - name: Create the LocalStack AWS EKS Cluster run: | awslocal --endpoint-url=http://localhost:4566 eks create-cluster \ diff --git a/README.md b/README.md index 7bf3c73af..c88034fba 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The [ParadeDB](https://github.com/paradedb/paradedb) Helm Chart is based on the official [CloudNativePG Helm Chart](https://cloudnative-pg.io/). CloudNativePG is a Kubernetes operator that manages the full lifecycle of a highly available PostgreSQL database cluster with a primary/standby architecture using Postgres streaming (physical) replication. -Kubernetes, and specifically the CloudNativePG operator, is the recommended approach for deploying ParadeDB in production, with high availability. ParadeDB also provides a [Docker image](https://hub.docker.com/r/paradedb/paradedb) and [prebuilt binaries](https://github.com/paradedb/paradedb/releases) for Debian, Ubuntu and Red Hat Enterprise Linux. +Kubernetes, and specifically the CloudNativePG operator, is the recommended approach for deploying ParadeDB in production, with high availability. ParadeDB also provides a [Docker image](https://hub.docker.com/r/paradedb/paradedb) and [prebuilt binaries](https://github.com/paradedb/paradedb/releases) for Debian, Ubuntu, Red Hat Enterprise Linux, and macOS. The ParadeDB Helm Chart supports Postgres 13+ and ships with Postgres 17 by default. @@ -40,13 +40,13 @@ The chart is also available on [Artifact Hub](https://artifacthub.io/packages/he The most reliable way to run ParadeDB in production is with ParadeDB BYOC, an end-to-end managed solution that runs in the customer’s cloud account. It deploys on managed Kubernetes services and uses the ParadeDB Helm Chart. -ParadeDB BYOC includes built-in integration with managed PostgreSQL services, such as AWS RDS, via logical replication. It also provides monitoring, logging and alerting through Prometheus and Grafana. The ParadeDB team manages the underlying infrastructure and lifecycle of the cluster. +ParadeDB BYOC includes built-in integration with managed PostgreSQL services, such as AWS RDS and GCP CloudSQL, via logical replication. It also provides monitoring, logging and alerting through Prometheus and Grafana. The ParadeDB team manages the underlying infrastructure and lifecycle of the cluster. You can read more about the optimal architecture for running ParadeDB in production [here](https://docs.paradedb.com/deploy/overview) and you can contact sales [here](mailto:sales@paradedb.com). ### Self-Hosted -First, install [Helm](https://helm.sh/docs/intro/install/). The following steps assume you have a Kubernetes cluster running v1.25+. If you are testing locally, we recommend using [Minikube](https://minikube.sigs.k8s.io/docs/start/). +First, install [Helm](https://helm.sh/docs/intro/install/). The following steps assume you have a Kubernetes cluster running v1.29+. If you are testing locally, we recommend using [Minikube](https://minikube.sigs.k8s.io/docs/start/). #### Monitoring diff --git a/charts/paradedb/Chart.yaml b/charts/paradedb/Chart.yaml index e6d1f3ade..f29d40162 100644 --- a/charts/paradedb/Chart.yaml +++ b/charts/paradedb/Chart.yaml @@ -20,8 +20,8 @@ icon: https://raw.githubusercontent.com/paradedb/paradedb/main/docs/logo/light.s type: application # The Chart version, set in the publish CI workflow from GitHub Actions Variables -# We default to v0.13.1 for testing and local development -version: 0.13.1 +# We default to v0.13.2 for testing and local development +version: 0.13.2 sources: - https://github.com/paradedb/charts diff --git a/charts/paradedb/README.md b/charts/paradedb/README.md index 65e02d6a5..461397013 100644 --- a/charts/paradedb/README.md +++ b/charts/paradedb/README.md @@ -20,7 +20,7 @@ You can read more about the optimal architecture for running ParadeDB in product ### Self-Hosted -First, install [Helm](https://helm.sh/docs/intro/install/). The following steps assume you have a Kubernetes cluster running v1.25+. If you are testing locally, we recommend using [Minikube](https://minikube.sigs.k8s.io/docs/start/). +First, install [Helm](https://helm.sh/docs/intro/install/). The following steps assume you have a Kubernetes cluster running v1.29+. If you are testing locally, we recommend using [Minikube](https://minikube.sigs.k8s.io/docs/start/). #### Monitoring @@ -309,7 +309,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat | recovery.secret.create | bool | `true` | Whether to create a secret for the backup credentials | | recovery.secret.name | string | `""` | Name of the backup credentials secret | | type | string | `"paradedb"` | Type of the CNPG database. Available types: * `paradedb` * `paradedb-enterprise` | -| version.paradedb | string | `"0.13.1"` | We default to v0.13.1 for testing and local development | +| version.paradedb | string | `"0.13.2"` | We default to v0.13.2 for testing and local development | | version.postgresql | string | `"17"` | PostgreSQL major version to use | | poolers[].name | string | `` | Name of the pooler resource | | poolers[].instances | number | `1` | The number of replicas we want | diff --git a/charts/paradedb/README.md.gotmpl b/charts/paradedb/README.md.gotmpl index 641247267..5824dbdc6 100644 --- a/charts/paradedb/README.md.gotmpl +++ b/charts/paradedb/README.md.gotmpl @@ -2,7 +2,7 @@ The [ParadeDB](https://github.com/paradedb/paradedb) Helm Chart is based on the official [CloudNativePG Helm Chart](https://cloudnative-pg.io/). CloudNativePG is a Kubernetes operator that manages the full lifecycle of a highly available PostgreSQL database cluster with a primary/standby architecture using Postgres streaming (physical) replication. -Kubernetes, and specifically the CloudNativePG operator, is the recommended approach for deploying ParadeDB in production, with high availability. ParadeDB also provides a [Docker image](https://hub.docker.com/r/paradedb/paradedb) and [prebuilt binaries](https://github.com/paradedb/paradedb/releases) for Debian, Ubuntu and Red Hat Enterprise Linux. +Kubernetes, and specifically the CloudNativePG operator, is the recommended approach for deploying ParadeDB in production, with high availability. ParadeDB also provides a [Docker image](https://hub.docker.com/r/paradedb/paradedb) and [prebuilt binaries](https://github.com/paradedb/paradedb/releases) for Debian, Ubuntu, Red Hat Enterprise Linux, and macOS. The ParadeDB Helm Chart supports Postgres 13+ and ships with Postgres 17 by default. @@ -14,13 +14,13 @@ The chart is also available on [Artifact Hub](https://artifacthub.io/packages/he The most reliable way to run ParadeDB in production is with ParadeDB BYOC, an end-to-end managed solution that runs in the customer’s cloud account. It deploys on managed Kubernetes services and uses the ParadeDB Helm Chart. -ParadeDB BYOC includes built-in integration with managed PostgreSQL services, such as AWS RDS, via logical replication. It also provides monitoring, logging and alerting through Prometheus and Grafana. The ParadeDB team manages the underlying infrastructure and lifecycle of the cluster. +ParadeDB BYOC includes built-in integration with managed PostgreSQL services, such as AWS RDS and GCP CloudSQL, via logical replication. It also provides monitoring, logging and alerting through Prometheus and Grafana. The ParadeDB team manages the underlying infrastructure and lifecycle of the cluster. You can read more about the optimal architecture for running ParadeDB in production [here](https://docs.paradedb.com/deploy/overview) and you can contact sales [here](mailto:sales@paradedb.com). ### Self-Hosted -First, install [Helm](https://helm.sh/docs/intro/install/). The following steps assume you have a Kubernetes cluster running v1.25+. If you are testing locally, we recommend using [Minikube](https://minikube.sigs.k8s.io/docs/start/). +First, install [Helm](https://helm.sh/docs/intro/install/). The following steps assume you have a Kubernetes cluster running v1.29+. If you are testing locally, we recommend using [Minikube](https://minikube.sigs.k8s.io/docs/start/). #### Monitoring @@ -155,19 +155,6 @@ There are several configuration examples in the [examples](examples) directory. refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/current/) for more advanced configurations. {{ template "chart.valuesSection" . }} -| poolers[].name | string | `` | Name of the pooler resource | -| poolers[].instances | number | `1` | The number of replicas we want | -| poolers[].type | [PoolerType][PoolerType] | `rw` | Type of service to forward traffic to. Default: `rw`. | -| poolers[].poolMode | [PgBouncerPoolMode][PgBouncerPoolMode] | `session` | The pool mode. Default: `session`. | -| poolers[].authQuerySecret | [LocalObjectReference][LocalObjectReference] | `{}` | The credentials of the user that need to be used for the authentication query. | -| poolers[].authQuery | string | `{}` | The credentials of the user that need to be used for the authentication query. | -| poolers[].parameters | map[string]string | `{}` | Additional parameters to be passed to PgBouncer - please check the CNPG documentation for a list of options you can configure | -| poolers[].template | [PodTemplateSpec][PodTemplateSpec] | `{}` | The template of the Pod to be created | -| poolers[].template | [ServiceTemplateSpec][ServiceTemplateSpec] | `{}` | Template for the Service to be created | -| poolers[].pg_hba | []string | `{}` | PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file) | -| poolers[].monitoring.enabled | bool | `false` | Whether to enable monitoring for the Pooler. | -| poolers[].monitoring.podMonitor.enabled | bool | `true` | Create a podMonitor for the Pooler. | - {{ template "chart.maintainersSection" . }} diff --git a/charts/paradedb/examples/image-catalog-ref.yaml b/charts/paradedb/examples/image-catalog-ref.yaml index 00d82045b..5780d5591 100644 --- a/charts/paradedb/examples/image-catalog-ref.yaml +++ b/charts/paradedb/examples/image-catalog-ref.yaml @@ -2,7 +2,7 @@ type: postgresql mode: standalone version: major: "17" - paradedb: "0.13.1" + paradedb: "0.13.2" cluster: instances: 1 imageCatalogRef: diff --git a/charts/paradedb/examples/image-catalog.yaml b/charts/paradedb/examples/image-catalog.yaml index 7f4d8a77c..e26bc78ca 100644 --- a/charts/paradedb/examples/image-catalog.yaml +++ b/charts/paradedb/examples/image-catalog.yaml @@ -2,7 +2,7 @@ type: postgresql mode: standalone version: major: "17" - paradedb: "0.13.1" + paradedb: "0.13.2" cluster: instances: 1 backups: diff --git a/charts/paradedb/examples/paradedb.yaml b/charts/paradedb/examples/paradedb.yaml index c123d7d2d..d2e12c860 100644 --- a/charts/paradedb/examples/paradedb.yaml +++ b/charts/paradedb/examples/paradedb.yaml @@ -2,7 +2,7 @@ type: paradedb mode: standalone version: postgresql: "17" - paradedb: "0.13.1" + paradedb: "0.13.2" cluster: instances: 1 backups: diff --git a/charts/paradedb/templates/_bootstrap.tpl b/charts/paradedb/templates/_bootstrap.tpl index 8ab28bb5b..04283a8ca 100644 --- a/charts/paradedb/templates/_bootstrap.tpl +++ b/charts/paradedb/templates/_bootstrap.tpl @@ -19,6 +19,7 @@ bootstrap: {{- printf "- %s" . | nindent 6 }} {{- end -}} {{- end }} + {{- if or (eq .Values.type "paradedb") (eq .Values.type "paradedb-enterprise") (not (empty .Values.cluster.initdb.postInitApplicationSQL)) }} postInitApplicationSQL: {{- if or (eq .Values.type "paradedb") (eq .Values.type "paradedb-enterprise") }} - CREATE EXTENSION IF NOT EXISTS pg_search; @@ -35,7 +36,9 @@ bootstrap: {{- range .postInitApplicationSQL }} {{- printf "- %s" . | nindent 6 }} {{- end -}} - {{- end }} + {{- end -}} + {{- end }} + {{- if or (eq .Values.type "paradedb") (eq .Values.type "paradedb-enterprise") (not (empty .Values.cluster.initdb.postInitTemplateSQL)) }} postInitTemplateSQL: {{- if or (eq .Values.type "paradedb") (eq .Values.type "paradedb-enterprise") }} - CREATE EXTENSION IF NOT EXISTS pg_search; diff --git a/charts/paradedb/templates/cluster.yaml b/charts/paradedb/templates/cluster.yaml index 345d393b5..21e2ccdbe 100644 --- a/charts/paradedb/templates/cluster.yaml +++ b/charts/paradedb/templates/cluster.yaml @@ -60,7 +60,7 @@ spec: {{ end }} enablePDB: {{ .Values.cluster.enablePDB }} postgresql: - {{- if or (eq .Values.type "timescaledb") (not (empty .Values.cluster.postgresql.shared_preload_libraries)) }} + {{- if or (eq .Values.type "paradedb") (eq .Values.type "paradedb-enterprise") (not (empty .Values.cluster.postgresql.shared_preload_libraries)) }} shared_preload_libraries: {{- if or (eq .Values.type "paradedb") (eq .Values.type "paradedb-enterprise") }} - pg_search @@ -76,7 +76,6 @@ spec: {{- toYaml . | nindent 6 }} {{- end }} {{- with .Values.cluster.postgresql.pg_ident }} - pg_ident: {{- toYaml . | nindent 6 }} {{- end }} @@ -86,9 +85,7 @@ spec: {{ end }} {{- with .Values.cluster.postgresql.parameters }} parameters: - {{ with .parameters }} - {{- toYaml . | nindent 6 }} - {{ end }} + {{- toYaml . | nindent 6 }} cron.database_name: postgres {{ end }} diff --git a/charts/paradedb/test/paradedb-enterprise/01-paradedb-NCC-1701-D_cluster.yaml b/charts/paradedb/test/paradedb-enterprise/01-paradedb-NCC-1701-D_cluster.yaml index 22d1c6da1..435f2c86f 100644 --- a/charts/paradedb/test/paradedb-enterprise/01-paradedb-NCC-1701-D_cluster.yaml +++ b/charts/paradedb/test/paradedb-enterprise/01-paradedb-NCC-1701-D_cluster.yaml @@ -2,7 +2,7 @@ type: paradedb-enterprise mode: standalone version: major: "17" - paradedb: "0.13.1" + paradedb: "0.13.2" cluster: instances: 1 storage: diff --git a/charts/paradedb/test/paradedb-minio-backup-restore/01-paradedb_cluster.yaml b/charts/paradedb/test/paradedb-minio-backup-restore/01-paradedb_cluster.yaml index 51a405ea8..b4db25536 100644 --- a/charts/paradedb/test/paradedb-minio-backup-restore/01-paradedb_cluster.yaml +++ b/charts/paradedb/test/paradedb-minio-backup-restore/01-paradedb_cluster.yaml @@ -2,7 +2,7 @@ type: paradedb mode: standalone version: major: "17" - paradedb: "0.13.1" + paradedb: "0.13.2" cluster: instances: 2 storage: diff --git a/charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml b/charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml deleted file mode 100644 index 9c0f3eb48..000000000 --- a/charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: minio-cleanup -status: - succeeded: 1 diff --git a/charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml b/charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml deleted file mode 100644 index 90151a964..000000000 --- a/charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: minio-cleanup -spec: - template: - spec: - restartPolicy: OnFailure - containers: - - name: minio-cleanup - image: minio/mc - command: ['sh', '-c'] - args: - - | - mc alias set myminio https://minio.minio.svc.cluster.local minio minio123 - mc rm --recursive --force myminio/mybucket/scheduledbackups diff --git a/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml b/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml deleted file mode 100644 index a3af1a25b..000000000 --- a/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: postgresql.cnpg.io/v1 -kind: Cluster -metadata: - name: scheduledbackups-cluster -status: - readyInstances: 1 ---- -apiVersion: postgresql.cnpg.io/v1 -kind: ScheduledBackup -metadata: - name: scheduledbackups-cluster-daily-backup -spec: - immediate: true - schedule: "0 0 0 * * *" - method: barmanObjectStore - backupOwnerReference: self - cluster: - name: scheduledbackups-cluster ---- -apiVersion: postgresql.cnpg.io/v1 -kind: ScheduledBackup -metadata: - name: scheduledbackups-cluster-weekly-backup -spec: - immediate: true - schedule: "0 0 0 * * 1" - method: barmanObjectStore - backupOwnerReference: self - cluster: - name: scheduledbackups-cluster ---- -apiVersion: postgresql.cnpg.io/v1 -kind: Backup -spec: - method: barmanObjectStore - cluster: - name: scheduledbackups-cluster diff --git a/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml b/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml deleted file mode 100644 index 94f6015c4..000000000 --- a/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml +++ /dev/null @@ -1,35 +0,0 @@ -type: postgresql -mode: standalone - -cluster: - instances: 1 - storage: - size: 256Mi - -backups: - enabled: true - provider: s3 - endpointURL: "https://minio.minio.svc.cluster.local" - endpointCA: - name: kube-root-ca.crt - key: ca.crt - wal: - encryption: "" - data: - encryption: "" - s3: - bucket: "mybucket" - path: "/scheduledbackups/v1" - accessKey: "minio" - secretKey: "minio123" - region: "local" - retentionPolicy: "30d" - scheduledBackups: - - name: daily-backup - schedule: "0 0 0 * * *" - backupOwnerReference: self - method: barmanObjectStore - - name: weekly-backup - schedule: "0 0 0 * * 1" - backupOwnerReference: self - method: barmanObjectStore diff --git a/charts/paradedb/test/scheduledbackups/chainsaw-test.yaml b/charts/paradedb/test/scheduledbackups/chainsaw-test.yaml deleted file mode 100644 index c1409ce46..000000000 --- a/charts/paradedb/test/scheduledbackups/chainsaw-test.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: chainsaw.kyverno.io/v1alpha1 -kind: Test -metadata: - name: scheduledbackups -spec: - timeouts: - apply: 1s - assert: 1m - cleanup: 1m - steps: - - name: Install a cluster with ScheduledBackups - try: - - script: - content: | - helm upgrade \ - --install \ - --namespace $NAMESPACE \ - --values ./01-scheduledbackups_cluster.yaml \ - --wait \ - scheduledbackups ../../ - - assert: - file: ./01-scheduledbackups_cluster-assert.yaml - - name: Cleanup - try: - - script: - content: | - helm uninstall --namespace $NAMESPACE scheduledbackups diff --git a/charts/paradedb/values.yaml b/charts/paradedb/values.yaml index fce83cb3e..2de42e257 100644 --- a/charts/paradedb/values.yaml +++ b/charts/paradedb/values.yaml @@ -15,8 +15,8 @@ version: # -- PostgreSQL major version to use postgresql: "17" # -- The ParadeDB version, set in the publish CI workflow from the latest paradedb/paradedb GitHub tag - # -- We default to v0.13.1 for testing and local development - paradedb: "0.13.1" + # -- We default to v0.13.2 for testing and local development + paradedb: "0.13.2" ### # -- Cluster mode of operation. Available modes: