Files
juwan-backend/deploy/k01/infra/mongo.yaml
T
zetaloop 6341d746da
build-and-push-harbor / docker-build-push (push) Waiting to run
fix: fuck mongo
2026-05-06 09:48:02 +08:00

59 lines
1.4 KiB
YAML

apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: chat-mongodb
namespace: juwan
spec:
members: 1
type: ReplicaSet
version: "7.0.32"
security:
authentication:
modes:
- SCRAM
users:
- name: app-user
db: admin
passwordSecretRef:
name: chat-mongodb-app-user-password
roles:
- name: readWrite
db: juwan_chat
scramCredentialsSecretName: chat-mongodb-app-user-scram
additionalMongodConfig:
storage.wiredTiger.engineConfig.journalCompressor: zlib
statefulSet:
spec:
template:
spec:
containers:
- name: mongod
resources:
requests:
cpu: 30m
memory: 100Mi
limits:
memory: 1Gi
- name: mongodb-agent
resources:
requests:
cpu: 30m
memory: 80Mi
limits:
memory: 200Mi
volumeClaimTemplates:
- metadata:
name: data-volume
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
- metadata:
name: logs-volume
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 256Mi