From 44f5ff0fdc05b912ca28b21707516f0a91f4fbdf Mon Sep 17 00:00:00 2001 From: Tarashish Mishra Date: Mon, 24 Mar 2025 15:46:54 +0530 Subject: [PATCH 1/3] Upgrade PGO to 5.7.0; Add option to disable backups --- helm-chart/postgrescluster/Chart.yaml | 6 ++++-- helm-chart/postgrescluster/templates/postgres.yaml | 2 ++ helm-chart/postgrescluster/values.yaml | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/helm-chart/postgrescluster/Chart.yaml b/helm-chart/postgrescluster/Chart.yaml index 62d3b14b..16749f4e 100644 --- a/helm-chart/postgrescluster/Chart.yaml +++ b/helm-chart/postgrescluster/Chart.yaml @@ -3,6 +3,8 @@ name: postgrescluster description: A Helm chart for eoapi database dep for k8s type: application # The version below should match the version on the PostgresCluster CRD -version: 5.5.3 -appVersion: 5.5.3 +# from CrunchyData's Postgres Operator +# https://access.crunchydata.com/documentation/postgres-operator/latest/releases +version: 5.7.0 +appVersion: 5.7.0 force: true \ No newline at end of file diff --git a/helm-chart/postgrescluster/templates/postgres.yaml b/helm-chart/postgrescluster/templates/postgres.yaml index d4949796..f668f99f 100644 --- a/helm-chart/postgrescluster/templates/postgres.yaml +++ b/helm-chart/postgrescluster/templates/postgres.yaml @@ -36,6 +36,7 @@ spec: memory: {{ default "" .Values.instanceMemory | quote }} {{- end }} {{- end }} + {{- if .Values.backupsEnabled }} backups: pgbackrest: {{- if .Values.imagePgBackRest }} @@ -142,6 +143,7 @@ spec: requests: storage: {{ default "1Gi" .Values.backupsSize | quote }} {{- end }} + {{- end }} {{- if or .Values.pgBouncerReplicas .Values.pgBouncerConfig }} proxy: pgBouncer: diff --git a/helm-chart/postgrescluster/values.yaml b/helm-chart/postgrescluster/values.yaml index 7321f3ac..a04eeefd 100644 --- a/helm-chart/postgrescluster/values.yaml +++ b/helm-chart/postgrescluster/values.yaml @@ -173,6 +173,13 @@ postgresVersion: 16 # Backups / pgBackRest Settings # ################################# +# backupsEnabled sets whether pgBackRest backups are enabled. +# This is enabled by default. +# Disabling backups is only supported on CrunchyData Postgres Operator v5.7.0 and above. +# If enabled, please carefully review the pgBackRest config below. +# Check out CrunchyData's Postgres Operator docs for more info: +# https://access.crunchydata.com/documentation/postgres-operator/v5/tutorials/backups-disaster-recovery/backups +backupsEnabled: true # backupsSize sets the storage size of the backups to a volume in Kubernetes. # can be overridden by "pgBackRestConfig", if set. Defaults to the value below. # backupsSize: 1Gi From bca36225142d6758c77b4b48bfb34752b5425279 Mon Sep 17 00:00:00 2001 From: Tarashish Mishra Date: Thu, 3 Apr 2025 11:40:21 +0530 Subject: [PATCH 2/3] disable backups by default --- helm-chart/postgrescluster/values.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/helm-chart/postgrescluster/values.yaml b/helm-chart/postgrescluster/values.yaml index a04eeefd..4843b3df 100644 --- a/helm-chart/postgrescluster/values.yaml +++ b/helm-chart/postgrescluster/values.yaml @@ -174,12 +174,14 @@ postgresVersion: 16 ################################# # backupsEnabled sets whether pgBackRest backups are enabled. -# This is enabled by default. +# This is disabled by default. # Disabling backups is only supported on CrunchyData Postgres Operator v5.7.0 and above. +# If you are using a version below v5.7.0, you will need to enable backups. # If enabled, please carefully review the pgBackRest config below. # Check out CrunchyData's Postgres Operator docs for more info: # https://access.crunchydata.com/documentation/postgres-operator/v5/tutorials/backups-disaster-recovery/backups -backupsEnabled: true +backupsEnabled: false + # backupsSize sets the storage size of the backups to a volume in Kubernetes. # can be overridden by "pgBackRestConfig", if set. Defaults to the value below. # backupsSize: 1Gi From aeb1f4336831061a67c9103ca1018cb0429aaf2a Mon Sep 17 00:00:00 2001 From: Tarashish Mishra Date: Thu, 3 Apr 2025 11:41:13 +0530 Subject: [PATCH 3/3] update PGO version in the docs --- docs/helm-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/helm-install.md b/docs/helm-install.md index b89565b2..08ffd420 100644 --- a/docs/helm-install.md +++ b/docs/helm-install.md @@ -3,7 +3,7 @@ 0. `eoapi-k8s` depends on the [Crunchydata Postgresql Operator](https://access.crunchydata.com/documentation/postgres-operator/latest/installation/helm). Install that first: ```bash - $ helm install --set disable_check_for_upgrades=true pgo oci://registry.developers.crunchydata.com/crunchydata/pgo --version 5.5.2 + $ helm install --set disable_check_for_upgrades=true pgo oci://registry.developers.crunchydata.com/crunchydata/pgo --version 5.7.0 ``` 1. Add the eoapi repo from https://devseed.com/eoapi-k8s/: