inherited_annotations / inherited_labels do not update PVCs / PDBs / secrets with labels/annotations if they were created before applying the config #2642
Please, answer some short questions which should help us to understand your problem / question better?
Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.11.0
1.10
Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s]
AKS
Are you running Postgres Operator in production? [yes | no]
No, but soon, we have been running it in our dev envs for quite some time.
Type of issue? [Bug report, question, feature request, etc.]
question / possible bug?
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.
I have tried this with both inherited_annotations and inherited_labels, when creating a new postgresql cluster, it works as expected, the labels / annotations are applied to the pvc / pdb / secrets as expected. However, if there is an existing postgresql cluster (created before the inherited_annotations / inherited_labels were set) the pvc / pdb / secret does not get updated with the labels /annotations. The pooler, db and services seem to get updated with the values.
I should also mention, I tried this with annotations and validated that the values weren't being propagated to pvc/pdb/secrets; I also tried with labels but only validated that values weren't set on the pvc in that case (I'm assuming that the other objects were not tagged in the same manner as annotations).
Please, answer some short questions which should help us to understand your problem / question better?
Some general remarks when posting a bug report:
I have tried this with both
inherited_annotations
andinherited_labels
, when creating a new postgresql cluster, it works as expected, the labels / annotations are applied to the pvc / pdb / secrets as expected. However, if there is an existing postgresql cluster (created before theinherited_annotations
/inherited_labels
were set) the pvc / pdb / secret does not get updated with the labels /annotations. The pooler, db and services seem to get updated with the values.I should also mention, I tried this with annotations and validated that the values weren't being propagated to pvc/pdb/secrets; I also tried with labels but only validated that values weren't set on the pvc in that case (I'm assuming that the other objects were not tagged in the same manner as annotations).
Is this a bug?
Thank you!