-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhcloud-logrotate.yaml
91 lines (91 loc) · 2.13 KB
/
hcloud-logrotate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
# Source: logrotate/templates/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
configmap.reloader.stakater.com/reload: logrotate
name: logrotate
namespace: kube-system
spec:
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
app: logrotate
group: com.stakater.platform
provider: stakater
version: "3.13.0"
chart: "logrotate-1.0.19"
release: "logrotate"
heritage: "Helm"
template:
metadata:
labels:
app: logrotate
group: com.stakater.platform
provider: stakater
version: "3.13.0"
chart: "logrotate-1.0.19"
release: "logrotate"
heritage: "Helm"
name: logrotate
namespace: kube-system
spec:
containers:
- name: logrotate
image: "stakater/logrotate:3.13.0"
securityContext:
privileged: true
volumeMounts:
- name: containers
mountPath: /var/lib/docker/containers
- name: logrotate-config
mountPath: /etc/logrotate.d/k8s-rotator.conf
subPath: k8s-rotator.conf
env:
- name: CRON_SCHEDULE
value: "0 1 * * *"
tolerations:
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
volumes:
- hostPath:
path: /var/lib/docker/containers
name: containers
- configMap:
name: logrotate
name: logrotate-config
---
# Source: logrotate/templates/configMap.yaml
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: ConfigMap
metadata:
annotations:
fabric8.io/target-platform: kubernetes
labels:
app: logrotate
group: com.stakater.platform
provider: stakater
version: "3.13.0"
chart: "logrotate-1.0.19"
release: "logrotate"
heritage: "Helm"
name: logrotate
namespace: kube-system
data:
k8s-rotator.conf: |-
/var/lib/docker/containers/*/*.log {
weekly
rotate 1
copytruncate
missingok
notifempty
compress
maxsize 10M
}