...
1---
2# This ConfigMap needs to be edited to define Prometheus mappings.
3# See https://getambassador.io/docs/emissary/latest/topics/running/statistics/envoy-statsd/
4# for more information.
5apiVersion: v1
6kind: ConfigMap
7metadata:
8 name: ambassador-statsd-config
9data:
10 exporterConfiguration: ''
11---
12# This Deployment keeps the StatsD exporter running.
13apiVersion: apps/v1
14kind: Deployment
15metadata:
16 creationTimestamp: null
17 name: statsd-sink
18spec:
19 replicas: 1
20 strategy: {}
21 selector:
22 matchLabels:
23 service: statsd-sink
24 template:
25 metadata:
26 creationTimestamp: null
27 labels:
28 service: statsd-sink
29 spec:
30 containers:
31 - name: statsd-sink
32 image: prom/statsd-exporter:v0.8.1
33 args: ["--statsd.listen-udp=:8125", "--statsd.mapping-config=/statsd-exporter/mapping-config.yaml"]
34 volumeMounts:
35 - name: stats-exporter-mapping-config
36 mountPath: /statsd-exporter/
37 readOnly: true
38 volumes:
39 - name: stats-exporter-mapping-config
40 configMap:
41 name: ambassador-statsd-config
42 items:
43 - key: exporterConfiguration
44 path: mapping-config.yaml
45 restartPolicy: Always
46---
47# Finally, this Service defines ports in use by StatsD.
48apiVersion: v1
49kind: Service
50metadata:
51 creationTimestamp: null
52 labels:
53 service: statsd-sink
54 name: statsd-sink
55spec:
56 ports:
57 - protocol: UDP
58 port: 8125
59 name: statsd-metrics
60 - protocol: TCP
61 port: 9102
62 name: prometheus-metrics
63 selector:
64 service: statsd-sink
View as plain text