apiVersion: apps/v1
kind: Deployment
metadata:
  name: worker-ubuntu16-04
  namespace: buildbarn
spec:
  replicas: 8
  selector:
    matchLabels:
      app: worker
      instance: ubuntu16-04
  template:
    metadata:
      annotations:
        prometheus.io/port: "80"
        prometheus.io/scrape: "true"
      labels:
        app: worker
        instance: ubuntu16-04
    spec:
      containers:
      - args:
        - /config/worker.json
        image: buildbarn/bb-worker:20190617T153934Z-810b6b8
        name: worker
        volumeMounts:
        - mountPath: /config
          name: worker-config
        - mountPath: /worker
          name: worker
      - args:
        - /config/runner.json
        image: buildbarn/bb-runner-ubuntu16-04:20190617T153934Z-810b6b8
        name: runner
        volumeMounts:
        - mountPath: /config
          name: runner-config
        - mountPath: /worker
          name: worker
      initContainers:
      - name: volume-init
        image: busybox:1.30.1
        command:
        - sh
        - -c
        - mkdir -pm 0777 /worker/build && mkdir -pm 0700 /worker/cache && chmod 0777 /worker
        volumeMounts:
        - mountPath: /worker
          name: worker
      volumes:
      - configMap:
          name: worker-ubuntu16-04
        name: worker-config
      - configMap:
          name: runner
        name: runner-config
      - emptyDir: {}
        name: worker
