Skip to content

Commit

Permalink
Merge pull request #22 from andrewh1978/selector
Browse files Browse the repository at this point in the history
add nodeSelector
  • Loading branch information
andrewh1978 authored Feb 8, 2024
2 parents a55e54d + bc87f31 commit 54f30a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions px-bench-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ kind: ConfigMap
metadata:
name: env
namespace: px-bench
######
# Options that control the underlying fio benchmark utility. These equate to the same-named option in fio
#
data:
#node_selector: "kubernetes.io/hostname=node-1-1" # uncomment to pin fio to node(s)
# Options that control the underlying fio benchmark utility. These equate to the same-named option in fio
file_size: "10GiB" # size of region of IO testing, will also be the size of the file
pvc_size: "50Gi" # If the storageclass is backed by a larger disk from infrastructure,
# such as a Portworx pool, then pvc_size should be the same size as
Expand Down
4 changes: 3 additions & 1 deletion px-bench-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ data:
export time_based=
envsubst < /px-bench/main.fio.tmpl > $filename
done
nodeSelector=$(echo $node_selector | sed 's/=/: /')
kubectl create configmap fio-config --from-file=/tmp/fio -n px-bench
for sc in $storageclass_list; do
volumes="$volumes\
Expand All @@ -60,7 +61,6 @@ data:
storage: $pvc_size
EOF
done
#echo $pvcs >/pvc.yml
kubectl apply -f - <<EOF
apiVersion: batch/v1
kind: Job
Expand All @@ -74,6 +74,8 @@ data:
labels:
px-bench: fio
spec:
nodeSelector:
$nodeSelector
securityContext:
fsGroupChangePolicy: "OnRootMismatch"
serviceAccountName: px-bench
Expand Down

0 comments on commit 54f30a7

Please sign in to comment.