diff --git a/.github/workflows/helm-tests.yml b/.github/workflows/helm-tests.yml index c3950f12..ada2daf3 100644 --- a/.github/workflows/helm-tests.yml +++ b/.github/workflows/helm-tests.yml @@ -111,6 +111,10 @@ jobs: echo "vector service has started, moving on..." while [[ -z "$(kubectl get pod | grep "^stac-$RELEASE_NAME-.*$" | cut -d' ' -f1 | xargs -I{} kubectl logs pod/{} | grep "GET /_mgmt/ping" | head -n 1)" ]]; do echo "still waiting for stac service to start..." + kubectl get pods + kubectl get jobs + kubectl get svc + kubectl get services sleep 1 done echo "all services have started, moving on..." diff --git a/Makefile b/Makefile index c0560ba5..1d3dbe08 100755 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # Variables HELM_REPO_URL=https://devseed.com/eoapi-k8s/ HELM_CHART_NAME=eoapi/eoapi -PGO_CHART_VERSION=5.7.0 +PGO_CHART_VERSION=5.7.4 .PHONY: all deploy minikube ingest help diff --git a/helm-chart/eoapi/initdb-data/pgstac-setup.py b/helm-chart/eoapi/initdb-data/pgstac-setup.py index e1d6cbba..b05b5349 100644 --- a/helm-chart/eoapi/initdb-data/pgstac-setup.py +++ b/helm-chart/eoapi/initdb-data/pgstac-setup.py @@ -38,6 +38,7 @@ "GRANT pgstac_read TO {username};" "GRANT pgstac_ingest TO {username};" "GRANT pgstac_admin TO {username};" + "ALTER USER {username} SET search_path TO pgstac, public;" # add pgstac to search_path by default ).format( db_name=sql.Identifier(os.environ["POSTGRES_DBNAME"]), username=sql.Identifier(os.environ["POSTGRES_USER"]), diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index e038b479..26fbb9a5 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -147,7 +147,7 @@ pgstacBootstrap: enabled: true image: name: ghcr.io/stac-utils/pgstac - tag: v0.8.2 + tag: v0.9.5 command: - "sh" args: @@ -323,7 +323,7 @@ stac: requestRate: 100000m image: name: ghcr.io/stac-utils/stac-fastapi-pgstac - tag: 2.4.9 + tag: 5.0.1 command: - "uvicorn" - "stac_fastapi.pgstac.app:app" diff --git a/helm-chart/postgrescluster/Chart.yaml b/helm-chart/postgrescluster/Chart.yaml index 62d3b14b..6d74f65f 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 -force: true \ No newline at end of file +# from CrunchyData's Postgres Operator +# https://access.crunchydata.com/documentation/postgres-operator/latest/releases +version: 5.7.4 +appVersion: 5.7.4 +force: true 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