-
Notifications
You must be signed in to change notification settings - Fork 47
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 a node parameter to the FIO benchmark #105
Conversation
Thanks for the PR - this looks useful 👍. Any reasons why you pick |
Good call, I originally wanted it in order to be able to repeat benchmarks on the same node and select any node without having to set up labels, but I found out that the "kubernetes.io/hostname" label would allow to do the same using hostnames. I'll change it to nodeSelector and notify this PR. I've had a look at the current flags and conventions and it seems that it will be |
How about just follow the $ kubectl get -h | grep -w "\-l"
-l, --selector='': Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2) I think just supporting |
Re-reading our earlier conversations, I think |
e2e9922
to
b8c9778
Compare
I've pushed an implementation of a flag which sets the
The name "nodeselector" was chosen without a dash for most consistency with existing flag names. Usage: The used syntax is a subset of kubectl's --selector flag's syntax EXCEPT that it allows to write I'm not sure to which extend kubestr cares about backwards compatibility though; I've realized that the current versions are 0.x. Tolerations need to be solved in order to be able to create pods anywhere but I'll create a separate issue discussing that. Edit: Tolerations issue is #111 |
b8c9778
to
d0f4a0e
Compare
@mmotejlek thanks for the PR. Sorry for the late response - I just got back from vacation. I will review this shortly. |
@mmotejlek Code change LGTM and works great. Also, appreciate the tests! Can you resolve the conflicts? |
a1d5f0d
to
0d522f6
Compare
@ihcsim Conflicts resolved. Thanks for all the feedback on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍. Thanks!
@@ -5,6 +5,7 @@ import ( | |||
"encoding/json" | |||
"fmt" | |||
"os" | |||
"k8s.io/apimachinery/pkg/labels" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] this should probably move to the list below with other third-party imports
Not blocking the PR, we can fix it as a follow-up
Thanks for the PR @mmotejlek 🙏🏼 |
I've added a parameter to the FIO benchmark which allows to specify a node on which to deploy the pod which runs the benchmark. Internally it sets the Node field in the Pod definition. The notation is
--node
or-N
and the default value is empty, meaning no node is specified.Examples of when setting a specific node matters: