apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: elenchos
  name: elenchos
spec:
  replicas: 1
  revisionHistoryLimit: 5
  selector:
    matchLabels:
      app: elenchos
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: elenchos
    spec:
      containers:
        - image: gcr.io/elenchos/app
          resources:
            requests:
              memory: "2Gi"
          imagePullPolicy: Always
          securityContext:
            privileged: true
          name: elenchos
          env:
            - name: PORT
              value: "3000"
            - name: DB_URI
              value: "mongodb://mongo:27017/pull_requests"
            - name: DB_USER
              value: ""
            - name: DB_PASS
              value: ""
            - name: CODE_DIR
              value: "/code"
          volumeMounts:
            - name: git-storage
              mountPath: /code
      volumes:
        - name: git-storage
          persistentVolumeClaim:
            claimName: git-storage
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
status: {}
