From 6232fcf7447d324b75b80caf1627ac7acc5587f2 Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Tue, 29 Oct 2024 11:25:47 +0800 Subject: [PATCH] Use `/pulsar/instances/deps/*` instead of `/pulsar/lib/*` in classpath --- controllers/spec/common.go | 2 +- images/pulsar-functions-base-runner/Dockerfile | 2 ++ images/pulsar-functions-java-runner/pulsarctl.Dockerfile | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/spec/common.go b/controllers/spec/common.go index abe5e34b..8e711ac7 100644 --- a/controllers/spec/common.go +++ b/controllers/spec/common.go @@ -1188,7 +1188,7 @@ func getProcessJavaRuntimeArgs(name, packageName, clusterName, logLevel, details state *v1alpha1.Stateful, tlsConfig TLSConfig, authConfig *v1alpha1.AuthConfig, maxPendingAsyncRequests *int32, logConfigFileName string) []string { - classPath := "/pulsar/instances/java-instance.jar:/pulsar/lib/*" + classPath := "/pulsar/instances/java-instance.jar:/pulsar/instances/deps/*" javaLogConfigPath := logConfigFileName if javaLogConfigPath == "" { javaLogConfigPath = DefaultJavaLogConfigPath diff --git a/images/pulsar-functions-base-runner/Dockerfile b/images/pulsar-functions-base-runner/Dockerfile index 622d3be2..725486d5 100644 --- a/images/pulsar-functions-base-runner/Dockerfile +++ b/images/pulsar-functions-base-runner/Dockerfile @@ -61,6 +61,8 @@ RUN rm -rf /pulsar/lib/presto || true RUN rm -rf /pulsar/conf/presto || true RUN rm -rf /pulsar/bin/pulsar-detector || true +RUN copy /pulsar/lib/com.fasterxml.jackson.dataformat-jackson-dataformat-yaml-*.jar /pulsar/instances/deps/ || true + ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE ENV java.io.tmpdir=/pulsar/tmp/ diff --git a/images/pulsar-functions-java-runner/pulsarctl.Dockerfile b/images/pulsar-functions-java-runner/pulsarctl.Dockerfile index 55e5d4f5..80440bef 100644 --- a/images/pulsar-functions-java-runner/pulsarctl.Dockerfile +++ b/images/pulsar-functions-java-runner/pulsarctl.Dockerfile @@ -45,6 +45,8 @@ RUN rm -rf /pulsar/lib/io.vertx-vertx-core-*.jar || true RUN rm -rf /pulsar/lib/presto || true RUN rm -rf /pulsar/conf/presto || true +RUN copy /pulsar/lib/com.fasterxml.jackson.dataformat-jackson-dataformat-yaml-*.jar /pulsar/instances/deps/ || true + ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE ENV java.io.tmpdir=/pulsar/tmp/