apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: mongo
    name: mongo
  name: mongo
spec:
  replicas: 1
  revisionHistoryLimit: 5
  selector:
    matchLabels:
      app: mongo
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: mongo
    spec:
      containers:
        - image: mongo
          imagePullPolicy: Always
          name: mongo
          ports:
            - name: mongo
              containerPort: 27017
              hostPort: 27017
          volumeMounts:
            - name: mongo-claim
              mountPath: /data/db
      volumes:
        - name: mongo-claim
          persistentVolumeClaim:
            claimName: mongo-claim
status: {}
