shipping_openbao_logs #17

Closed
Michal.Wrobel wants to merge 130 commits from shipping_openbao_logs into development
Showing only changes of commit 278cf798f4 - Show all commits

View file

@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: openbao-logrotate
namespace: openbao
spec:
selector:
matchLabels:
app: openbao-logrotate
template:
metadata:
labels:
app: openbao-logrotate
spec:
containers:
- name: logrotate
image: alpine
command: ["/bin/sh", "-c"]
args:
- |
apk add --no-cache logrotate
while true; do logrotate -f /etc/logrotate.d/openbao; sleep 3600; done
volumeMounts:
- name: logrotate-config
mountPath: /etc/logrotate.d/openbao
subPath: openbao
- name: host-log
mountPath: /var/log/openbao
volumes:
- name: logrotate-config
configMap:
name: openbao-logrotate-config
- name: host-log
hostPath:
path: /var/log
type: Directory
---
apiVersion: v1
kind: ConfigMap
metadata:
name: openbao-logrotate-config
namespace: openbao
data:
openbao: |
/var/log/openbao/*.log {
size 5k
rotate 7
compress
missingok
notifempty
postrotate
kill -SIGHUP $(pidof bao)
endscript
}