No description
  • HCL 37.7%
  • Dockerfile 31.9%
  • Shell 30.1%
  • Makefile 0.3%
Find a file
2026-07-27 23:08:22 +00:00
.woodpecker feat: make manual publish runs idempotent resyncs 2026-07-16 10:03:13 +02:00
docs docs: add pg_fts implementation plan 2026-07-17 02:02:31 +02:00
hll fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
pg-crash fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
pg_bigm fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
pg_cron fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
pg_fts chore(deps): update dependency gburd/pg_fts to v1.1.4 2026-07-27 23:02:17 +00:00
pg_incremental fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
pg_ivm fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
pg_jsonschema feat: add pg_jsonschema extension 2026-07-16 22:08:41 +02:00
pg_textsearch docs: point pg_textsearch README at the pg_fts alternative 2026-07-17 02:14:01 +02:00
pgaudit fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
pgvector fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
pgvectorscale feat: add pgvectorscale extension 2026-07-16 09:26:03 +02:00
postgis fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
postgres_dev fix: allow postgres dev host connections 2026-06-09 21:58:42 +02:00
scripts feat: publish images automatically on merge to main 2026-07-15 08:57:31 +02:00
timescaledb-oss chore(deps): update dependency postgresql-18-timescaledb 2026-07-17 13:00:29 +00:00
wal2json fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00
.dockerignore chore: scaffold extension image build 2026-06-09 11:57:32 +02:00
.gitignore chore: generate builds from extension metadata 2026-06-09 13:53:29 +02:00
docker-bake.hcl chore: generate builds from extension metadata 2026-06-09 13:53:29 +02:00
Makefile chore: generate builds from extension metadata 2026-06-09 13:53:29 +02:00
README.md docs: bring root README index up to date 2026-07-17 02:22:08 +02:00
renovate.json fix: make renovate extractVersion actually apply to README tags and HCL sql pins 2026-07-16 23:59:08 +02:00

CNPG Extension Images

This repository builds PostgreSQL extension images for CloudNativePG ImageVolume extensions. Images follow the CNPG convention:

  • /share/extension contains extension control and SQL files
  • /lib contains PostgreSQL shared libraries

The current matrix targets PostgreSQL 18 because CNPG ImageVolume extension loading relies on PostgreSQL 18+ extension_control_path. The matrix is kept as a PostgreSQL-version list so PostgreSQL 19 can be added without changing the repository layout.

Images

Images are published to forge.netserv.fr/azsiaz/cnpg-extension-image/<image>:<version>-pg<major>-<distro> — one repository per extension (the Image column of the table below), plus forge.netserv.fr/azsiaz/cnpg-extension-image/postgres-dev:pg<major>-<distro>. <version> is the SQL extension version (the value \dx reports and the version field of a CNPG Database resource expects).

Every merge to main automatically publishes the images affected by the change (per-directory triage: a Renovate bump of one extension only rebuilds and publishes that extension plus postgres-dev). Alongside the updated stable tag, each publish adds an immutable tag suffixed with a UTC timestamp (<version>-pg<major>-<distro>-YYYYMMDDhhmm). Manually triggered pipeline runs republish the stable tags only (idempotent resync, no new immutable tags).

Use the immutable tag in CloudNativePG manifests. The stable tag is kept as a convenience alias, but Kubernetes image volumes default to IfNotPresent for non-latest tags and CNPG only rolls pods when the cluster/catalog spec changes.

Supported distros:

  • bookworm
  • trixie

Supported architectures:

  • linux/amd64
  • linux/arm64

Build

make generate
docker buildx bake

Run the local smoke build and image layout inspection:

make smoke

BuildKit cache is exported to Forgejo container tags named:

forge.netserv.fr/azsiaz/cnpg-extension-image/buildcache:<image>-pg<major>-<distro>

This keeps cache state visible in Forgejo without mixing cache tags with the runtime extension image versions.

Adding Extensions

Extension metadata is the source of truth for generated build files. To add an extension, add a directory containing:

my-extension/
  Dockerfile
  README.md
  metadata.hcl

Then regenerate the derived files:

make generate

This updates:

  • docker-bake.override.hcl
  • extensions.generated.json
  • postgres_dev/Dockerfile
  • postgres_dev/postgresql.conf
  • postgres_dev/init-extensions.sql

These files are ignored by Git. The generated Bake override is loaded automatically by docker buildx bake, and Woodpecker regenerates it before building or publishing images.

Use metadata.dev for local postgres-dev image behavior. For example, pg_crash is packaged but not preloaded in the dev image:

dev = {
  preload               = false
  create_extension      = false
  postgresql_parameters = false
}

CloudNativePG Usage

shared_preload_libraries is not required by ImageVolume itself. It is required only when an extension needs to be loaded at PostgreSQL startup.

Current versions live in each extension's README (Renovate keeps them up to date there); this table is the index.

Extension Image Preload Usage
hll hll No docs
pg_bigm pg-bigm shared_preload_libraries docs
pg_crash pg-crash Only for explicit crash testing docs
pg_cron pg-cron shared_preload_libraries + cron.database_name docs
pg_fts pg-fts No docs
pg_incremental pg-incremental No (needs pg_cron mounted) docs
pg_ivm pg-ivm shared_preload_libraries docs
pg_jsonschema pg-jsonschema No docs
pg_textsearch pg-textsearch shared_preload_libraries docs
pgaudit pgaudit shared_preload_libraries docs
postgis postgis-extension No docs
timescaledb timescaledb-oss shared_preload_libraries docs
vector pgvector No docs
vectorscale pgvectorscale No (needs vector mounted) docs
wal2json wal2json No docs

Local Docker Compose

For local development outside Kubernetes, build a regular PostgreSQL image that copies the extension artifacts from these ImageVolume images. See Local Docker Compose usage.

References