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



##########
File path: 
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
##########
@@ -868,6 +876,39 @@ public void deleteService() throws InterruptedException {
                 userCodeFilePath);
     }
 
+    private List<String> getPackageDownloadCommand(String packageName, String 
userCodeFilePath) {
+        // add auth plugin and parameters if necessary
+        if (authenticationEnabled && authConfig != null) {
+            if (isNotBlank(authConfig.getClientAuthenticationPlugin())
+                && isNotBlank(authConfig.getClientAuthenticationParameters())
+                && instanceConfig.getFunctionAuthenticationSpec() != null) {
+                return Arrays.asList(
+                    pulsarRootDir + configAdminCLI,
+                    "--auth-plugin",
+                    authConfig.getClientAuthenticationPlugin(),
+                    "--auth-params",
+                    authConfig.getClientAuthenticationParameters(),
+                    "--admin-url",
+                    pulsarAdminUrl,
+                    "packages",
+                    "download",
+                    packageName,
+                    "--path",
+                    userCodeFilePath);
+            }
+        }
+
+        return Arrays.asList(

Review comment:
       Don't we need authentication and authorization plugin for downloading 
the packages?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to