Skip to content

Commit 3a4939c

Browse files
jennifer-richardsNGPixel
authored andcommitted
ci: collect memcached metrics (ietf-tools#7410)
* ci: collect memcached metrics * ci: use nobody/nobody for metrics container
1 parent dd46a8a commit 3a4939c

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

k8s/memcached.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ spec:
1616
securityContext:
1717
runAsNonRoot: true
1818
containers:
19+
- image: "quay.io/prometheus/memcached-exporter:v0.14.3"
20+
imagePullPolicy: IfNotPresent
21+
name: memcached-exporter
22+
ports:
23+
- name: metrics
24+
containerPort: 9150
25+
protocol: TCP
26+
securityContext:
27+
allowPrivilegeEscalation: false
28+
capabilities:
29+
drop:
30+
- ALL
31+
readOnlyRootFilesystem: true
32+
runAsUser: 65534 # nobody
33+
runAsGroup: 65534 # nobody
1934
- image: "memcached:1.6-alpine"
2035
imagePullPolicy: IfNotPresent
2136
args: ["-m", "1024"]
@@ -41,12 +56,18 @@ apiVersion: v1
4156
kind: Service
4257
metadata:
4358
name: memcached
59+
annotations:
60+
k8s.grafana.com/scrape: "yes"
4461
spec:
4562
type: ClusterIP
4663
ports:
4764
- port: 11211
4865
targetPort: memcached
4966
protocol: TCP
5067
name: memcached
68+
- port: 9150
69+
targetPort: metrics
70+
protocol: TCP
71+
name: metrics
5172
selector:
5273
app: memcached

0 commit comments

Comments
 (0)