Files
harmony/iobench/deployment-node-hostpath.yaml

66 lines
1.7 KiB
YAML

apiVersion: v1
kind: Namespace
metadata:
name: harmony-iobench
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: iobench-privileged-scc
subjects:
- kind: ServiceAccount
name: iobench
namespace: harmony-iobench # Change to your namespace/project
roleRef:
kind: ClusterRole
name: system:openshift:scc:privileged
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: iobench
namespace: harmony-iobench # Change to your namespace/project
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: iobench
namespace: harmony-iobench # Change to your namespace/project
labels:
app: iobench
spec:
replicas: 1
selector:
matchLabels:
app: iobench
template:
metadata:
labels:
app: iobench
spec:
nodeSelector:
#iobench: "true" # Tune to match your target node's label(s), e.g.,
kubernetes.io/hostname: worker3
tolerations:
- key: node.kubernetes.io/unschedulable
operator: Exists
effect: NoSchedule
serviceAccountName: iobench
containers:
- name: fio
image: juicedata/fio:latest # Replace with your preferred fio image
imagePullPolicy: IfNotPresent
command: [ "sleep", "infinity" ] # Keeps the container running for kubectl exec
securityContext:
runAsUser: 0
privileged: true
volumeMounts:
- name: iobench-pvc
mountPath: /data # Mount the PVC at /data
volumes:
- name: iobench-pvc
hostPath:
path: /var/lib/harmony-iobench # Tune this to your desired host node path
type: DirectoryOrCreate