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 2019/10/16 22:55:42 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #5400: [functions] Allow functions to pass runtime specific options

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_r335745052
 
 

 ##########
 File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntimeFactory.java
 ##########
 @@ -340,8 +353,21 @@ 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 DefaultKubernetesManifestCustomizer();
 
 Review comment:
   I would suggest that the default to be a no-op implementation.  Allowing users the change the certain kubernetes settings when submitting a function can be a security risk.

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


With regards,
Apache Git Services