apiVersion: v1
kind: Pod
metadata:
  annotations:
    iam.amazonaws.com/role: "KubernetesJenkinsAgent"
spec:
  serviceAccount: "jenkins"
  containers:
    - name: docker
      image: "772592230491.dkr.ecr.eu-west-1.amazonaws.com/cicd/docker-buildx:lts"
      command: ["cat"]
      tty: true
      volumeMounts:
        - name: docker-socket
          mountPath: "/var/run/docker.sock"
        - name: buildx-multi-arch
          mountPath: "/root/.docker/buildx/instances/multi-arch"
    - name: notifications
      image: '772592230491.dkr.ecr.eu-west-1.amazonaws.com/jenkins-notifications:v0.1.9.1'
      command: ["cat"]
      tty: true
      env:
        - name: SLACK_WEBHOOK_ADDRESS
          valueFrom:
            secretKeyRef:
              name: jenkins-notifications-secret
              key: slack-webhook-url
  volumes:
    - name: docker-socket
      hostPath:
        path: /var/run/docker.sock
    - name: maven-cache
      hostPath:
        path: /root/.m2
    - name: buildx-multi-arch
      hostPath:
        path: /home/ec2-user/.docker/buildx/instances/multi-arch
