1
0
Fork 0
home-stack-kustomize/kustomize/bases/mongodb/mongodb-statefulset.yaml

57 lines
1.2 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mongodb
labels:
app.kubernetes.io/component: mongodb
spec:
serviceName: mongodb
selector:
matchLabels:
app.kubernetes.io/component: mongodb
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/component: mongodb
spec:
containers:
- name: mongodb
image: mongo:4.4.18 # NOTE: this is the last version with raspberry pi 4 support
ports:
- name: mongodb
containerPort: 27017
resources:
requests:
cpu: 500m
memory: 500Mi
limits:
cpu: 500m
memory: 500Mi
volumeMounts:
- name: mongodb-pvc
mountPath: /data/db
volumeClaimTemplates:
- metadata:
name: mongodb-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
apiVersion: v1
kind: Service
metadata:
name: mongodb
labels:
app.kubernetes.io/component: mongodb
spec:
selector:
app.kubernetes.io/component: mongodb
ports:
- name: mongodb
port: 27017
targetPort: mongodb