apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongodb
  labels:
    keel.sh/policy: minor
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      component: mongodb
  template:
    metadata:
      labels:
        component: mongodb
    spec:
      containers:
      - name: mongodb
        image: mongo
        ports:
        - containerPort: 27017
        volumeMounts:
        - mountPath: /data/db
          name: mongodb
        # readinessProbe:
        #   httpGet:
        #     path: /
        #     port: 80
        #   periodSeconds: 1
        # livenessProbe:
        #   httpGet:
        #     path: /
        #     port: 80
        livenessProbe:
          exec:
            command: ['ls', '/data/db']
          initialDelaySeconds: 5
          periodSeconds: 15
        resources:
          requests:
            memory: 85Mi
            cpu: 100m
          limits:
            memory: 256Mi
            cpu: 1
      volumes:
      - name: mongodb
        persistentVolumeClaim:
          claimName: mongodb
