theshire/kubernetes/tools/kbench.yaml

49 lines
1.2 KiB
YAML

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: kbench-pvc
spec:
storageClassName: zfs-generic-nfs-csi
# storageClassName: openebs-hostpath
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 33Gi
---
apiVersion: batch/v1
kind: Job
metadata:
name: kbench
spec:
template:
metadata:
labels:
kbench: fio
spec:
containers:
- name: kbench
image: yasker/kbench:latest
imagePullPolicy: Always
env:
# - name: QUICK_MODE # for debugging
# value: "1"
- name: FILE_NAME
value: "/volume/test"
- name: SIZE
value: "30G" # must be 10% smaller than the PVC size due to filesystem also took space
- name: CPU_IDLE_PROF
value: "disabled" # must be "enabled" or "disabled"
volumeMounts:
- name: vol
mountPath: /volume/
# volumeDevices:
# - name: vol
# devicePath: /volume/test
restartPolicy: Never
volumes:
- name: vol
persistentVolumeClaim:
claimName: kbench-pvc
backoffLimit: 0