apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    litmuschaos.io/chaos: "true"
  labels:
    app: sock-shop
    name: orders-db
  name: orders-db
  namespace: sock-shop
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sock-shop
      name: orders-db
  template:
    metadata:
      labels:
        app: sock-shop
        name: orders-db
    spec:
      containers:
      - image: mongo
        imagePullPolicy: Always
        name: orders-db
        ports:
        - containerPort: 27017
          name: mongo
          protocol: TCP
        resources: {}
        securityContext:
          capabilities:
            add:
            - CHOWN
            - SETGID
            - SETUID
            drop:
            - all
          readOnlyRootFilesystem: true
        volumeMounts:
        - mountPath: /tmp
          name: tmp-volume
      volumes:
      - emptyDir:
          medium: Memory
        name: tmp-volume
---
apiVersion: v1
kind: Service
metadata:
  name: orders-db
  labels:
    name: orders-db
  namespace: sock-shop
spec:
  ports:
    # the port that this service should serve on
  - port: 27017
    targetPort: 27017
  selector:
    name: orders-db

