forked from open-telemetry/opentelemetry-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yaml
193 lines (193 loc) · 4.64 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
---
apiVersion: v1
kind: ConfigMap
metadata:
name: otelsvc-agent-conf
labels:
app: opentelemetry
component: otelsvc-agent-conf
data:
otelsvc-agent-config: |
receivers:
opencensus: {}
# jaeger: {}
# zipkin: {}
exporters:
opencensus:
endpoint: "otelsvc-collector.default:55678" # TODO: Update me
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: otelsvc-agent
labels:
app: opentelemetry
component: otelsvc-agent
spec:
template:
metadata:
labels:
app: opentelemetry
component: otelsvc-agent
spec:
containers:
- command:
- "/otelsvc_agent_linux"
- "--config=/conf/otelsvc-agent-config.yaml"
image: omnition/opencensus-agent:0.1.6
name: otelsvc-agent
resources:
limits:
cpu: 500m
memory: 500Mi
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 55678
- containerPort: 55679
# - containerPort: 14267
# - containerPort: 14268
# - containerPort: 9411
volumeMounts:
- name: otelsvc-agent-config-vol
mountPath: /conf
volumes:
- configMap:
name: otelsvc-agent-conf
items:
- key: otelsvc-agent-config
path: otelsvc-agent-config.yaml
name: otelsvc-agent-config-vol
---
apiVersion: v1
kind: ConfigMap
metadata:
name: otelsvc-collector-conf
labels:
app: opentelemetry
component: otelsvc-collector-conf
data:
otelsvc-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: {}
# Can only use one exporter
# exporters:
# jaeger:
# collector_endpoint: "http://jaeger.default:14268/api/traces"
# zipkin: {}
queued-exporters:
omnition:
batching:
enable: true
timeout: 5s
send-batch-size: 1024
num-workers: 16
queue-size: 10000
retry-on-failure: true
opencensus:
compression: "gzip"
endpoint: "ingest.omnition.io:443"
headers: { "x-omnition-api-key":"00000000-0000-0000-0000-000000000001" } # TODO: Update me
num-workers: 8
reconnection-delay: 2s
secure: true
---
apiVersion: v1
kind: Service
metadata:
name: otelsvc-collector
labels:
app: opencesus
component: otelsvc-collector
spec:
ports:
- name: opencensus
port: 55678
protocol: TCP
targetPort: 55678
# - name: jaeger-tchannel
# port: 14267
# - name: jaeger-thrift-http
# port: 14268
# - name: zipkin
# port: 9411
selector:
component: otelsvc-collector
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: otelsvc-collector
labels:
app: opentelemetry
component: otelsvc-collector
spec:
minReadySeconds: 5
progressDeadlineSeconds: 120
replicas: 1
template:
metadata:
annotations:
prometheus.io/path: "/metrics"
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
labels:
app: opentelemetry
component: otelsvc-collector
spec:
containers:
- command:
- "/otelsvc_collector_linux"
- "--config=/conf/otelsvc-collector-config.yaml"
env:
- name: GOGC
value: "80"
image: omnition/opencensus-collector:0.1.6
name: otelsvc-collector
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 200m
memory: 400Mi
ports:
- containerPort: 55678
# - containerPort: 14267
# - containerPort: 14268
# - containerPort: 9411
volumeMounts:
- name: otelsvc-collector-config-vol
mountPath: /conf
# - name: otelsvc-collector-secrets
# mountPath: /secrets
livenessProbe:
httpGet:
path: /
port: 13133
readinessProbe:
httpGet:
path: /
port: 13133
volumes:
- configMap:
name: otelsvc-collector-conf
items:
- key: otelsvc-collector-config
path: otelsvc-collector-config.yaml
name: otelsvc-collector-config-vol
# - secret:
# name: otelsvc-collector-secrets
# items:
# - key: cert.pem
# path: cert.pem
# - key: key.pem
# path: key.pem