-
Notifications
You must be signed in to change notification settings - Fork 3
/
all.yaml
82 lines (82 loc) · 1.78 KB
/
all.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
apiVersion: v1
kind: ServiceAccount
metadata:
name: event-collector
namespace: monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: event-collector
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "watch", "list"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create", "delete", "get", "patch", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: event-collector
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: event-collector
subjects:
- kind: ServiceAccount
name: event-collector
namespace: monitoring
---
apiVersion: v1
data:
config.json: |-
{
"log": "info",
"receivers": {
"elasticsearch": {
"addresses": [
"http://es:9200"
],
"index": "demo_k8s_event",
"username": "username",
"password": "password"
},
"stdout": false
}
}
kind: ConfigMap
metadata:
name: event-collector-cm
namespace: monitoring
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: event-collector
namespace: monitoring
labels:
app: event-collector
spec:
replicas: 1
selector:
matchLabels:
app: event-collector
template:
metadata:
labels:
app: event-collector
spec:
containers:
- name: collector
image: abowloflrf/k8s-event-collector:latest
imagePullPolicy: Always
volumeMounts:
- name: config-volume
mountPath: /etc/event-collector
serviceAccountName: event-collector
volumes:
- name: config-volume
configMap:
name: event-collector-cm