postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

feature request: add support for custom tags and local configs

Open dberardo-com opened this issue 1 year ago • 5 comments
trafficstars

https://github.com/CrunchyData/postgres-operator/blob/c7a885d862fa7e3c43e802c623dad4c4e9991e5c/internal/patroni/config.go#L515

is there any way to add custom local configuration in patroni ?

this would include most importantly tags.

could it be a workaround to remove the ownerREference from the configmap generated by the operator and manually edit the configs ? this might cause an error in the operator itself when it tries to create a configmap finding one with the same name already, but might this work ?

dberardo-com avatar Jun 22 '24 09:06 dberardo-com

Hi @dberardo-com , I am double-checking, but I don't believe there's currently a way to update patroni tags. And I don't believe removing the ownerReference would work because the operator will find the CM with the name/labels that it expects and set the missing fields.

Let me dig in a bit here and get back to you.

benjaminjb avatar Jun 24 '24 19:06 benjaminjb

Oh, and also, for my notes, what functionality are you trying to achieve? What tags would you want to apply?

benjaminjb avatar Jun 24 '24 19:06 benjaminjb

Hey @dberardo-com, just circling back to this to let you know that we don't have a way to handle per-instance tags, but have a ticket for just that in the backlog; and I've added to that a comment re: cluster-wide tags.

benjaminjb avatar Jun 28 '24 17:06 benjaminjb

thanks for the catch up. at the moment i am trying to use the nofailover and failover_priority tags, since i have nodes in the cluster that have not the same hardware characteristics and thus require different handling. i believe that the failover_priority also requires one of the latest patroni versions, so i might have to update the operator CRD as well. If you could kindly confirm this information of mine, as I have never gone through a pgo CRD update and would like to avoid it if not necessary.

at the moment my current "workaround" is to pause the cluster (spec.paused: true) and apply the tags manually on the single configmap files ... quite a bad workaround i know :D

is the tags handling on your release roadmap for next CRD version? i believe that is a quite useful, perhaps still less-known feature of patroni.

dberardo-com avatar Jul 01 '24 06:07 dberardo-com

Hello, any news on this subject?

ElieLiabeuf avatar Mar 26 '25 13:03 ElieLiabeuf

yeap, any news ?

also btw: is there any easy way to update the operator only in a specific k8s namespace using helm ? as simple as upgrading the helm chart version or do we need to manually change all images manually ?

also: currently using tags is only possible by manually changing the config maps for each node and reloading those pods after having paused the pgo operator. this works fine but then the TLS certificates of pgbackrest are not aoutomatically renewed which is a pain. is it possible to extend the the TLS certificate duration of pgbackrest certs to be more than 1 year ? @benjaminjb this is the only way i currently can make use of tags so it would be quite nice to enable this workaround by at least allowing longer expirations on TLS certs

dberardo-com avatar Sep 15 '25 09:09 dberardo-com