feat: log api-db/keycloak-db slow queries to stdout - #4129
Conversation
|
|
||
| set -eo pipefail | ||
|
|
||
| if [ -n "$MARIADB_LOG_SLOW" ]; then |
There was a problem hiding this comment.
Rather than have a MARIADB_ and MYSQL_ prefix on the variable, why not use APIDB_SLOW_LOG and KEYCLOAKDB_SLOW_LOG
There was a problem hiding this comment.
These are the same vars that turn on slow logging in the base images
There was a problem hiding this comment.
Yeah, my only thing would be there is no way to turn it on for one or the other without doing some crafty chart changes with supporting logic for whether the chart is installing with mysql/mariadb and then keycloakdb/apidb
at least with isolation the chart logic is a bit simpler and the db type wouldn't matter.
There was a problem hiding this comment.
I just saw where you were going to use this, directly with env vars in the values. I guess it works in that case.
General Checklist
Database Migrations
n/a
Description
The default for Lagoon db images is to log queries to
/var/logwhich is not persistent and does not prevent endless growth.This PR configures the slow query log (when enabled) to print to
stdoutso that they can be ingested by normal container log methods.Closing issues
n/a