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