-
Notifications
You must be signed in to change notification settings - Fork 222
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
new nodeSelectors are not working when label value contains "true" #700
Comments
Hey, Thanks for submitting this issue. I've taken a look and it makes sense why this is happening. The yaml parser is interpreting "true" as a boolean and not a string. There is logic that can be added in the trident operator to avoid this case. A workaround would be to add additional quotes around booleans, such as "'true'" and "'false'". |
Thank you for the quick feedback, tested the workaround and this works. |
I should note, this also seems to occur if the value is an integer string, Ex: "10" |
next note: The workaroud is not needed (and not working) for nodeSelector:
node-role.kubernetes.io/etcd: "true"
node-role.kubernetes.io/conrolplane: "true"
tridentControllerPluginNodeSelector:
node-role.kubernetes.io/etcd: "'true'"
node-role.kubernetes.io/conrolplane: "'true'"
tridentNodePluginNodeSelector:
node-role.kubernetes.io/worker: "'true'" |
Good point, thank you. We'll work to make it more consistent. |
This issue is fixed with commit a53cf69 and will be included in the Trident 22.07 release. |
This issue reproduces on 23.04.0.
please reopen this issue. |
Issue still exists in 23.07.0 version too. Please reopen the issue
Log: |
The issue still persist on trident 23.10. with ex values: And the workaround fixes the issue as well, |
Trying to use the new nodeSelectors with helm chart setup providing the following values per yaml file:
With this setup the corresponding pods are not created, in the operator logs you find messages
Using other Labels works, e.g.
So I think the values string
"true"
is not handled correctly when creating the k8s resources within the operator, looks like"true"
becomes totrue
(missing"
), this would explain the error messages.Only workaround is to use labels without a value of
"true"
but this needs extra configuration because you cannot use the default rancher labels asnode-role.kubernetes.io/worker: "true"
ornode-role.kubernetes.io/etcd: "true"
.Environment
Provide accurate information about the environment to help us reproduce the issue.
The text was updated successfully, but these errors were encountered: