https://github.com/CrunchyData/postgres-operator Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} CrunchyData / postgres-operator Public * Notifications * Fork 436 * Star 2.8k Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service. access.crunchydata.com/documentation/postgres-operator/v5/ License Apache-2.0 license 2.8k stars 436 forks Star Notifications * Code * Issues 183 * Pull requests 7 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights CrunchyData/postgres-operator This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 13 branches 156 tags Code Latest commit @jmckulk jmckulk Allow Streaming Replication ... 7241a02 Jun 22, 2022 Allow Streaming Replication Clusters can now be configured to automatically enable streaming replication from a remote primary. - The `spec.standby` section of the postgrescluster spec allows users to define a `host` and `port` that point to a remote primary - The `repoName` field is now optional - Certificate auth is required when connecting to the primary. Users must configure custom tls certs on the standby that allow this authentication method - Replication user will be the default `_crunchyrepl` user - A cluster will not be created if the standby spec is invalid - kuttl: deploy two clusters, a primary and standby, in a single namespace. Ensure that the standby cluster has replicated the primary data and the walreciever process is running 7241a02 Git stats * 3,560 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Update Github question template May 24, 2022 bin Update Copyright to 2022 Jan 4, 2022 build Allow Custom Sidecars for pgBouncer Pods Jun 16, 2022 cmd/postgres-operator Add support for feature gates Jun 10, 2022 conf Remove now superfluous scripts Jun 6, 2021 config Allow Streaming Replication Jun 22, 2022 docs Allow Streaming Replication Jun 22, 2022 examples/postgrescluster Pre-release update for v5.1.1 (#3200) May 16, 2022 hack Update the 'Create TODO patch Script' for instance sidecar containers Jun 14, 2022 installers Pre-release update for v5.1.1 (#3200) May 16, 2022 internal Allow Streaming Replication Jun 22, 2022 licenses Use Go tools to gather license files Jun 28, 2021 pkg/apis/postgres-operator.crunchydata.com/v1beta1 Allow Streaming Replication Jun 22, 2022 redhat/atomic Use Go tools to gather license files Jun 28, 2021 testing Allow Streaming Replication Jun 22, 2022 .dockerignore Bump Kubernetes modules to v0.19.2 Oct 23, 2020 .gitignore Add PostGIS enabled cluster Kuttl E2E test Mar 23, 2022 .gitmodules Move "hugo" to "docs" Mar 6, 2020 .golangci.next.yaml Disable errchkjson linter temporarily Jan 26, 2022 .golangci.yaml Disable the "gci" Go linter Feb 23, 2022 CONTRIBUTING.md Minor update to contribution guide Sep 15, 2021 LICENSE.md Update Copyright to 2022 Jan 4, 2022 Makefile Pre-release update for v5.1.1 (#3200) May 16, 2022 README.md Updated pgversions and updated components in prep for (#3117) Mar 30, 2022 go.mod Add support for feature gates Jun 10, 2022 go.sum Bump gopkg.in/yaml.v3 to v3.0.0 May 26, 2022 View code [ ] PGO: The Postgres Operator from Crunchy Data Production Postgres Made Easy Installation Cloud Native Postgres for Kubernetes PostgreSQL Cluster Provisioning High Availability Disaster Recovery Security and TLS Monitoring Upgrade Management Advanced Replication Support Clone Connection Pooling Pod Anti-Affinity, Node Affinity, Pod Tolerations Scheduled Backups Backup to Local Storage, S3, GCS, Azure, or a Combo! Full Customizability Namespaces Included Components Supported Platforms Contributing to the Project Support Documentation Past Versions Releases README.md PGO: The Postgres Operator from Crunchy Data PGO: The Postgres Operator from Crunchy Data Go Report Card Production Postgres Made Easy PGO, the Postgres Operator from Crunchy Data, gives you a declarative Postgres solution that automatically manages your PostgreSQL clusters. Designed for your GitOps workflows, it is easy to get started with Postgres on Kubernetes with PGO. Within a few moments, you can have a production-grade Postgres cluster complete with high availability, disaster recovery, and monitoring, all over secure TLS communications. Even better, PGO lets you easily customize your Postgres cluster to tailor it to your workload! With conveniences like cloning Postgres clusters to using rolling updates to roll out disruptive changes with minimal downtime, PGO is ready to support your Postgres data at every stage of your release pipeline. Built for resiliency and uptime, PGO will keep your Postgres cluster in its desired state, so you do not need to worry about it. PGO is developed with many years of production experience in automating Postgres management on Kubernetes, providing a seamless cloud native Postgres solution to keep your data always available. Installation We recommend following our Quickstart for how to install and get up and running with PGO, the Postgres Operator from Crunchy Data. However, if you can't wait to try it out, here are some instructions to get Postgres up and running on Kubernetes: 1. Fork the Postgres Operator examples repository and clone it to your host machine. For example: YOUR_GITHUB_UN="" git clone --depth 1 "git@github.com:${YOUR_GITHUB_UN}/postgres-operator-examples.git" cd postgres-operator-examples 2. Run kubectl apply -k kustomize/install For more information please read the Quickstart and Tutorial. Cloud Native Postgres for Kubernetes PGO, the Postgres Operator from Crunchy Data, comes with all of the features you need for a complete cloud native Postgres experience on Kubernetes! PostgreSQL Cluster Provisioning Create, Scale, & Delete PostgreSQL clusters with ease, while fully customizing your Pods and PostgreSQL configuration! High Availability 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. Disaster Recovery 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. Monitoring Track the health of your PostgreSQL clusters using the open source pgMonitor library. Upgrade Management 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. Clone Create new clusters from your existing clusters or backups with efficient data cloning. Connection Pooling 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! Scheduled Backups 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. Full Customizability PGO makes it easy to fully customize your Postgres cluster to tailor to your workload: * Choose the resources for your Postgres cluster: container resources and storage size. Resize at any time with minimal disruption. * + Use your own container image repository, including support imagePullSecrets and private repositories * Customize your PostgreSQL configuration Namespaces 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: * PostgreSQL + PostgreSQL Contrib Modules + PL/Python + PL/Python 3 + PL/Perl + PL/Tcl + pgAudit + pgAudit Analyze + pg_cron + pg_partman + pgnodemx + set_user + TimescaleDB (Apache-licensed community edition) + wal2json * pgBackRest * pgBouncer * pgAdmin 4 * pgMonitor * Patroni * LLVM (for JIT compilation) In addition to the above, the geospatially enhanced PostgreSQL + PostGIS container adds the following components: * PostGIS * pgRouting PostgreSQL Operator Monitoring uses the following components: * pgMonitor * Prometheus * Grafana * Alertmanager Additional containers that are not directly integrated with the PostgreSQL Operator but can work alongside it include: * pgPool II * pg_upgrade * pgBench For more information about which versions of the PostgreSQL Operator include which components, please visit the compatibility section of the documentation. Supported Platforms PGO, the Postgres Operator from Crunchy Data, is tested on the following platforms: * Kubernetes 1.20+ * OpenShift 4.6+ * Rancher * Google Kubernetes Engine (GKE), including Anthos * Amazon EKS * Microsoft AKS * VMware Tanzu This list only includes the platforms that the Postgres Operator is specifically tested on as part of the release process: PGO works on other Kubernetes distributions as well. Contributing to the Project Want to contribute to the PostgreSQL Operator project? Great! We've put together a set of contributing guidelines that you can review here: * Contributing Guidelines Once you are ready to submit a Pull Request, please ensure you do the following: 1. Reviewing the contributing guidelines and ensure your that you have followed the commit message format, added testing where appropriate, documented your changes, etc. 2. Open up a pull request based upon the guidelines. If you are adding a new feature, please open up the pull request on the master branch. 3. Please be as descriptive in your pull request as possible. If you are referencing an issue, please be sure to include the issue in your pull request Support If you believe you have found a bug or have a detailed feature request, please open a GitHub issue and follow the guidelines for submitting a bug. For general questions or community support, we welcome you to join the PGO project community mailing list at https://groups.google.com/a /crunchydata.com/forum/#!forum/postgres-operator/join and ask your question there. For other information, please visit the Support section of the documentation. Documentation For additional information regarding the design, configuration, and operation of the PostgreSQL Operator, pleases see the Official Project Documentation. If you are looking for the nightly builds of the documentation, you can view them at: https://crunchydata.github.io/postgres-operator/latest/ Past Versions Documentation for previous releases can be found at the Crunchy Data Access Portal Releases When a PostgreSQL Operator general availability (GA) release occurs, the container images are distributed on the following platforms in order: * Crunchy Data Customer Portal * Crunchy Data Developer Portal * DockerHub 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 mailing list 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. access.crunchydata.com/documentation/postgres-operator/v5/ Topics kubernetes postgres database postgresql database-as-a-service operator database-management high-availability kubernetes-operator disaster-recovery postgresql-monitoring pgo data-infrastructure postgresql-metrics postgres-operator postgresql-clusters Resources Readme License Apache-2.0 license Stars 2.8k stars Watchers 56 watching Forks 436 forks Used by 6 * @opdev * @opdev * @rocrisp * @evoila * @CrunchyData Contributors 86 * @jmccormick2001 * @crunchy-buildbot * @jkatz * @cbandy * @andrewlecuyer * @jmckulk * @tjmoore4 * @cahoonpwork * @xenophenes * @wilybrace * @benjaminjb + 75 contributors Languages * Go 95.7% * Shell 3.1% * Other 1.2% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.