-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedgedelta-agent-aks.yml
235 lines (235 loc) · 5.9 KB
/
edgedelta-agent-aks.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
apiVersion: v1
kind: Namespace
metadata:
name: edgedelta
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: edgedelta-win
namespace: edgedelta
annotations:
prometheus.io/scrape: "true"
labels:
k8s-app: edgedelta-logging-win
version: v1
kubernetes.io/cluster-service: "true"
spec:
selector:
matchLabels:
k8s-app: edgedelta-logging-win
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
k8s-app: edgedelta-logging-win
kubernetes.io/cluster-service: "true"
version: v1
spec:
serviceAccountName: edgedelta
nodeSelector:
beta.kubernetes.io/os: windows
# specifying toleratations enables the daemonset on pods with custom taint.
# default tolerations in this spec matches all taints so edgedelta-win daemonset will run on all nodes with any taint or no taint
# ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations:
- key: ""
operator: "Exists"
effect: "NoSchedule"
containers:
- name: edgedelta-agent
image: docker.io/edgedelta/agent:latest-multi
env:
- name: ED_API_KEY
valueFrom:
# kubectl create secret generic ed-api-key \
# --namespace=edgedelta \
# --from-literal=ed-api-key="2c7a5780-..."
secretKeyRef:
key: ed-api-key
name: ed-api-key
- name: ED_HOST_OVERRIDE
valueFrom:
fieldRef:
fieldPath: spec.nodeName
command:
- C:\edgedelta\edgedelta.exe
resources:
limits:
cpu: 2000m
memory: 2048Mi
requests:
cpu: 200m
memory: 256Mi
volumeMounts:
- mountPath: C:\ProgramData\docker\containers
name: dockercontainers
readOnly: true
- mountPath: C:\var\log\pods
name: varlogpods
readOnly: true
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 10
volumes:
- name: dockercontainers
hostPath:
path: C:\ProgramData\docker\containers
- name: varlogpods
hostPath:
path: C:\var\log\pods
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: edgedelta
namespace: edgedelta
annotations:
prometheus.io/scrape: "true"
labels:
k8s-app: edgedelta-logging
version: v1
kubernetes.io/cluster-service: "true"
spec:
selector:
matchLabels:
k8s-app: edgedelta-logging
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
template:
metadata:
labels:
k8s-app: edgedelta-logging
version: v1
kubernetes.io/cluster-service: "true"
spec:
serviceAccountName: edgedelta
nodeSelector:
beta.kubernetes.io/os: linux
# specifying toleratations enables the daemonset on pods with custom taint.
# default tolerations in this spec matches all taints so edgedelta daemonset will run on all nodes with any taint or no taint
# ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations:
- key: ""
operator: "Exists"
effect: "NoSchedule"
containers:
- name: edgedelta-agent
image: docker.io/edgedelta/agent:latest-multi
env:
- name: ED_API_KEY
valueFrom:
# kubectl create secret generic ed-api-key \
# --namespace=edgedelta \
# --from-literal=ed-api-key="2c7a5780-..."
secretKeyRef:
key: ed-api-key
name: ed-api-key
- name: ED_HOST_OVERRIDE
valueFrom:
fieldRef:
fieldPath: spec.nodeName
command:
- /edgedelta/edgedelta
resources:
limits:
cpu: 2000m
memory: 512Mi
requests:
cpu: 200m
memory: 256Mi
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
# Some Kubernetes distributions uses /docker/containers instead of standard /var/lib/docker/containers
# Update mountPath to match the actual container log folder path
mountPath: /var/lib/docker/containers
readOnly: true
imagePullPolicy: Always
terminationGracePeriodSeconds: 10
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
# Update path below if you changed volumeMounts varlibdockercontainers mountPath
path: /var/lib/docker/containers
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: edgedelta
subjects:
- kind: ServiceAccount
name: edgedelta
namespace: edgedelta
roleRef:
kind: ClusterRole
name: edgedelta
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: edgedelta
labels:
k8s-app: edgedelta-logging
rules:
- apiGroups: [""] # "" indicates the core API group
resources:
- namespaces
- pods
- events
- nodes
- nodes/metrics
- services
verbs:
- get
- watch
- list
- apiGroups: [""] # "" indicates the core API group
resources:
- events
verbs:
- create
- apiGroups: ["apps"]
resources:
- daemonsets
- deployments
- replicasets
- statefulsets
verbs:
- watch
- list
- apiGroups: ["batch"]
resources:
- jobs
- cronjobs
verbs:
- watch
- list
- apiGroups: ["coordination.k8s.io"]
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: edgedelta
namespace: edgedelta
labels: