planetmint/k8s/dev-setup/mongo.yaml
2022-01-13 16:29:35 +00:00

55 lines
1.1 KiB
YAML

# Copyright © 2020 Interplanetary Database Association e.V.,
# Planetmint and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
apiVersion: v1
kind: Service
metadata:
name: mdb
namespace: default
labels:
name: mdb
spec:
selector:
app: mdb-ss
ports:
- port: 27017
targetPort: 27017
protocol: TCP
name: mdb-svc-port
type: ClusterIP
clusterIP: None
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: mdb-ss
namespace: default
spec:
serviceName: mdb
replicas: 1
template:
metadata:
name: mdb-ss
labels:
app: mdb-ss
spec:
terminationGracePeriodSeconds: 10
containers:
- name: mongodb
image: mongo:3.4.4
imagePullPolicy: Always
args:
- --replSet
- bigchain-rs
ports:
- containerPort: 27017
hostPort: 27017
protocol: TCP
resources:
limits:
cpu: 200m
memory: 768Mi
restartPolicy: Always