jerrypeng commented on a change in pull request #5400: [functions] Allow 
functions to pass runtime specific options
URL: https://github.com/apache/pulsar/pull/5400#discussion_r344414390
 
 

 ##########
 File path: 
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntimeFactory.java
 ##########
 @@ -361,8 +376,26 @@ void 
validateMinResourcesRequired(Function.FunctionDetails functionDetails) {
         }
     }
 
+    KubernetesManifestCustomizer 
buildManifestCustomizer(Function.FunctionDetails funcDetails) {
+
+        KubernetesManifestCustomizer manifestCustomizer;
+        if (!isEmpty(manifestCustomizerClassName)) {
+            manifestCustomizer = (KubernetesManifestCustomizer) 
Reflections.createInstance(manifestCustomizerClassName, 
ClassLoader.getSystemClassLoader());
+        } else {
+            manifestCustomizer = new NoOpKubernetesManifestCustomizer();
+        }
+        manifestCustomizer.init(funcDetails, manifestCustomizerStaticConfig);
+        return manifestCustomizer;
+    }
+
     @Override
-    public Optional<FunctionAuthProvider> getAuthProvider() {
-        return Optional.ofNullable(authProvider.orElse(null));
+    public Optional<FunctionAuthProvider> 
getAuthProvider(Function.FunctionDetails funcDetails) {
 
 Review comment:
   lets not change this

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to