apiVersion: v1
kind: Pod
metadata:
  labels:
    build-pipeline-name: mobilecoin-build
spec:
  nodeSelector:
    builder-node: "true"
  affinity:
    podAntiAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        podAffinityTerm:
          labelSelector:
            matchExpressions:
            - key: build-pipeline-name
              operator: In
              values:
                - mobilecoin-build
          topologyKey: "kubernetes.io/hostname"

  containers:
  
    - name: kaniko
      # Need the debug container to get busybox
      image: gcr.io/kaniko-project/executor:debug-v0.16.0
      imagePullPolicy: Always
      command:
        - /busybox/cat
      tty: true
      volumeMounts:
        - name: jenkins-docker-cfg
          mountPath: /kaniko/.docker

  volumes:
    - name: jenkins-docker-cfg
      secret:
        secretName: docker-credentials
        items:
        - key: .dockerconfigjson
          path: config.json


