forked from open-telemetry/opentelemetry-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yaml
223 lines (223 loc) · 6.06 KB
/
k8s.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
---
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-agent-conf
labels:
app: opentelemetry
component: otel-agent-conf
data:
otel-agent-config: |
receivers:
opencensus: {}
# jaeger: {}
# zipkin: {}
exporters:
opencensus:
endpoint: "otel-collector.default:55678" # TODO: Update me
processors:
queued_retry:
num_workers: 4
queue_size: 100
retry_on_failure: true
extensions:
zpages: {}
service:
extensions: [zpages]
pipelines:
traces:
receivers: [opencensus]
processors: [queued_retry]
exporters: [opencensus]
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: otel-agent
labels:
app: opentelemetry
component: otel-agent
spec:
template:
metadata:
labels:
app: opentelemetry
component: otel-agent
spec:
containers:
- command:
- "/otelcol"
- "--config=/conf/otel-agent-config.yaml"
image: omnition/opentelemetry-collector:v0.2.3
name: otel-agent
resources:
limits:
cpu: 500m
memory: 500Mi
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 55678 # Default Opencensus receiver port.
- containerPort: 55679 # ZPages endpoint.
# - containerPort: 14267 # Default Jaeger TChannel port.
# - containerPort: 14268 # Default Jaeger HTTP receiver port.
# - containerPort: 9411 # Default Zipkin receiver port.
volumeMounts:
- name: otel-agent-config-vol
mountPath: /conf
volumes:
- configMap:
name: otel-agent-conf
items:
- key: otel-agent-config
path: otel-agent-config.yaml
name: otel-agent-config-vol
---
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-conf
labels:
app: opentelemetry
component: otel-collector-conf
data:
otel-collector-config: |
receivers:
opencensus:
# keepalive settings can help load balancing, see receiver/README.md for more info.
keepalive:
server_parameters:
max_connection_age: 120s
max_connection_age-grace: 30s
jaeger: {}
zipkin: {}
processors:
queued_retry:
num_workers: 16
queue_size: 10000
retry_on_failure: true
batch:
send_batch_size: 1024
timeout: 5s
extensions:
health_check: {}
exporters:
opencensus:
compression: "gzip"
endpoint: "someopencensus.target.com:443" # Replace with a real endpoint.
num_workers: 8
reconnection_delay: 2s
secure: true
zipkin:
url: "http://somezipkin.target.com:9411/api/v2/spans" # Replace with a real endpoint.
jaeger_grpc:
endpoint: "somejaegergrpc.target.com:55678" # Replace with a real endpoint.
service:
extensions: [health_check]
pipelines:
traces/1:
receivers: [opencensus, zipkin]
processors: [batch, queued_retry]
exporters: [opencensus, zipkin]
traces/2:
receivers: [opencensus, jaeger]
processors: [batch, queued_retry]
exporters: [jaeger_grpc]
---
apiVersion: v1
kind: Service
metadata:
name: otel-collector
labels:
app: opencensus
component: otel-collector
spec:
ports:
- name: opencensus # Default endpoint for Opencensus receiver.
port: 55678
protocol: TCP
targetPort: 55678
- name: jaeger-tchannel # Default endpoint for Jaeger TChannel receiver.
port: 14267
- name: jaeger-thrift-http # Default endpoint for Jaeger HTTP receiver.
port: 14268
- name: zipkin # Default endpoint for Zipkin receiver.
port: 9411
- name: metrics # Default endpoint for querying metrics.
port: 8888
selector:
component: otel-collector
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: otel-collector
labels:
app: opentelemetry
component: otel-collector
spec:
minReadySeconds: 5
progressDeadlineSeconds: 120
replicas: 1 #TODO - adjust this to your own requirements
template:
metadata:
annotations:
prometheus.io/path: "/metrics"
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
labels:
app: opentelemetry
component: otel-collector
spec:
containers:
- command:
- "/otelcol"
- "--config=/conf/otel-collector-config.yaml"
# Memory Ballast size should be max 1/3 to 1/2 of memory.
- "--mem-ballast-size-mib=683"
env:
- name: GOGC
value: "80"
image: omnition/opentelemetry-collector:v0.2.3
name: otel-collector
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 200m
memory: 400Mi
ports:
- containerPort: 55678 # Default endpoint for Opencensus receiver.
- containerPort: 14267 # Default endpoint for Jaeger TChannel receiver.
- containerPort: 14268 # Default endpoint for Jaeger HTTP receiver.
- containerPort: 9411 # Default endpoint for Zipkin receiver.
- containerPort: 8888 # Default endpoint for querying metrics.
volumeMounts:
- name: otel-collector-config-vol
mountPath: /conf
# - name: otel-collector-secrets
# mountPath: /secrets
livenessProbe:
httpGet:
path: /
port: 13133 # Health Check extension default port.
readinessProbe:
httpGet:
path: /
port: 13133 # Health Check extension default port.
volumes:
- configMap:
name: otel-collector-conf
items:
- key: otel-collector-config
path: otel-collector-config.yaml
name: otel-collector-config-vol
# - secret:
# name: otel-collector-secrets
# items:
# - key: cert.pem
# path: cert.pem
# - key: key.pem
# path: key.pem