zalando / zalando/postgres-operator

Show Us What Didn't Match When Comparing StatefulSet Updates

Open
#2,770 0 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? v1.9.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? EKS
  • Are you running Postgres Operator in production? yes
  • Type of issue? Bug/Feature

Some general remarks when posting a bug report:

  • Please, check the operator, pod (Patroni) and postgresql logs first. When copy-pasting many log lines please do it in a separate GitHub gist together with your Postgres CRD and configuration manifest.
  • If you feel this issue might be more related to the Spilo docker image or Patroni, consider opening issues in the respective repos.

Actual Issue Writeup

The Operator is refusing to update my statefulset because it claims there are new labels being introduced. That line comes from this code:

https://github.com/zalando/postgres-operator/blob/c25dc57b9614df4a89e08c9c766b6f6ee64fb41f/pkg/cluster/cluster.go#L503-L514

However, there's nothing here that indicates what, specifically, has changed, so I don't know how to correct the issue. It would be helpful to log what labels are new in this 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 in pkg/cluster/cluster.go at the linked comparison around lines 503-514, where the StatefulSet update is rejected for introducing labels. Trace the existing refusal path and add logging that identifies the new labels; done means the rejection explains which labels changed when the comparison fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, devops
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.