Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nodeSelector #22

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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