New to KubeDB? Please start here.
Rotate Authentication of PgBouncer
This guide will give an overview on how KubeDB Ops-manager operator Rotate Authentication configuration.
Before You Begin
- You should be familiar with the following
KubeDB
concepts:
How Rotate PgBouncer Authentication Configuration Process Works
The authentication rotation process for PgBouncer using KubeDB involves the following steps:
A user first creates a
PgBouncer
Custom Resource Object (CRO).The
KubeDB Provisioner operator
continuously watches forPgBouncer
CROs.When the operator detects a
PgBouncer
CR, it provisions the requiredPetSets
, along with related resources such as secrets, services, and other dependencies.To initiate authentication rotation, the user creates a
PgBouncerOpsRequest
CR with the desired configuration.The
KubeDB Ops-manager
operator watches forPgBouncerOpsRequest
CRs.Upon detecting a
PgBouncerOpsRequest
, the operator pauses the referencedPgBouncer
object, ensuring that the Provisioner operator does not perform any operations during the authentication rotation process.The
Ops-manager
operator then updates the necessary configuration (such as credentials) based on the providedPgBouncerOpsRequest
specification.After applying the updated configuration, the operator restarts all
PgBouncer
Pods so they come up with the new authentication environment variables and settings.Once the authentication rotation is completed successfully, the operator resumes the
PgBouncer
object, allowing the Provisioner operator to continue its usual operations.
In the next section, we will walk you through a step-by-step guide to rotating PgBouncer authentication using the PgBouncerOpsRequest
CRD.