zalando / zalando/postgres-operator

No observedGeneration in Customer Resource status

Open
#1,698 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement felix-wishlist help wanted
Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Hello community,

Some context

  • Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.6.3
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? OVH Managed Kubernetes
  • Are you running Postgres Operator in production? no
  • Type of issue? feature request

Issue

When retrieving the Custom Resource pg with the command:
kubectl get postgresqls.acid.zalan.do -o=jsonpath='{.items[0].status}'

I get :
{"PostgresClusterStatus":"Running"}

I would have expected to have the field observedGeneration like in many Custom Resources / Resources.

I don't know how to check programmatically that an update on the Custom Resource has been processed without observedGeneration mechanism.
I mean if for example I modify the version of the Postgres and I only check the PostgresClusterStatus value it could be Running but not on the right Postgres version.
The only way I see is using ResourceVersion but it's not really user friendly.

What do you think ?

Thank you,
Thomas

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 reproducing the kubectl command against a PostgreSQL Custom Resource and inspect how the Customer Resource status is defined and updated. Trace the status reconciliation path to determine where the processed generation should be represented. Done means the status exposes observedGeneration consistently after updates, with coverage for the reported version-change scenario.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.