---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: vdbench-sharedv4
spec:
  replicas: 3
  selector:
    matchLabels:
      app: vdbench-sharedv4
  template:
    metadata:
      labels:
        app: vdbench-sharedv4
    spec:
      containers:
        - name: vdbench
          image: portworx/vdbench:torpedo
          imagePullPolicy: IfNotPresent
          resources:
            limits:
              cpu: 1000m
              memory: 500Mi
            requests:
              memory: 256Mi
              cpu: 100m
          command: ["./bench_runner.sh"]
          args: ["Basic", "5400", "$(POD_NAME)", "output/$(POD_NAME)"]
          env:
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          volumeMounts:
            - name: vdbench-persistent-storage
              mountPath: /tmp
            - name: vdbench-output-persistent-storage
              mountPath: /output
      volumes:
        - name: vdbench-persistent-storage
          persistentVolumeClaim:
            claimName: vdbench-pvc-sharedv4
        - name: vdbench-output-persistent-storage
          persistentVolumeClaim:
            claimName: vdbench-pvc-output-sv4
