test: add storage benchmark

This commit is contained in:
Khue Doan 2024-03-12 07:48:42 +07:00
parent c244195d8a
commit 9135b60695
2 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,38 @@
# kubectl apply -f dbench-rwo.yaml
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dbench-rwo
spec:
storageClassName: standard-rwo
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: batch/v1
kind: Job
metadata:
name: dbench-rwo
spec:
template:
spec:
containers:
- name: dbench
image: zayashv/dbench:latest
imagePullPolicy: Always
env:
- name: DBENCH_MOUNTPOINT
value: /data
- name: DBENCH_QUICK
value: "no"
volumeMounts:
- name: data
mountPath: /data
restartPolicy: Never
volumes:
- name: data
persistentVolumeClaim:
claimName: dbench-rwo

View File

@ -0,0 +1,38 @@
# kubectl apply -f dbench-rwx.yaml
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dbench-rwx
spec:
storageClassName: standard-rwx
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: batch/v1
kind: Job
metadata:
name: dbench-rwx
spec:
template:
spec:
containers:
- name: dbench
image: zayashv/dbench:latest
imagePullPolicy: Always
env:
- name: DBENCH_MOUNTPOINT
value: /data
- name: DBENCH_QUICK
value: "no"
volumeMounts:
- name: data
mountPath: /data
restartPolicy: Never
volumes:
- name: data
persistentVolumeClaim:
claimName: dbench-rwx