apiVersion: batch/v1
kind: Job
metadata:
  name: diskspd-win
spec:
  template:
    metadata:
      labels:
        app: diskspd-win
    spec:
      containers:
      - name: diskspd
        image: patricklang/diskspd:ltsc2019
        resources:
          limits:
            cpu: 2
            memory: 2Gi
          requests:
            cpu: 1
            memory: 1Gi
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - diskspd-win
            topologyKey: "kubernetes.io/hostname"
      nodeSelector:
        "beta.kubernetes.io/os": windows
      restartPolicy: Never
  parallelism: 4 # Recommend setting to number of nodes
  completions: 4 # Recommend setting to number of nodes
  backoffLimit: 4
