Skip to content

Commit 4e01fa3

Browse files
ccaramanPaulo Janotti
authored andcommitted
Update k8s config to use opentelemetry docker image and configuration (#459)
* Update k8s config to use opentelemetry docker image and configuration * Address pr comments * Add queued retry to agent config * Set memory ballast cli parameter
1 parent 9f801c5 commit 4e01fa3

File tree

1 file changed

+71
-41
lines changed

1 file changed

+71
-41
lines changed

examples/k8s.yaml

Lines changed: 71 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ data:
1515
exporters:
1616
opencensus:
1717
endpoint: "otel-collector.default:55678" # TODO: Update me
18+
processors:
19+
queued_retry:
20+
num_workers: 4
21+
queue_size: 100
22+
retry_on_failure: true
23+
extensions:
24+
zpages: {}
25+
services:
26+
extensions: [zpages]
27+
pipelines:
28+
traces:
29+
receivers: [opencensus]
30+
processors: [queued_retry]
31+
exporters: [opencensus]
1832
---
1933
apiVersion: extensions/v1beta1
2034
kind: DaemonSet
@@ -32,9 +46,9 @@ spec:
3246
spec:
3347
containers:
3448
- command:
35-
- "/otelsvc_agent_linux"
49+
- "/usr/bin/otelcol"
3650
- "--config=/conf/otel-agent-config.yaml"
37-
image: omnition/opencensus-agent:0.1.6
51+
image: omnition/opentelemetry-collector:v0.2.0
3852
name: otel-agent
3953
resources:
4054
limits:
@@ -44,11 +58,11 @@ spec:
4458
cpu: 100m
4559
memory: 100Mi
4660
ports:
47-
- containerPort: 55678
48-
- containerPort: 55679
49-
# - containerPort: 14267
50-
# - containerPort: 14268
51-
# - containerPort: 9411
61+
- containerPort: 55678 # Default Opencensus receiver port.
62+
- containerPort: 55679 # ZPages endpoint.
63+
# - containerPort: 14267 # Default Jaeger TChannel port.
64+
# - containerPort: 14268 # Default Jaeger HTTP receiver port.
65+
# - containerPort: 9411 # Default Zipkin receiver port.
5266
volumeMounts:
5367
- name: otel-agent-config-vol
5468
mountPath: /conf
@@ -78,27 +92,38 @@ data:
7892
max_connection_age-grace: 30s
7993
jaeger: {}
8094
zipkin: {}
81-
# Can only use one exporter
82-
# exporters:
83-
# jaeger:
84-
# collector_endpoint: "http://jaeger.default:14268/api/traces"
85-
# zipkin: {}
86-
queued-exporters:
87-
omnition:
88-
batching:
89-
enable: true
90-
timeout: 5s
91-
send_batch_size: 1024
95+
processors:
96+
queued_retry:
9297
num_workers: 16
9398
queue_size: 10000
9499
retry_on_failure: true
95-
opencensus:
96-
compression: "gzip"
97-
endpoint: "ingest.omnition.io:443"
98-
headers: { "x-omnition-api-key":"00000000-0000-0000-0000-000000000001" } # TODO: Update me
99-
num_workers: 8
100-
reconnection_delay: 2s
101-
secure: true
100+
batch:
101+
send_batch_size: 1024
102+
timeout: 5s
103+
extensions:
104+
health_check: {}
105+
exporters:
106+
opencensus:
107+
compression: "gzip"
108+
endpoint: "someopencensus.target.com:443" # Replace with a real endpoint.
109+
num_workers: 8
110+
reconnection_delay: 2s
111+
secure: true
112+
zipkin:
113+
url: "http://somezipkin.target.com:9411/api/v2/spans" # Replace with a real endpoint.
114+
jaeger_grpc:
115+
endpoint: "somejaegergrpc.target.com:55678" # Replace with a real endpoint.
116+
services:
117+
extensions: [health_check]
118+
pipelines:
119+
traces/1:
120+
receivers: [opencensus, zipkin]
121+
processors: [batch, queued_retry]
122+
exporters: [opencensus, zipkin]
123+
traces/2:
124+
receivers: [opencensus, jaeger]
125+
processors: [batch, queued_retry]
126+
exporters: [jaeger_grpc]
102127
---
103128
apiVersion: v1
104129
kind: Service
@@ -109,16 +134,18 @@ metadata:
109134
component: otel-collector
110135
spec:
111136
ports:
112-
- name: opencensus
137+
- name: opencensus # Default endpoint for Opencensus receiver.
113138
port: 55678
114139
protocol: TCP
115140
targetPort: 55678
116-
# - name: jaeger-tchannel
117-
# port: 14267
118-
# - name: jaeger_thrift_http
119-
# port: 14268
120-
# - name: zipkin
121-
# port: 9411
141+
- name: jaeger_tchannel # Default endpoint for Jaeger TChannel receiver.
142+
port: 14267
143+
- name: jaeger_thrift_http # Default endpoint for Jaeger HTTP receiver.
144+
port: 14268
145+
- name: zipkin # Default endpoint for Zipkin receiver.
146+
port: 9411
147+
- name: metrics # Default endpoint for querying metrics.
148+
port: 8888
122149
selector:
123150
component: otel-collector
124151
---
@@ -132,7 +159,7 @@ metadata:
132159
spec:
133160
minReadySeconds: 5
134161
progressDeadlineSeconds: 120
135-
replicas: 1
162+
replicas: 1 #TODO - adjust this to your own requirements
136163
template:
137164
metadata:
138165
annotations:
@@ -145,12 +172,14 @@ spec:
145172
spec:
146173
containers:
147174
- command:
148-
- "/otelsvc_collector_linux"
175+
- "/usr/bin/otelcol"
149176
- "--config=/conf/otel-collector-config.yaml"
177+
# Memory Ballast size should be max 1/3 to 1/2 of memory.
178+
- "--mem-ballast-size-mib=683"
150179
env:
151180
- name: GOGC
152181
value: "80"
153-
image: omnition/opencensus-collector:0.1.6
182+
image: omnition/opentelemetry-collector:v0.2.0
154183
name: otel-collector
155184
resources:
156185
limits:
@@ -160,10 +189,11 @@ spec:
160189
cpu: 200m
161190
memory: 400Mi
162191
ports:
163-
- containerPort: 55678
164-
# - containerPort: 14267
165-
# - containerPort: 14268
166-
# - containerPort: 9411
192+
- containerPort: 55678 # Default endpoint for Opencensus receiver.
193+
- containerPort: 14267 # Default endpoint for Jaeger TChannel receiver.
194+
- containerPort: 14268 # Default endpoint for Jaeger HTTP receiver.
195+
- containerPort: 9411 # Default endpoint for Zipkin receiver.
196+
- containerPort: 8888 # Default endpoint for querying metrics.
167197
volumeMounts:
168198
- name: otel-collector-config-vol
169199
mountPath: /conf
@@ -172,11 +202,11 @@ spec:
172202
livenessProbe:
173203
httpGet:
174204
path: /
175-
port: 13133
205+
port: 13133 # Health Check extension default port.
176206
readinessProbe:
177207
httpGet:
178208
path: /
179-
port: 13133
209+
port: 13133 # Health Check extension default port.
180210
volumes:
181211
- configMap:
182212
name: otel-collector-conf

0 commit comments

Comments
 (0)