apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongo-deployment
spec:
  selector:
    matchLabels:
      component: app
      role: database
  replicas: 1
  template:
    metadata:
      labels:
        component: app
        role: database
    spec:
      volumes:
        - name: mongo-pv-storage-prod
          persistentVolumeClaim:
            claimName: mongo-pv-claim-prod
      containers:
      - name: mongo-database
        image: mongo:4.4
        volumeMounts:
        - mountPath: /data/db
          name: mongo-pv-storage-prod
        ports:
        - containerPort: 27017
