m2ms / fragalysis-frontend

The React, Redux frontend built by webpack
Other
1 stars 1 forks source link

Fragalysis logs are lost on Pod/Container restart #1018

Open alanbchristie opened 1 year ago

alanbchristie commented 1 year ago

The logs are currently written to /code/logs but this is not persisted in an independent volume, and so anything written is lost when the container (Pod) restarts.

As the stack is a formed from a Kubernetes StatefulSet we could utilise the object's volumeClaimTemplates property. This would automatically create a volume for each Pod and would allow us to keep logs across container restarts (as we do in Squonk).

If we're not already using a rotating file handler we should - so we can be confident just how much file-space the log will consume.

This (probably) does not require any fragalysis code change - it's an adjustment of the templates that orchestrate it ... but we might want to put the logs in /logs rather than amongst the code files in /code/logs?

phraenquex commented 1 year ago

May not be rolled out everywhere. @alanbchristie to verify and confirm.

alanbchristie commented 1 year ago

Change is available in the templates by providing the name of a StorageClass in the template variable stack_log_vol_storageclass. This has been done on the staging stack and will be part of the new Fragalysis deployments.