postgrescluster

by Development Seed

Helm chartv5.8.6App 5.8.6Verified publisher

A Helm chart for eoapi database dep for k8s

About this chart

PostgresCluster Helm Chart

A Helm chart wrapper for deploying PostgreSQL clusters using CrunchyData's PostgreSQL Operator (PGO).

Purpose

This chart creates PostgresCluster custom resources that are managed by PGO. It serves as a configuration layer between eoAPI and the PostgreSQL operator, providing:

  • PostGIS support for geospatial data
  • PgBouncer connection pooling
  • Configurable backups (S3, GCS, Azure, or volume-based)
  • eoAPI-specific defaults for schema permissions and database setup

Prerequisites

Install the PostgreSQL Operator first:

helm install --set disable_check_for_upgrades=true pgo \
  oci://registry.developers.crunchydata.com/crunchydata/pgo \
  --version 5.8.6

Usage

This chart is typically used as a dependency of the main eoAPI chart:

# In eoAPI's Chart.yaml
dependencies:
  - name: postgrescluster
    version: 5.8.6
    repository: "https://devseed.com/eoapi-k8s/"
    condition: postgrescluster.enabled

Standalone Installation

helm install my-postgres ./charts/postgrescluster \
  --set postgresVersion=16 \
  --set postGISVersion=3.4

Key Configuration

ParameterDescriptionDefault
postgresVersionPostgreSQL version16
postGISVersionPostGIS version3.4
pgBouncerReplicasNumber of PgBouncer instances1
backupsEnabledEnable pgBackRest backupsfalse
instancesPostgreSQL instance configurationSee values.yaml

Instance Configuration

instances:
  - name: postgres
    replicas: 2  # High availability with 2 replicas
    dataVolumeClaimSpec:
      accessModes: ["ReadWriteOnce"]
      resources:
        requests:
          storage: 10Gi

Backup Configuration

backupsEnabled: true
s3:
  bucket: "my-backups"
  endpoint: "s3.amazonaws.com"
  region: "us-east-1"
  key: "ACCESS_KEY_ID"
  keySecret: "SECRET_ACCESS_KEY"

Deploy postgrescluster with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has postgrescluster on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpostgrescluster is pinned at v5.8.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply