zalando / zalando/postgres-operator

DB Passwords managed outside (Vault), how to trigger rollout restart ?

Open
#2,693 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Please, answer some short questions which should help us to understand your problem / question better?

  • Which image of the operator are you using?
    registry.opensource.zalan.do/acid/postgres-operator:v1.11.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s]
    Kubernetes (Talos) on OpenStack
  • Are you running Postgres Operator in production?
    Not yet
  • Type of issue?
    Question / Feat request

Hello, we are working on DBaaS service based on postgres-operator for Postgres instances and Hashicorp Vault for database roles and credentials management.
Initially, Postgres system credentials are provided by postgres-operator through the Kubernetes secrets

  • postgres.xxxxxx.credentials.postgresql.acid.zalan.do
  • standby.xxxxxx.credentials.postgresql.acid.zalan.do

and passed through envvar to postgres pods.

We are using inhouse code and Vault Config Operator (VCO) to register Postgres instance in Vault and create roles (static and dynamic). The postgres admin role is managed by Vault with possible rotation.
We are also using Vault Secret Operator (VSO) to sync back credentials from Vault to the initial Kubernetes secret.

But we are missing a way to cleanly trigger Postgres pods/nodes restart to sync envvar and inside-pods Postgres admin and standby credential.
We tried the rolloutRestartTargets feature of VSO or stakater/Reloader to trigger statefulset rollout but the UpdateStragtegy is staticly defined to onDelete and pods are not restarted.

Is there a way to cleanly rollout statefulset to restarts pods/nodes in case of password rotation from Vault ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by tracing how the operator handles the StatefulSet updateStrategy currently set to onDelete, and compare that with VSO's rolloutRestartTargets and stakater/Reloader. Done means defining and documenting a clean, supported restart path for Vault-driven password rotation.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, postgresql
Domain
databases, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.