zalando / zalando/postgres-operator

Disable secret generation

Open
#1,778 3 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • Which image of the operator are you using? Latest, looking at the code.
  • **Where do you run it - Metal. Kubernetes.
  • Are you running Postgres Operator in production? yes
  • Type of issue? Bug report, feature request

We provide our own secrets so we can add additional data to them. Sometimes secrets don't show up for a few moments, for example if using ExternalSecrets.

When applying a set of manifests including a postgresql and an ExternalSecret that will after a short delay supply a Secret, if the operator's sync happens before ExternalSecrets can create the secret, the operator creates it, and then ExternalSecrets updates it.

This creates a mismatch between the password in the secret and in the password in the DB.

Simply being able to disable secret creation would solve this problem.

If we're open to this idea, would adding a new OperatorConfiguration setting (disable_secret_generation?) and checking it here, here, and here be sufficient?

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

Read the proposed OperatorConfiguration setting and the referenced paths in pkg/cluster/sync.go and pkg/cluster/cluster.go. Trace the secret-generation behavior at the three linked locations, then verify that disabling generation lets an externally supplied Secret remain authoritative without causing a password mismatch in the database.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.