Skip to content

gregoriomomm/postgres-operator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostgreSQL AGE Operator

age_logo

Go Report Card GitHub Repo stars License

Production-Ready Graph Database on Kubernetes

The PostgreSQL AGE Operator brings the power of Apache AGE (A Graph Extension) to Kubernetes, providing a declarative graph database solution that automatically manages your PostgreSQL clusters with native graph capabilities.

Based on the proven architecture of the Crunchy Data PostgreSQL Operator, this operator extends PostgreSQL with Apache AGE to deliver enterprise-grade graph database functionality with the reliability and features you expect from PostgreSQL.

What is Apache AGE?

Apache AGE is an extension for PostgreSQL that provides graph database functionality. It allows you to:

  • Store and query graph data using Cypher query language
  • Combine SQL and Cypher in the same query
  • Leverage PostgreSQL's reliability, ACID compliance, and ecosystem
  • Build modern applications with relationships at their core

Why PostgreSQL AGE Operator?

This operator makes it easy to deploy and manage PostgreSQL clusters with AGE on Kubernetes, providing:

âś… Graph + Relational: Best of both worlds - graph queries with Cypher, relational queries with SQL
âś… Cloud Native: Designed for Kubernetes from the ground up
âś… High Availability: Automatic failover and replica management
âś… Production Ready: Based on battle-tested Crunchy PostgreSQL Operator
âś… GitOps Friendly: Declarative configuration for your entire database stack

Quick Start

Get a graph database running in under 5 minutes:

# Clone the repository
git clone https://github.com/gregoriomomm/postgres-age-operator
cd postgres-age-operator

# Build the AGE-enabled image
docker build -f Dockerfile.age -t localhost/postgres-age-patroni .

# For Kind clusters: Load the image
kind load docker-image localhost/postgres-age-patroni

# Deploy the operator
kubectl apply --server-side -k config/default

# Create an AGE cluster
kubectl apply -k examples/age-cluster/

# Connect and start using graphs!
kubectl exec -it -n postgres-operator \
  $(kubectl get pod -n postgres-operator -l postgres-operator.crunchydata.com/role=master -o name) \
  -c database -- psql

Features

🎯 Graph Database Capabilities

  • Cypher Query Language: Industry-standard graph query language
  • Hybrid Queries: Combine SQL and Cypher in the same query
  • Graph Algorithms: Built-in support for common graph algorithms
  • Visual Data Modeling: Natural representation of connected data

🚀 Enterprise Features

PostgreSQL Cluster Provisioning

Create, Scale, & Delete PostgreSQL clusters with ease, while fully customizing your Pods and PostgreSQL configuration!

Safe, automated failover backed by a distributed consensus high availability solution. Uses Pod Anti-Affinity to help resiliency; you can configure how aggressive this can be! Failed primaries automatically heal, allowing for faster recovery time.

Support for standby PostgreSQL clusters that work both within and across multiple Kubernetes clusters.

Backups and restores leverage the open source pgBackRest utility and includes support for full, incremental, and differential backups as well as efficient delta restores. Set how long you to retain your backups. Works great with very large databases!

Security and TLS

PGO enforces that all connections are over TLS. You can also bring your own TLS infrastructure if you do not want to use the defaults provided by PGO.

PGO runs containers with locked-down settings and provides Postgres credentials in a secure, convenient way for connecting your applications to your data.

Track the health of your PostgreSQL clusters using the open source pgMonitor library.

Safely apply PostgreSQL updates with minimal impact to the availability of your PostgreSQL clusters.

Advanced Replication Support

Choose between asynchronous and synchronous replication for workloads that are sensitive to losing transactions.

Create new clusters from your existing clusters or backups with efficient data cloning.

Advanced connection pooling support using pgBouncer.

Pod Anti-Affinity, Node Affinity, Pod Tolerations

Have your PostgreSQL clusters deployed to Kubernetes Nodes of your preference. Set your pod anti-affinity, node affinity, Pod tolerations, and more rules to customize your deployment topology!

Choose the type of backup (full, incremental, differential) and how frequently you want it to occur on each PostgreSQL cluster.

Backup to Local Storage, S3, GCS, Azure, or a Combo!

Store your backups in Amazon S3 or any object storage system that supports the S3 protocol. You can also store backups in Google Cloud Storage and Azure Blob Storage.

You can also mix-and-match: PGO lets you store backups in multiple locations.

PGO makes it easy to fully customize your Postgres cluster to tailor to your workload:

Deploy PGO to watch Postgres clusters in all of your namespaces, or restrict which namespaces you want PGO to manage Postgres clusters in!

Included Components

PostgreSQL containers deployed with the PostgreSQL Operator include the following components:

In addition to the above, the geospatially enhanced PostgreSQL + PostGIS container adds the following components:

PostgreSQL Operator Monitoring uses the following components:

For more information about which versions of the PostgreSQL Operator include which components, please visit the compatibility section of the documentation.

Supported Platforms

The PostgreSQL AGE Operator is tested on the following platforms:

  • Kubernetes 1.21+
  • OpenShift 4.8+
  • Rancher
  • Google Kubernetes Engine (GKE)
  • Amazon EKS
  • Microsoft AKS
  • VMware Tanzu
  • Kind (for local development)
  • Minikube

Installation

Prerequisites

  • Kubernetes 1.21+ or OpenShift 4.8+
  • kubectl configured
  • Docker for building images

Quick Install on Kind

# Create a Kind cluster
kind create cluster --name age-demo

# Build and load the image
docker build -f Dockerfile.age -t localhost/postgres-age-patroni .
kind load docker-image localhost/postgres-age-patroni --name age-demo

# Deploy operator
kubectl apply --server-side -k config/default

# Create your first graph database
kubectl apply -k examples/age-cluster/

For production deployments, see AGE-INTEGRATION.md.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Areas where we need help:

  • Testing on different Kubernetes distributions
  • Additional graph algorithm implementations
  • Performance benchmarking
  • Documentation improvements
  • Example applications

Support

Documentation

Releases

When a PostgreSQL Operator general availability (GA) release occurs, the container images are distributed on the following platforms in order:

The image rollout can occur over the course of several days.

To stay up-to-date on when releases are made available in the Crunchy Data Developer Portal, please sign up for the Crunchy Data Developer Program Newsletter. You can also join the PGO project community discord

FAQs, License and Terms

For more information regarding PGO, the Postgres Operator project from Crunchy Data, and Crunchy Postgres for Kubernetes, please see the frequently asked questions.

The installation instructions provided in this repo are designed for the use of PGO along with Crunchy Data's Postgres distribution, Crunchy Postgres, as Crunchy Postgres for Kubernetes. The unmodified use of these installation instructions will result in downloading container images from Crunchy Data repositories - specifically the Crunchy Data Developer Portal. The use of container images downloaded from the Crunchy Data Developer Portal are subject to the Crunchy Data Developer Program terms.

The PGO Postgres Operator project source code is available subject to the Apache 2.0 license with the PGO logo and branding assets covered by our trademark guidelines.

About

Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.7%
  • Other 1.3%