apiVersion: v1
kind: Pod
metadata:
  name: buildkite
  namespace: ops
  labels:
    name: buildkite
spec:
  containers:
    - name: buildkite
      image: gcr.io/ecucalibrator/bazel-buildkite:node
      env:
        - name: BUILDKITE_AGENT_TOKEN
          valueFrom:
            secretKeyRef:
              name: buildkite-agent-token
              key: BUILDKITE_AGENT_TOKEN
      volumeMounts:
      - name: buildkite-github-ssh-volume
        readOnly: true
        mountPath: "/buildkite-secrets"
      - name: environment-hooks-volume
        mountPath: "/buildkite/hooks"
      - name: gcr-push-service-account-volume
        mountPath: /root/gcr/
      - name: dockersock
        mountPath: "/var/run/docker.sock"
  volumes:
  - name: buildkite-github-ssh-volume
    secret:
      secretName: buildkite-github-ssh
      defaultMode: 0600
  - name: gcr-push-service-account-volume
    secret:
      secretName: gcr-push-service-account
      defaultMode: 0600
  - name: environment-hooks-volume
    configMap:
      name: add-env-key-hook
      items:
        - key: ADD_ENV_KEY_HOOK
          path: environment
  - name: dockersock
    hostPath:
      path: /var/run/docker.sock
