srkukarni commented on a change in pull request #3043: Set not just resource
requests but also limits
URL: https://github.com/apache/pulsar/pull/3043#discussion_r236344606
##########
File path:
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java
##########
@@ -585,6 +585,7 @@ private V1Container getFunctionContainer(List<String>
instanceCommand, Function.
requests.put("memory", Quantity.fromString(Long.toString(resource !=
null && resource.getRam() != 0 ? resource.getRam() : 1073741824)));
requests.put("cpu", Quantity.fromString(Double.toString(resource !=
null && resource.getCpu() != 0 ? resource.getCpu() : 1)));
resourceRequirements.setRequests(requests);
Review comment:
Not sure I concur with this. This actually can lead to very sticky
situations. For instance imagine someone deploying a bunch of functions that
all go into running mode because the minimum criteria is met but when the load
starts up, some of them will be booted out and may never get scheduled if there
are no resources left(this actually happened at several production deployments
that I've worked with). Thus I believe that request/max should be the same.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services