ci: collect memcached metrics (#7410)
* ci: collect memcached metrics * ci: use nobody/nobody for metrics container
This commit is contained in:
parent
dd46a8af6f
commit
3a4939cc0b
|
@ -16,6 +16,21 @@ spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
containers:
|
containers:
|
||||||
|
- image: "quay.io/prometheus/memcached-exporter:v0.14.3"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: memcached-exporter
|
||||||
|
ports:
|
||||||
|
- name: metrics
|
||||||
|
containerPort: 9150
|
||||||
|
protocol: TCP
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsUser: 65534 # nobody
|
||||||
|
runAsGroup: 65534 # nobody
|
||||||
- image: "memcached:1.6-alpine"
|
- image: "memcached:1.6-alpine"
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args: ["-m", "1024"]
|
args: ["-m", "1024"]
|
||||||
|
@ -41,6 +56,8 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: memcached
|
name: memcached
|
||||||
|
annotations:
|
||||||
|
k8s.grafana.com/scrape: "yes"
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
|
@ -48,5 +65,9 @@ spec:
|
||||||
targetPort: memcached
|
targetPort: memcached
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: memcached
|
name: memcached
|
||||||
|
- port: 9150
|
||||||
|
targetPort: metrics
|
||||||
|
protocol: TCP
|
||||||
|
name: metrics
|
||||||
selector:
|
selector:
|
||||||
app: memcached
|
app: memcached
|
||||||
|
|
Loading…
Reference in a new issue