pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mme...@apache.org
Subject [pulsar] branch master updated: Set not just resource requests but also limits (#3043)
Date Wed, 28 Nov 2018 22:52:19 GMT
This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 5c2b13e  Set not just resource requests but also limits (#3043)
5c2b13e is described below

commit 5c2b13e3e3520453eacf852d0142081581d3d94c
Author: Sanjeev Kulkarni <sanjeevrk@gmail.com>
AuthorDate: Wed Nov 28 14:52:15 2018 -0800

    Set not just resource requests but also limits (#3043)
---
 .../main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java
index fd6c4c4..cd83e69 100644
--- a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java
+++ b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java
@@ -592,6 +592,7 @@ class KubernetesRuntime implements Runtime {
         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);
+        resourceRequirements.setLimits(requests);
         container.setResources(resourceRequirements);
 
         // set container ports


Mime
View raw message