zalando / zalando/postgres-operator

Add secretAnnotations to postgresql cluster manifest to support kubernetes-reflector

Open
#2,680 4 comments 5 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

  • Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.12.2
    ghcr.io/zalando/postgres-operator:v1.12.2

  • Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s]
    GCP

  • Are you running Postgres Operator in production? [yes | no]
    Not yet

  • Type of issue? [Bug report, question, feature request, etc.]
    Feature Request

Unfortunately at the moment secretAnnotations are not supported in the postgresql cluster manifest.
Would it be possible to include them please? I would like to be able to sync my secrets to a different namespace using the emberstack kubernetes-reflector https://github.com/emberstack/kubernetes-reflector, unfortunately this requires the ability to add secretAnnotations.

I can see the need for secretAnnotations is also mentioned in https://github.com/zalando/postgres-operator/issues/1736 which was closed with a different outcome due to the specified use case. One comment in this issue https://github.com/zalando/postgres-operator/issues/1736#issuecomment-2120152492 is from another user with the same use case.

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

Start by locating the postgresql cluster manifest handling and the code that creates or updates Kubernetes Secrets. Trace how annotations are currently defined or propagated, then check the relevant operator tests and manifest behavior. Done means users can configure secretAnnotations and the resulting Secret carries them for kubernetes-reflector synchronization.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.