forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsiem-forwarder.yaml
More file actions
78 lines (75 loc) 路 1.85 KB
/
Copy pathsiem-forwarder.yaml
File metadata and controls
78 lines (75 loc) 路 1.85 KB
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
apiVersion: v1
kind: ConfigMap
metadata:
name: siem-forwarder-config
namespace: monitoring
data:
fluent-bit.conf: |
[SERVICE]
Flush 5
Log_Level info
[INPUT]
Name tail
Path /var/log/containers/*.log
Tag kube.*
Refresh_Interval 5
Mem_Buf_Limit 5MB
[FILTER]
Name kubernetes
Match kube.*
Kube_URL https://kubernetes.default.svc:443
Merge_Log On
[OUTPUT]
Name kinesis_firehose
Match kube.*
region us-east-1
delivery_stream ${SIEM_FIREHOSE_STREAM}
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: siem-forwarder
namespace: monitoring
labels:
app: siem-forwarder
spec:
selector:
matchLabels:
app: siem-forwarder
template:
metadata:
labels:
app: siem-forwarder
spec:
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
containers:
- name: fluent-bit
image: fluent/fluent-bit:3.0
env:
- name: SIEM_FIREHOSE_STREAM
valueFrom:
secretKeyRef:
name: siem-config
key: firehose_stream_name
volumeMounts:
- name: config
mountPath: /fluent-bit/etc/
- name: varlog
mountPath: /var/log
readOnly: true
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 100m
memory: 128Mi
volumes:
- name: config
configMap:
name: siem-forwarder-config
- name: varlog
hostPath:
path: /var/log