OKR/prod-upgrade/prom/mongo-exporter.yaml

59 lines
1.4 KiB
YAML
Raw Normal View History

2024-04-25 15:21:00 +08:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongo-exporter
spec:
replicas: 1
selector:
matchLabels:
app: mongo-exporter
template:
metadata:
labels:
app: mongo-exporter
spec:
containers:
- name: mongo-exporter
image: percona/mongodb_exporter:0.40
imagePullPolicy: Always
args:
2024-04-25 15:23:26 +08:00
- "--mongodb.uri=mongodb://mongo_monitor:beaconfire123@mongo-rs0-0.mongo-rs0.base.svc:27017,mongo-rs0-1.mongo-rs0.base.svc:27017,mongo-rs0-2.mongo-rs0.base.svc:27017/admin,"
2024-04-25 15:21:00 +08:00
- "--mongodb.global-conn-pool"
- "--discovering-mode"
2024-04-25 18:17:11 +08:00
- "--collect-all"
2024-04-25 15:21:00 +08:00
resources:
requests:
cpu: 0.01
memory: 128Mi
limits:
cpu: 0.1
memory: 512Mi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "app.kubernetes.io/component"
operator: In
values:
- mongo
tolerations:
- key: "app.kubernetes.io/component"
operator: "Equal"
value: "mongo"
effect: "NoSchedule"
---
apiVersion: v1
kind: Service
metadata:
name: mongo-exporter
spec:
type: ClusterIP
ports:
- name: http
protocol: TCP
2024-04-25 15:30:36 +08:00
port: 9216
targetPort: 9216
2024-04-25 15:21:00 +08:00
selector:
app: mongo-exporter