Closed nishaad78 closed 4 years ago
Hi @nishaad78
Regarding CPU, you can set the requested CPU on the config endpoint (https://zooz.github.io/predator/configuration.html) (runner_cpu) or in the UI
But as you said, this is the requested CPU and not the limit.
To enhance the predator-runner job template we lately introduced a new config variable called: 'custom_runner_definition'
This variable is expected to be a JSON which will be merged with the default predator-runner job template, there you customize it.
It's was merged to mater about two weeks ago and will be part of 1.4 release so if you want to use it, change the predator image to zooz/predator:latest
example usage for your use-case (this template can be further customized if needed):
curl -X PUT \
http://PREDATOR-API-URL/v1/config \
-H 'Content-Type: application/json' \
-d '{
"custom_runner_definition": {
"spec": {
"template": {
"spec": {
"containers": [{
"resources": {
"requests": {
"memory": "128Mi",
"cpu": "0.5"
},
"limits": {
"memory": "1024Mi",
"cpu": "1"
}
}
}]
}
}
}
}
}'
btw @nishaad78 you can also install Predator in specific namespace and give that namespace limits on CPU and Memory
https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/
Thanks @enudler!
Is your feature request related to a problem? Please describe. Currently this is the only resources config set by default for a k8s
Job
:I would want more control over this so that I can specify requests and limits, especially on memory. This is so that a rogue test run won't accidentally affect other workloads running on the k8s node.
Describe the solution you'd like A way to specify resources config for my Tests, ideally, when creating a Test.