apiVersion: apps/v1
kind: Deployment
metadata:
  name: vsts-agent
  labels: 
    app: vsts-agent
spec:
  replicas: 5
  selector:
    matchLabels:
      app: vsts-agent
  template:
    metadata:
      labels:
        app: vsts-agent
        version: "0.2"
    spec:
      containers:
      - name: vsts-agent
        image: mcr.microsoft.com/azure-pipelines/vsts-agent
        env:
          - name: VSTS_ACCOUNT
            valueFrom:
              secretKeyRef:
                name: vsts
                key: VSTS_ACCOUNT
          - name: VSTS_TOKEN
            valueFrom:
              secretKeyRef:
                name: vsts
                key: VSTS_TOKEN
          - name: VSTS_POOL
            value: Default
        volumeMounts:
        - mountPath: /var/run/docker.sock
          name: docker-volume
      volumes:
      - name: docker-volume
        hostPath:
          path: /var/run/docker.sock