1
0
forked from k-space/kube

wildduck: Restore MongoDB

This commit is contained in:
Lauri Võsandi 2024-08-25 09:26:27 +03:00
parent 22d65664b2
commit c609b1df04
2 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1 @@
../mongodb-operator/mongodb-support.yml

83
wildduck/mongodb.yaml Normal file
View File

@ -0,0 +1,83 @@
---
apiVersion: codemowers.cloud/v1beta1
kind: SecretClaim
metadata:
name: wildduck-readwrite-password
namespace: wildduck
spec:
mapping:
- key: password
value: "%(plaintext)s"
---
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: wildduck-mongodb
namespace: wildduck
spec:
agent:
logFile: /dev/stdout
members: 2
arbiters: 1
type: ReplicaSet
version: "7.0.12"
security:
authentication:
modes:
- SCRAM
users:
- name: readwrite
db: wildduck
passwordSecretRef:
name: wildduck-readwrite-password
roles:
- name: readWrite
db: wildduck
scramCredentialsSecretName: wildduck-readwrite
statefulSet:
spec:
template:
spec:
containers:
- name: mongod
resources:
requests:
cpu: 100m
memory: 1Gi
limits:
cpu: 4000m
memory: 1Gi
- name: mongodb-agent
resources:
requests:
cpu: 1m
memory: 100Mi
limits:
cpu: 1000m
memory: 1Gi
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: wildduck-mongodb-svc
volumeClaimTemplates:
- metadata:
name: data-volume
spec:
storageClassName: mongo
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
- metadata:
name: logs-volume
spec:
storageClassName: "null"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1000Mi