Image catalog v1

A PGD group has its own ImageCatalog and ClusterImageCatalog. ImageCatalog and ClusterImageCatalog are essential resources that allow you to define PGD and PGD Proxy images for creating a PGDGroup.

The key distinction is in their scope: an ImageCatalog is namespaced, while a ClusterImageCatalog is cluster scoped.

Both share a common structure, comprising a list of PGD images and a Proxy image. Each PGD image contains a major field indicating the major Postgres version of the image.

Warning

The operator trusts the user-defined major version and doesn't conduct any PostgreSQL version detection. It's your responsibility to ensure alignment between the declared major version in the catalog and the PostgreSQL image.

The major field's value must remain unique in a catalog, preventing duplication across images. However, distinct catalogs can expose different images under the same major value.

Example of a namespaced ImageCatalog

apiVersion: pgd.k8s.enterprisedb.io/v1beta1
kind: ImageCatalog
metadata:
  name: pgd-postgres-extended
  namespace: default
spec:
  images:
    - major: 15
      image: docker.enterprisedb.com/k8s_enterprise_pgd/edb-postgres-extended:15.12-5.7.0-1
    - major: 16
      image:  docker.enterprisedb.com/k8s_enterprise_pgd/edb-postgres-extended:16.8-5.7.0-1
  proxyImage: docker.enterprisedb.com/k8s_enterprise_pgd/edb-pgd-proxy:5.7.0-1

Example of a cluster-wide catalog using ClusterImageCatalog resource

apiVersion: pgd.k8s.enterprisedb.io/v1beta1
kind: ClusterImageCatalog
metadata:
  name: pgd-postgres-extended
spec:
  images:
    - major: 15
      image: docker.enterprisedb.com/k8s_enterprise_pgd/edb-postgres-extended:15.12-5.7.0-1
    - major: 16
      image:  docker.enterprisedb.com/k8s_enterprise_pgd/edb-postgres-extended:16.8-5.7.0-1
  proxyImage: docker.enterprisedb.com/k8s_enterprise_pgd/edb-pgd-proxy:5.7.0-1

A PGDGroup resource has the flexibility to reference either an ImageCatalog or a ClusterImageCatalog to precisely specify the desired image:

apiVersion: postgresql.k8s.enterprisedb.io/v1
kind: PGDGroup
metadata:
  name: group-example
spec:
  [...]
  imageCatalogRef:
    apiGroup: pgd.k8s.enterprisedb.io
    kind: ImageCatalog
    name: pgd-postgres-extended
    major: 16
  [...]

PGD groups utilizing these catalogs maintain continuous monitoring. Any alterations to the images in a catalog trigger automatic updates for all associated PGD groups that reference that specific entry.