milvus/build/config/logging/cron-logging.yaml
edward.zeng 27b4f0d5e3
[skip ci] Add comments for ci cron logging (#8877)
Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>
2021-09-29 19:22:23 +08:00

47 lines
902 B
YAML

---
apiVersion: v1
kind: Namespace
metadata:
name: logging
# create dameonset to rsync pod logs
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cron-logging
namespace: logging
labels:
k8s-app: cron-logging
spec:
selector:
matchLabels:
k8s-app: cron-logging
template:
metadata:
labels:
k8s-app: cron-logging
spec:
containers:
- name: rsync
image: "eeacms/rsync:latest"
imagePullPolicy: IfNotPresent
args:
- /bin/sh
- -c
- >
mkdir -p /var/log/history/;
while true;
do
rsync -ax /var/log/pods/ /var/log/history/;
sleep 1;
done
volumeMounts:
- mountPath: /var/log
name: varlog
volumes:
- hostPath:
path: /var/log
name: varlog