apiVersion: batch/v1
kind: Job
metadata:
  name: dbench
spec:
  template:
    spec:
      nodeSelector:
        agentpool: NODE_POOL_NAME
      containers:
      - name: dbench
        image: ndrpnt/dbench:1.0.0
        imagePullPolicy: Always
        env:
          - name: DBENCH_MOUNTPOINT
            value: /data
          - name: DBENCH_QUICK
            value: "no"
          - name: FIO_SIZE
            value: 1G
          - name: FIO_OFFSET_INCREMENT
            value: 256M
          - name: FIO_DIRECT
            value: "1"
        volumeMounts:
        - name: dbench-pv
          mountPath: /data
      restartPolicy: Never
      volumes:
      - name: dbench-pv
        azureDisk:
          kind: Managed
          diskName: ultraSSD
          diskURI: DISK_URI
          cachingMode: None
  backoffLimit: 4