uWGI was generating warnings about being unable to find plugin files we specify. To fix this, I've added uwsgi-python3 to the list of Alpine packages we install in the container specified the plugins directory in the uWSGI config. The updated uWSGI ConfigMap has been applied to the staging cluster, which eliminated the warning about the logfile plugin. The remaining warning about the python3 plugin will be eliminated once the new container built by this branch is deployed.
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: uwsgi-config
|
|
namespace: atat
|
|
data:
|
|
uwsgi.ini: |-
|
|
[uwsgi]
|
|
callable = app
|
|
module = app
|
|
socket = /var/run/uwsgi/uwsgi.socket
|
|
plugins-dir = /usr/lib/uwsgi
|
|
plugin = python3
|
|
plugin = logfile
|
|
virtualenv = /opt/atat/atst/.venv
|
|
chmod-socket = 666
|
|
chown-socket = atst:atat
|
|
|
|
; logger config
|
|
|
|
; application logs: log without modifying
|
|
logger = secondlogger stdio
|
|
log-route = secondlogger atst
|
|
log-encoder = format:secondlogger ${msg}
|
|
|
|
; default uWSGI messages (start, stop, etc.)
|
|
logger = default stdio
|
|
log-route = default ^((?!atst).)*$
|
|
log-encoder = json:default {"timestamp":"${strftime:%%FT%%T}","source":"uwsgi","severity":"DEBUG","message":"${msg}"}
|
|
log-encoder = nl
|
|
|
|
; uWSGI request logs
|
|
logger-req = stdio
|
|
log-format = request_id=%(var.HTTP_X_REQUEST_ID), pid=%(pid), remote_add=%(addr), request=%(method) %(uri), status=%(status), body_bytes_sent=%(rsize), referer=%(referer), user_agent=%(uagent), http_x_forwarded_for=%(var.HTTP_X_FORWARDED_FOR)
|
|
log-req-encoder = json {"timestamp":"${strftime:%%FT%%T}","source":"req","severity":"INFO","message":"${msg}"}
|
|
log-req-encoder = nl
|