MCPcopy
hub / github.com/zalando/postgres-operator

github.com/zalando/postgres-operator @v1.15.1 sqlite

repository ↗ · DeepWiki ↗ · release v1.15.1 ↗
1,765 symbols 5,956 edges 163 files 703 documented · 40%
README

Postgres Operator

Tests E2E Tests Coverage Status

The Postgres Operator delivers an easy to run highly-available PostgreSQL clusters on Kubernetes (K8s) powered by Patroni. It is configured only through Postgres manifests (CRDs) to ease integration into automated CI/CD pipelines with no access to Kubernetes API directly, promoting infrastructure as code vs manual operations.

Operator features

  • Rolling updates on Postgres cluster changes, incl. quick minor version updates
  • Live volume resize without pod restarts (AWS EBS, PVC)
  • Database connection pooling with PGBouncer
  • Support fast in place major version upgrade. Supports global upgrade of all clusters.
  • Pod protection during bootstrap phase and configurable maintenance windows
  • Restore and cloning Postgres clusters on AWS, GCS and Azure
  • Additionally logical backups to S3 or GCS bucket can be configured
  • Standby cluster from S3 or GCS WAL archive
  • Configurable for non-cloud environments
  • Basic credential and user management on K8s, eases application deployments
  • Support for custom TLS certificates
  • UI to create and edit Postgres cluster manifests
  • Compatible with OpenShift

PostgreSQL features

The Postgres Operator has been developed at Zalando and is being used in production for over five years.

Supported Postgres & K8s versions

Release Postgres versions K8s versions Golang
v1.15.1 13 → 17 1.27+ 1.25.3
v1.14.0 13 → 17 1.27+ 1.23.4
v1.13.0 12 → 16 1.27+ 1.22.5
v1.12.0 11 → 16 1.27+ 1.22.3
v1.11.0 11 → 16 1.27+ 1.21.7
v1.10.1 10 → 15 1.21+ 1.19.8

Getting started

For a quick first impression follow the instructions of this tutorial.

Supported setups of Postgres and Applications

Features Features

Documentation

There is a browser-friendly version of this documentation at postgres-operator.readthedocs.io

Extension points exported contracts — how you extend this code

RetryTicker (Interface)
RetryTicker is a wrapper aroung time.Tick, that allows to mock its implementation [2 implementers]
pkg/util/retryutil/retry_util.go
OAuthTokenGetter (Interface)
OAuthTokenGetter provides the method for fetching OAuth tokens [2 implementers]
pkg/cluster/util.go
UserSyncer (Interface)
UserSyncer defines an interface for the implementations to sync users from the manifest to the DB. [1 implementers]
pkg/spec/types.go
FilesystemResizer (Interface)
FilesystemResizer has methods to work with resizing of a filesystem [1 implementers]
pkg/util/filesystems/filesystems.go
InstallFunction (FuncType)
(no doc)
pkg/cluster/types.go
RingLogger (Interface)
RingLogger describes ring logger methods [1 implementers]
pkg/util/ringlog/ringlog.go
VolumeResizer (Interface)
VolumeResizer defines the set of methods used to implememnt provider-specific resizing of persistent volumes. [1 implementers]
pkg/util/volumes/volumes.go
Interface (Interface)
Interface describe patroni methods
pkg/util/patroni/patroni.go

Core symbols most depended-on inside this repo

StringToPointer
called by 202
pkg/util/k8sutil/k8sutil.go
NameFromMeta
called by 89
pkg/util/util.go
Get
called by 82
pkg/util/httpclient/httpclient.go
String
called by 65
pkg/spec/types.go
get_operator_state
called by 59
e2e/tests/k8s_api.py
New
called by 56
pkg/cluster/cluster.go
setProcessName
called by 55
pkg/cluster/cluster.go
True
called by 54
pkg/util/util.go

Shape

Method 961
Function 526
Struct 163
Interface 49
Route 24
TypeAlias 18
Class 17
FuncType 7

Languages

Go83%
Python17%
TypeScript1%

Modules by API surface

e2e/tests/k8s_api.py104 symbols
pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go88 symbols
ui/operator_ui/main.py73 symbols
pkg/cluster/k8sres.go73 symbols
pkg/cluster/cluster.go60 symbols
e2e/tests/test_e2e.py50 symbols
pkg/util/k8sutil/k8sutil.go48 symbols
pkg/cluster/util.go45 symbols
pkg/cluster/k8sres_test.go45 symbols
pkg/cluster/resources.go37 symbols
pkg/util/util.go36 symbols
pkg/cluster/database.go32 symbols

Dependencies from manifests, versioned

github.com/Masterminds/semverv1.5.0 · 1×
github.com/aws/aws-sdk-gov1.55.8 · 1×
github.com/davecgh/go-spewv1.1.2-0.20180830191 · 1×
github.com/fsnotify/fsnotifyv1.9.0 · 1×
github.com/fxamacker/cbor/v2v2.7.0 · 1×
github.com/go-logr/logrv1.4.2 · 1×
github.com/go-openapi/jsonpointerv0.21.0 · 1×
github.com/go-openapi/jsonreferencev0.20.2 · 1×
github.com/go-openapi/swagv0.23.0 · 1×
github.com/go-viper/mapstructure/v2v2.4.0 · 1×

Datastores touched

fooDatabase · 1 repos

For agents

$ claude mcp add postgres-operator \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact