---
apiVersion: v1
kind: Pod
metadata:
  name: build-iso
spec:
  containers:
    - name: build-iso
      image: "{{ images['build-iso'] }}"
      resources:
        requests:
          cpu: "250m"
          memory: 1Gi
        limits:
          cpu: "1"
          memory: 1Gi
      env:
        - name: DOCKER_HOST
          value: localhost:2375
      volumeMounts:
        - name: worker-workspace
          mountPath: /workdir
    - name: dind-daemon
      image: docker:19.03-dind
      resources:
        requests:
          cpu: "1"
          memory: 2Gi
        limits:
          cpu: "1"
          memory: 2Gi
      securityContext:
        privileged: true
      env:                                                                           
        - name: DOCKER_TLS_CERTDIR                                                   
          value: ''  
      volumeMounts:
        - name: docker-storage
          mountPath: /var/lib/docker
        - name: worker-workspace
          mountPath: /workdir
  volumes:
    - name: docker-storage
      emptyDir: {}
    - name: worker-workspace
      emptyDir: {}
