From c609b1df04898d6e9ec962e497a2c6a6446db244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Sun, 25 Aug 2024 09:26:27 +0300 Subject: [PATCH] wildduck: Restore MongoDB --- wildduck/mongodb-support.yml | 1 + wildduck/mongodb.yaml | 83 ++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 120000 wildduck/mongodb-support.yml create mode 100644 wildduck/mongodb.yaml diff --git a/wildduck/mongodb-support.yml b/wildduck/mongodb-support.yml new file mode 120000 index 0000000..e834dd2 --- /dev/null +++ b/wildduck/mongodb-support.yml @@ -0,0 +1 @@ +../mongodb-operator/mongodb-support.yml \ No newline at end of file diff --git a/wildduck/mongodb.yaml b/wildduck/mongodb.yaml new file mode 100644 index 0000000..44a0fa3 --- /dev/null +++ b/wildduck/mongodb.yaml @@ -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