mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
27b4f0d5e3
Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>
47 lines
902 B
YAML
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
|