blacklabelops/logrotate

This commit is contained in:
miwr 2025-03-31 11:20:56 +02:00
parent a35aefc376
commit 17f578dde2
2 changed files with 12 additions and 9 deletions

View file

@ -4,11 +4,14 @@ metadata:
name: logrotate-config
data:
logrotate.conf: |
/openbao/logs/*.log {
daily
rotate 7
compress
missingok
notifempty
copytruncate
/openbao/logs/openbao/*.log {
size 5k
rotate 7
compress
missingok
notifempty
postrotate
mkdir pupa
kill -SIGHUP $(pidof bao)
endscript
}

View file

@ -15,8 +15,8 @@ server:
- name: host-log-storage
mountPath: /openbao/logs
- name: logrotate
image: debian:stable-slim
command: ["/bin/sh", "-c", "while true; do /usr/sbin/logrotate /etc/logrotate.conf; sleep 60; done"]
image: blacklabelops/logrotate:latest # MIT-License
# command: ["/bin/sh", "-c", "while true; do /usr/sbin/logrotate /etc/logrotate.conf; sleep 60; done"]
securityContext:
runAsUser: 100
volumeMounts: