apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    death-star-project: hotel-res
    app-name: mongodb-user
  namespace: hotel-res
  name: mongodb-user
spec:
  replicas: 1
  selector:
    matchLabels:
      death-star-project: hotel-res
      app-name: mongodb-user
  strategy:
    type: Recreate
  template:
    metadata:
      name: mongodb-user
      labels:
        death-star-project: hotel-res
        app-name: mongodb-user
      annotations:
        sidecar.istio.io/inject: "true"
    spec:
      containers:
      - image: mongo:4.4.6
        name: hotel-reserv-user-mongo
        ports:
        - containerPort: 27017
        resources: {}
        volumeMounts:
        - mountPath: /data/db
          name: user
      hostname: user-db
      restartPolicy: Always
      volumes:
      - name: user
        persistentVolumeClaim:
          claimName: user
status: {}
