1
0
forked from k-space/kube
kube/wildduck/mongodb.yaml

84 lines
2.0 KiB
YAML
Raw Normal View History

2024-08-25 06:26:27 +00:00
---
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