-
Notifications
You must be signed in to change notification settings - Fork 2
/
collector.yaml.j2
96 lines (95 loc) · 1.99 KB
/
collector.yaml.j2
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
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-config
namespace: {{ namespace }}
data:
collector.yaml: |
receivers:
opencensus:
endpoint: "0.0.0.0:55678"
exporters:
logging:
prometheus:
endpoint: "0.0.0.0:8889"
extensions:
health_check:
pprof:
zpages:
service:
extensions: [health_check, pprof, zpages]
pipelines:
metrics:
receivers: [opencensus]
processors: []
exporters: [prometheus]
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: otel-collector
namespace: {{ namespace }}
labels:
app: otel-collector
spec:
selector:
matchLabels:
app: otel-collector
replicas: 1 # This can be increased for a larger system.
template:
metadata:
labels:
app: otel-collector
spec:
containers:
- name: collector
args:
- --config=/conf/collector.yaml
image: {{ otel_collector_image }}
resources:
requests: # Note: these are suitable for a small instance, but may need to be increased for a large instance.
memory: 100Mi
cpu: 50m
ports:
- name: otel
containerPort: 55678
- name: prom-export
containerPort: 8889
- name: zpages # A /debug page
containerPort: 55679
volumeMounts:
- mountPath: /conf
name: config
volumes:
- name: config
configMap:
name: otel-collector-config
items:
- key: collector.yaml
path: collector.yaml
---
apiVersion: v1
kind: Service
metadata:
name: otel-collector
namespace: {{ namespace }}
spec:
selector:
app: "otel-collector"
ports:
- port: 55678
name: otel
---
apiVersion: v1
kind: Service
metadata:
name: otel-export
namespace: {{ namespace }}
labels:
app: otel-export
spec:
selector:
app: otel-collector
ports:
- port: 8889
name: prom-export