You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/04/21 20:06:47 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #6752: Support different docker images in Kubernetes runtime of Pulsar Functions

sijie commented on a change in pull request #6752:
URL: https://github.com/apache/pulsar/pull/6752#discussion_r412454454



##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
##########
@@ -155,6 +158,9 @@
                       String pythonDependencyRepository,
                       String pythonExtraDependencyRepository,
                       String pulsarDockerImageName,
+                      String javaFunctionDockerImageName,
+                      String pythonFunctionDockerImageName,
+                      String goFunctionDockerImageName,

Review comment:
       @cckellogg I think the idea is to create different instance images for different language runtime. So we can start making the language runtime pluggable. 

##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
##########
@@ -973,8 +982,19 @@ private V1PodSpec getPodSpec(List<String> instanceCommand, Function.Resources re
     V1Container getFunctionContainer(List<String> instanceCommand, Function.Resources resource) {
         final V1Container container = new V1Container().name(PULSARFUNCTIONS_CONTAINER_NAME);
 
-        // set up the container images
-        container.setImage(pulsarDockerImageName);
+        // By default, if we do not use the function image of a specific language, then we will support all languages.
+        if (javaFunctionDockerImageName == null && pythonFunctionDockerImageName == null && goFunctionDockerImageName == null) {

Review comment:
       I think the logic here is completely wrong. You should set the correct docker image name based on the language runtime, not based on whether this configuration is set or not.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org