apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongodb
  namespace: keptn-datastore
spec:
  replicas: 1
  selector:
    matchLabels:
      name: mongodb
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        name: mongodb
    spec:
      securityContext:
        fsGroup: 184
      containers:
      - image: centos/mongodb-36-centos7:1
        name: mongodb
        env:
        - name: MONGODB_ADMIN_PASSWORD
          value: "password"
        - name: MONGODB_USER
          value: "user"
        - name: MONGODB_PASSWORD
          value: "password"
        - name: MONGODB_DATABASE
          value: "keptn"
        ports:
        - containerPort: 27017
        resources: {}
        volumeMounts:
        - mountPath: /var/lib/mongodb/data
          name: mongodata
      restartPolicy: Always
      volumes:
      - name: mongodata
        persistentVolumeClaim:
          claimName: mongodata
