---
apiVersion: v1
kind: Pod
metadata:
  name: worker
spec:
  containers:
    - name: build-worker
      image: "{{ images.worker }}"
      resources:
        requests:
          cpu: "250m"
          memory: 2Gi
        limits:
          cpu: "1"
          memory: 2Gi
      env:
        - name: DOCKER_HOST
          value: localhost:2375
      volumeMounts:
        - name: worker-workspace
          mountPath: /home/eve/workspace
    - name: dind-daemon
      image: docker:18.09.6-dind
      resources:
        requests:
          cpu: "500m"
          memory: 2Gi
        limits:
          cpu: "1"
          memory: 2Gi
      securityContext:
        privileged: true
      volumeMounts:
        - name: docker-storage
          mountPath: /var/lib/docker
        - name: worker-workspace
          mountPath: /home/eve/workspace
  volumes:
    - name: docker-storage
      emptyDir: {}
    - name: worker-workspace
      emptyDir: {}
