wolfstudy commented on a change in pull request #6752: Support different docker
images in Kubernetes runtime of Pulsar Functions
URL: https://github.com/apache/pulsar/pull/6752#discussion_r410814606
##########
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:
> This class allows you to do anything to the function spec so you can set
whatever image you want.
You are right, we can use the `KubernetesManifestCustomizer` interface to
implement different language function. And then? How do we load user-defined
implementation classes? The most direct way is to rebuild a new image based on
`apachepulsar/pulsar-all`. Eg:
```
FROM apachepulsar/pulsar-all:2.5.0
COPY my-custer-jar.jar /pulsar/lib
...
```
Or, another option though would be to do the following:
- get your jar into a k8s volume
- mount that volume into your function worker pod (say in
`/pulsar/extraLibs` )
- set `PULSAR_EXTRA_CLASSPATH=/pulsar/extraLibs`
So, I think this is two problems:
- We allow users to configure image for a specific language function(Eg:
Python function)
- For the user-defined k8s spec, we should consider how to load the
user-implemented tar package into the pod.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services