-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy pathlogagent-daemonset.yml
92 lines (92 loc) · 2.01 KB
/
logagent-daemonset.yml
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
92
# Cluster Role bindings for Logagent
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: sematext-logagent
labels:
app: sematext-logagent
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: sematext-logagent
subjects:
- kind: ServiceAccount
name: sematext-logagent
namespace: default
---
# Cluster Role for Logagent
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: sematext-logagent
labels:
app: sematext-logagent
rules:
- apiGroups:
- ""
resources:
- events
- pods
verbs:
- list
- get
- watch
---
# Service Account for Logagent
apiVersion: v1
kind: ServiceAccount
metadata:
name: sematext-logagent
labels:
app: sematext-logagent
---
# Daemonset
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: st-logagent
spec:
selector:
matchLabels:
app: st-logagent
template:
metadata:
labels:
app: st-logagent
spec:
nodeSelector: {}
serviceAccountName: sematext-logagent
hostNetwork: true
dnsPolicy: "ClusterFirst"
restartPolicy: "Always"
containers:
- name: sematext-logagent
image: sematext/logagent:latest
imagePullPolicy: "Always"
env:
- name: LOGS_TOKEN
value: "YOUR_LOGS_TOKEN"
- name: LOGS_RECEIVER_URL
value: "https://logsene-receiver.sematext.com"
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
- mountPath: /etc/localtime
name: localtime
# - mountPath: /etc/logagent
# name: patterns
securityContext:
privileged: true
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
- name: localtime
hostPath:
path: /etc/localtime
# - name: patterns
# configMap:
# name: sematext-agent-patterns
# items:
# - key: patterns.yml
# path: patterns.yml