PATRONI_LOG_* environment variables are ignored.
See original GitHub issueIt seems that most environment variables are removed before starting the patroni process. I was attempting to configure patroni to log to a directory (instead of stdout) by using the PATRONI_LOG_DIR
environment variable, but the runit/patroni/run
script seems to be working against me here:
# Only small subset of environment variables is allowed. We don't want accidentally disclose sensitive information
for E in $(printenv -0 | tr '\n' ' ' | sed 's/\x00/\n/g' | grep -vE '^(KUBERNETES_(SERVICE|PORT|ROLE)[_=]|((POD_(IP|NAMESPACE))|HOSTNAME|PATH|PGHOME|LC_ALL|ENABLE_PG_MON)=)' | sed 's/=.*//g'); do
unset $E
done
ref: https://github.com/zalando/spilo/blob/master/postgres-appliance/runit/patroni/run#L24-L26
Would it be possible to add |(PATRONI_LOG_.*=)
to the regex to allow PATRONI_LOG_* variables to be passed to the process?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Environment Configuration Settings - Patroni documentation
This document lists all environment variables handled by Patroni. ... PATRONI_LOG_FILE_SIZE: Size of patroni.log file (in bytes) that triggers a log rolling ...
Read more >Kubernetes environment variables don't seem to take effect
It seems that you don't run Patroni directly, but via Spilo, where the most (if not all) PATRONI_* environment variables are simply ignored....
Read more >Dynamic configuration settings - Patroni
Dynamic configuration is stored in the DCS (Distributed Configuration Store) and applied on all cluster nodes. Some parameters, like loop_wait , ttl , ......
Read more >Patroni Documentation - Read the Docs
First of all it should start printing log lines every 5 seconds ... This document lists all environment variables handled by Patroni.
Read more >Geo - The gitlab-ctl reconfigure fails when enabling a Patroni ...
Summary While spinning up a new Geo deployment with Patroni, ... unmanaged env files for consul service] action run (skipped due to only_if) ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can always inject part of Patroni configuration via
SPILO_CONFIGURATION
:@CyberDem0n any additional thoughts here? Are we unable to rely on patroni process to protect itself? If not, an alternative solution is here https://github.com/zalando/postgres-operator/pull/1857. Either one solves my needs.