Dmitrii Dolgov d5b7c94ba3 Extend infrastructure roles handling
Postgres Operator uses infrastructure roles to provide access to a
database for external users e.g. for monitoring purposes. Such
infrastructure roles are expected to be present in the form of k8s
secrets with the following content:

    inrole1: some_encrypted_role
    password1: some_encrypted_password
    user1: some_entrypted_name

    inrole2: some_encrypted_role
    password2: some_encrypted_password
    user2: some_entrypted_name

The format of this content is implied implicitely and not flexible
enough. In case if we do not have possibility to change the format of a
secret we want to use in the Operator, we need to recreate it in this
format.

To address this lets make the format of secret content explicitely. The
idea is to introduce a new configuration option for the Operator.

    infrastructure_roles_secrets:
    - secret: k8s_secret_name
      name: some_encrypted_name
      password: some_encrypted_password
      role: some_encrypted_role

    - secret: k8s_secret_name
      name: some_encrypted_name
      password: some_encrypted_password
      role: some_encrypted_role

This would allow Operator to use any avalable secrets to prepare
infrastructure roles. To make it backward compatible simulate the old
behaviour if the new option is not present.

The new configuration option is intended be used mainly from CRD, but
it's also available via Operator ConfigMap in a limited fashion. For
ConfigMap one can put there only a string with one secret definition in
the following format (as a string):

    infrastructure_roles_secret_name: |
        secret: k8s_secret_name,
        name: some_encrypted_name,
        password: some_encrypted_password,
        role: some_encrypted_role
2020-07-27 10:38:02 +02:00
2020-07-08 11:56:58 +02:00
2020-03-25 12:57:26 +01:00
2019-12-10 14:54:12 +01:00
2020-07-08 11:56:58 +02:00
2020-07-27 10:38:02 +02:00
2019-06-05 17:07:27 +02:00
2018-11-27 12:00:15 +01:00
2020-03-30 15:50:17 +02:00
2018-11-07 13:06:53 +01:00
2019-06-14 14:56:40 +02:00
2019-07-11 17:19:27 +02:00
2020-03-30 15:50:17 +02:00
2020-06-16 10:51:49 +02:00
2020-06-16 10:51:49 +02:00

Postgres Operator

Build Status Coverage Status Go Report Card GoDoc golangci

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, others pending)
  • Database connection pooler with PGBouncer
  • Restore and cloning Postgres clusters (incl. major version upgrade)
  • Additionally logical backups to S3 bucket can be configured
  • Standby cluster from S3 WAL archive
  • Configurable for non-cloud environments
  • Basic credential and user management on K8s, eases application deployments
  • UI to create and edit Postgres cluster manifests
  • Works well on Amazon AWS, Google Cloud, OpenShift and locally on Kind

PostgreSQL features

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

Getting started

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

Supported setups of Postgres and Applications

Features

Documentation

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

Google Summer of Code

The Postgres Operator made it to the Google Summer of Code 2019! Check our ideas and start discussions in the issue tracker.

Community

There are two places to get in touch with the community:

  1. The GitHub issue tracker
  2. The #postgres-operator slack channel
S
Description
Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
Readme
116 MiB
Languages
Go 76.5%
Python 13.4%
Pug 5.9%
Shell 2%
JavaScript 0.7%
Other 1.5%