Percona in 2021 is heavily invested in making the PostgreSQL ecosystem better and contributing to it from different angles:
With this in mind let me introduce to you Percona Distribution for PostgreSQL Operator version 1.1.0 and its notable features:
Full release notes can be found here.
Updating databases and their components is always a challenge. In our Operators for MySQL and MongoDB we have simplified and automated upgrade procedures, and now it’s time for PostgreSQL. In the 1.1.0 version, we ship this feature as Technical Preview with a plan to promote it to GA in the next release.
This feature consists of two parts:
This feature answers the question: which PostgreSQL/pgBackRest/pgBouncer version should I be running with this Operator? It is important to note, that Version Service and Smart Update can only perform minor version upgrades (ex. from 13.1 to 13.4). Major Version upgrades are manual for now and will be automated in the Operator soon.
The way it works is well depicted on the following diagram:

Version Service is an open source tool, see the source code on Github. Percona hosts check.percona.com and Operators use it by default, but users can run their own self-hosted Version Service.
Users who worked with our Operators for MySQL and MongoDB will find the configuration of Version Service and Smart Update quite familiar:
|
1 |
upgradeOptions:<br> versionServiceEndpoint: https://check.percona.com<br> apply: recommended<br> schedule: "0 2 * * *" |
Okay, now Operator knows the versions that should be used. It is time to apply them and do it with minimal downtime. Here is where the Smart Update feature kicks in.
The heart of Smart Update is smartUpdateCluster function. The goal here is to switch container images versions for database components in a specific order and minimize downtime. Once the image is changed, Kubernetes does the magic. For Deployment resources, which we use in our Operator, Kubernetes first spins up the Pod with a new image and then terminates the old one. This provides minimal downtime. The update itself looks like this:

As a result, the user gets the latest, most secure, and performant PostgreSQL and its components automatically with minimal downtime.
Our Operator has multiple system users to manage the cluster and ensure its health. Our users raised two main concerns:
In this release, we are moving all system users to a single Secret. The change in the Secret resource is going to trigger the update of the passwords in PostgreSQL automatically.
If the cluster is created from scratch the Secret with system users is going to be created automatically and passwords would be randomly generated. By default the Secret name is <clusterName>-users, it can be changed under spec.secretUsers variable in the Custom Resource.
|
1 |
spec:<br> secretsName: my-custom-secret |
When upgrading from 1.0.0 to 1.1.0, if you want to keep old passwords, please create the Secret resource manually. Otherwise, the passwords for system users are going to be generated randomly and updated by the Operator.
PostgreSQL 14 provides an extensive set of new features and enhancements to security, performance, usability for client applications, and more.
Most notable of them include the following:
In the 1.1.0 version of PostgreSQL Distribution for PostgreSQL Operator, we enable our users to run the latest and greatest PostgreSQL 14. PostgreSQL 14 is the default version since this release, but you still can use versions 12 and 13.
Kubernetes Operators are mainly seen as the tool to automate deployment and management of the applications. With this Percona Distribution for PostgreSQL Operator release, we simplify PostgreSQL management even more and enable users to leverage the latest version 14.
We encourage you to try out our operator. See our github repository and check out the documentation.
Found a bug or have a feature idea? Feel free to submit it in JIRA.
For general questions please raise the topic in the community forum.
You are a developer and looking to contribute? Please read our CONTRIBUTING.md and send the Pull Request.
Resources
RELATED POSTS