This repository has been archived by the owner on Nov 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
/
k8s.yaml
193 lines (193 loc) · 4.47 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: oc-agent-conf
labels:
app: opencensus
component: oc-agent-conf
data:
oc-agent-config: |
receivers:
opencensus: {}
# jaeger: {}
# zipkin: {}
exporters:
opencensus:
endpoint: "oc-collector.default:55678" # TODO: Update me
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: oc-agent
labels:
app: opencensus
component: oc-agent
spec:
template:
metadata:
labels:
app: opencensus
component: oc-agent
spec:
containers:
- command:
- "/ocagent_linux"
- "--config=/conf/oc-agent-config.yaml"
image: omnition/opencensus-agent:0.1.6
name: oc-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: oc-agent-config-vol
mountPath: /conf
volumes:
- configMap:
name: oc-agent-conf
items:
- key: oc-agent-config
path: oc-agent-config.yaml
name: oc-agent-config-vol
---
apiVersion: v1
kind: ConfigMap
metadata:
name: oc-collector-conf
labels:
app: opencensus
component: oc-collector-conf
data:
oc-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: oc-collector
labels:
app: opencesus
component: oc-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: oc-collector
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: oc-collector
labels:
app: opencensus
component: oc-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: opencensus
component: oc-collector
spec:
containers:
- command:
- "/occollector_linux"
- "--config=/conf/oc-collector-config.yaml"
env:
- name: GOGC
value: "80"
image: omnition/opencensus-collector:0.1.6
name: oc-collector
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 200m
memory: 400Mi
ports:
- containerPort: 55678
# - containerPort: 14267
# - containerPort: 14268
# - containerPort: 9411
volumeMounts:
- name: oc-collector-config-vol
mountPath: /conf
# - name: oc-collector-secrets
# mountPath: /secrets
livenessProbe:
httpGet:
path: /
port: 13133
readinessProbe:
httpGet:
path: /
port: 13133
volumes:
- configMap:
name: oc-collector-conf
items:
- key: oc-collector-config
path: oc-collector-config.yaml
name: oc-collector-config-vol
# - secret:
# name: oc-collector-secrets
# items:
# - key: cert.pem
# path: cert.pem
# - key: key.pem
# path: key.pem