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

allow ability to adjust patroni log setting (#1203)

Open mhaley-tignis opened this issue 4 years ago • 8 comments

The operator produces its own SPILO_CONFIGURATION based on the information provided in the postgresql spec. This PR adds a patroni.log section to the spec to allow one to set log configuration for patroni. My end goal is to use this new feature to have patroni output to a log file within a container. I will then use another container in the same pod to scrape those process logs (promtail) and send them to our log storage (loki).

If you like these changes, I will go ahead and update the docs and example too.

Related: I have a PR up for spilo too so that we can configure logs via environment variables (something that this operator already supports) see https://github.com/zalando/spilo/pull/719.

mhaley-tignis avatar Apr 18 '22 19:04 mhaley-tignis

@FxKu picking someone at random to ping. Is there something more I should do to have someone review this PR? The e2e tests are failing because the autogenerate needs to run. I spent a couple hours trying to run it myself without any luck. The update-codegen.sh and the generate-groups.sh script run to completion without error, but they never actually spit anything out.

mhaley-tignis avatar Apr 29 '22 15:04 mhaley-tignis

@CyberDem0n perhaps maybe you can take a look at this PR?

mhaley-tignis avatar May 11 '22 13:05 mhaley-tignis

@sdudoladov @Jan-M @CyberDem0n @FxKu @jopadi hello? Can anyone lend me a hand? I would like to move this PR along so I don't need to continue to maintain my own fork of the library. Thank you!

mhaley-tignis avatar Jul 08 '22 14:07 mhaley-tignis

Is this MR obsolete with the addition of https://github.com/zalando/postgres-operator/pull/1794 in release 1.8 of the operator? I may be wrong but now you should be able to define patroni configuration using Environment Variables and these should have a higher precedence.

jehof avatar Jul 22 '22 05:07 jehof

Is this MR obsolete with the addition of #1794 in release 1.8 of the operator? I may be wrong but now you should be able to define patroni configuration using Environment Variables and these should have a higher precedence.

I was always able to define patroni config using environment variables, but they are ignored by the spilo startup scripts (see https://github.com/zalando/spilo/pull/719).

The suggestion https://github.com/zalando/spilo/issues/718#issuecomment-1099253455 to set the SPILO_CONFIGURATION is not possible because this operator does not let you set that yourself. Thus, the PR to expand the options available to include the ability to set your own log configuration too.

I either need this PR or this https://github.com/zalando/spilo/pull/719 one merged in order to be able to set patroni log settings.

mhaley-tignis avatar Jul 22 '22 14:07 mhaley-tignis

One last attempt. @sdudoladov @Jan-M @CyberDem0n @FxKu @jopadi, is someone able to have a look here? Thanks in advance!

mhaley-tignis avatar Nov 29 '22 15:11 mhaley-tignis

I am interested in this feature too, it's a shame that no one has reviewed this PR since it was opened a year and a half ago..

JulesLalu avatar Oct 17 '23 12:10 JulesLalu