---
apiVersion: v1
kind: Pod
metadata:
  labels:
    agent: zeebe-ci-build
spec:
  nodeSelector:
    cloud.google.com/gke-nodepool: slaves
  tolerations:
    - key: "slaves"
      operator: "Exists"
      effect: "NoSchedule"
  containers:
    - name: maven
      image: maven:3.6.0-jdk-8
      command: ["cat"]
      tty: true
      env:
        - name: LIMITS_CPU
          valueFrom:
            resourceFieldRef:
              resource: limits.cpu
        - name: JAVA_TOOL_OPTIONS
          value: |
            -XX:+UnlockExperimentalVMOptions
            -XX:+UseCGroupMemoryLimitForHeap
      resources:
        limits:
          cpu: 8
          memory: 32Gi
        requests:
          cpu: 8
          memory: 32Gi
    - name: golang
      image: golang:1.12.2
      command: ["cat"]
      tty: true
      resources:
        limits:
          cpu: 3
          memory: 1Gi
        requests:
          cpu: 3
          memory: 1Gi
    - name: docker
      image: docker:18.09.4-dind
      args: ["--storage-driver=overlay2"]
      securityContext:
        privileged: true
      tty: true
      resources:
        limits:
          cpu: 1
          memory: 512Mi
        requests:
          cpu: 1
          memory: 512Mi
