udpate add mongo-exporter

main
ycz008 2024-04-25 15:21:00 +08:00
parent c6adb11107
commit 0398fed587
1 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,59 @@
---
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:
- "--mongodb.uri=mongodb://mongo_monitor:beaconfire123@mongo-rs0-0.mongo-rs0.base.svc:27107,mongo-rs0-1.mongo-rs0.base.svc:27107,mongo-rs0-2.mongo-rs0.base.svc:27107/admin,"
- "--mongodb.global-conn-pool"
- "--discovering-mode"
- "--collector.profile"
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
port: 9104
targetPort: 9104
selector:
app: mongo-exporter