2020-05-13 11:10:19 +02:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: otel-collector-conf
|
2020-05-14 11:11:51 +02:00
|
|
|
namespace: observability
|
2020-05-13 11:10:19 +02:00
|
|
|
labels:
|
|
|
|
app: opentelemetry
|
|
|
|
component: otel-collector-conf
|
|
|
|
data:
|
|
|
|
otel-collector-config: |
|
|
|
|
receivers:
|
|
|
|
# Make sure to add the otlp receiver.
|
|
|
|
# This will use the default configuration, and open up the receiver on port 55680
|
2020-05-14 18:52:38 +02:00
|
|
|
otlp:
|
|
|
|
endpoint: 0.0.0.0:55680
|
2020-05-13 11:10:19 +02:00
|
|
|
processors:
|
|
|
|
extensions:
|
|
|
|
health_check: {}
|
|
|
|
exporters:
|
2020-05-14 18:18:22 +02:00
|
|
|
jaeger_grpc:
|
2020-05-13 11:10:19 +02:00
|
|
|
# Replace with a real endpoint.
|
2020-05-14 11:11:51 +02:00
|
|
|
endpoint: "jaeger-collector.observability.svc.cluster.local:14250"
|
2020-05-13 11:10:19 +02:00
|
|
|
service:
|
|
|
|
extensions: [health_check]
|
|
|
|
pipelines:
|
2020-05-14 18:18:22 +02:00
|
|
|
traces:
|
2020-05-13 11:10:19 +02:00
|
|
|
receivers: [otlp]
|
|
|
|
processors: []
|
2020-05-14 18:18:22 +02:00
|
|
|
exporters: [jaeger_grpc]
|
2020-05-13 11:10:19 +02:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: otel-collector
|
2020-05-14 11:11:51 +02:00
|
|
|
namespace: observability
|
2020-05-13 11:10:19 +02:00
|
|
|
labels:
|
2020-05-14 11:11:51 +02:00
|
|
|
app: opentelemetry
|
2020-05-13 11:10:19 +02:00
|
|
|
component: otel-collector
|
|
|
|
spec:
|
|
|
|
ports:
|
2020-05-14 11:11:51 +02:00
|
|
|
- name: otlp # Default endpoint for otlp receiver.
|
2020-05-14 18:18:22 +02:00
|
|
|
port: 55680
|
2020-05-13 11:10:19 +02:00
|
|
|
protocol: TCP
|
|
|
|
targetPort: 55680
|
2020-05-14 11:11:51 +02:00
|
|
|
- name: metrics # Default endpoint for metrics.
|
|
|
|
port: 8888
|
|
|
|
protocol: TCP
|
|
|
|
targetPort: 8888
|
2020-05-13 11:10:19 +02:00
|
|
|
selector:
|
|
|
|
component: otel-collector
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: otel-collector
|
2020-05-14 11:11:51 +02:00
|
|
|
namespace: observability
|
2020-05-13 11:10:19 +02:00
|
|
|
labels:
|
|
|
|
app: opentelemetry
|
|
|
|
component: otel-collector
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: opentelemetry
|
|
|
|
component: otel-collector
|
|
|
|
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"
|
2020-05-14 18:18:22 +02:00
|
|
|
image: otel/opentelemetry-collector:0.3.0
|
2020-05-13 11:10:19 +02:00
|
|
|
name: otel-collector
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: 1
|
|
|
|
memory: 2Gi
|
|
|
|
requests:
|
|
|
|
cpu: 200m
|
|
|
|
memory: 400Mi
|
|
|
|
ports:
|
|
|
|
- containerPort: 55680 # Default endpoint for otlp 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
|