-
Notifications
You must be signed in to change notification settings - Fork 136
/
daemonset.yaml
262 lines (260 loc) · 7.93 KB
/
daemonset.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
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
---
# Source: splunk-otel-collector/templates/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: default-splunk-otel-collector-agent
labels:
app.kubernetes.io/name: splunk-otel-collector
helm.sh/chart: splunk-otel-collector-0.94.0
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/instance: default
app.kubernetes.io/version: "0.94.0"
app: splunk-otel-collector
component: otel-collector-agent
chart: splunk-otel-collector-0.94.0
release: default
heritage: Helm
spec:
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
selector:
matchLabels:
app: splunk-otel-collector
release: default
template:
metadata:
labels:
app: splunk-otel-collector
component: otel-collector-agent
release: default
annotations:
checksum/config: a01bcbf6a4de87b3b1e3968d4a6b0674a37178badea88db740bd59f419a49138
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: default-splunk-otel-collector
nodeSelector:
kubernetes.io/os: linux
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
initContainers:
- name: migrate-checkpoint
image: quay.io/signalfx/splunk-otel-collector:0.94.0
imagePullPolicy: IfNotPresent
command: ["/migratecheckpoint"]
securityContext:
runAsUser: 0
env:
- name: CONTAINER_LOG_PATH_FLUENTD
value: "/var/log/splunk-fluentd-containers.log.pos"
- name: CONTAINER_LOG_PATH_OTEL
value: "/var/addon/splunk/otel_pos/receiver_filelog_"
- name: CUSTOM_LOG_PATH_FLUENTD
value: "/var/log/splunk-fluentd-*.pos"
- name: CUSTOM_LOG_PATH_OTEL
value: "/var/addon/splunk/otel_pos/receiver_filelog_"
- name: CUSTOM_LOG_CAPTURE_REGEX
value: '\/var\/log\/splunk\-fluentd\-(?P<name>[\w0-9-_]+)\.pos'
- name: JOURNALD_LOG_PATH_FLUENTD
value: "/var/log/splunkd-fluentd-journald-*.pos.json"
- name: JOURNALD_LOG_PATH_OTEL
value: "/var/addon/splunk/otel_pos/receiver_journald_"
- name: JOURNALD_LOG_CAPTURE_REGEX
value: '\/splunkd\-fluentd\-journald\-(?P<name>[\w0-9-_]+)\.pos\.json'
resources:
limits:
cpu: 200m
memory: 500Mi
volumeMounts:
- name: checkpoint
mountPath: /var/addon/splunk/otel_pos
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
containers:
- name: otel-collector
command:
- /otelcol
- --config=/conf/relay.yaml
ports:
- name: fluentforward
containerPort: 8006
hostPort: 8006
protocol: TCP
- name: jaeger-grpc
containerPort: 14250
hostPort: 14250
protocol: TCP
- name: jaeger-thrift
containerPort: 14268
hostPort: 14268
protocol: TCP
- name: otlp
containerPort: 4317
hostPort: 4317
protocol: TCP
- name: otlp-http
containerPort: 4318
protocol: TCP
- name: otlp-http-old
containerPort: 55681
protocol: TCP
- name: sfx-forwarder
containerPort: 9080
hostPort: 9080
protocol: TCP
- name: signalfx
containerPort: 9943
hostPort: 9943
protocol: TCP
- name: zipkin
containerPort: 9411
hostPort: 9411
protocol: TCP
image: quay.io/signalfx/splunk-otel-collector:0.94.0
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
env:
- name: SPLUNK_MEMORY_TOTAL_MIB
value: "500"
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: K8S_NODE_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
- name: K8S_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: K8S_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: K8S_POD_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
- name: K8S_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SPLUNK_OBSERVABILITY_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
- name: HOST_PROC_MOUNTINFO
value: /proc/self/mountinfo
readinessProbe:
httpGet:
path: /
port: 13133
livenessProbe:
httpGet:
path: /
port: 13133
resources:
limits:
cpu: 200m
memory: 500Mi
volumeMounts:
- mountPath: /conf
name: otel-configmap
- mountPath: /hostfs/dev
name: host-dev
readOnly: true
- mountPath: /hostfs/etc
name: host-etc
readOnly: true
- mountPath: /hostfs/proc
name: host-proc
readOnly: true
- mountPath: /hostfs/run/udev/data
name: host-run-udev-data
readOnly: true
- mountPath: /hostfs/sys
name: host-sys
readOnly: true
- mountPath: /hostfs/var/run/utmp
name: host-var-run-utmp
readOnly: true
- name: varlog
mountPath: /var/log
readOnly: true
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: checkpoint
mountPath: /var/addon/splunk/otel_pos
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
name: run-collectd
readOnly: false
terminationGracePeriodSeconds: 600
volumes:
- name: run-collectd
emptyDir:
sizeLimit: 25Mi
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: checkpoint
hostPath:
path: /var/addon/splunk/otel_pos
type: DirectoryOrCreate
- name: host-dev
hostPath:
path: /dev
- name: host-etc
hostPath:
path: /etc
- name: host-proc
hostPath:
path: /proc
- name: host-run-udev-data
hostPath:
path: /run/udev/data
- name: host-sys
hostPath:
path: /sys
- name: host-var-run-utmp
hostPath:
path: /var/run/utmp
- name: otel-configmap
configMap:
name: default-splunk-otel-collector-otel-agent
items:
- key: relay
path: relay.yaml