pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] cckellogg commented on a change in pull request #2875: Hooked up secrets function api with secret function implementations
Date Sun, 28 Oct 2018 18:32:21 GMT
cckellogg commented on a change in pull request #2875: Hooked up secrets function api with
secret function implementations
URL: https://github.com/apache/pulsar/pull/2875#discussion_r228759374
 
 

 ##########
 File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/ThreadRuntimeFactory.java
 ##########
 @@ -44,15 +53,25 @@
     private final FunctionCacheManager fnCache;
     private final PulsarClient pulsarClient;
     private final String storageServiceUrl;
+    private final SecretsProvider secretsProvider;
     private volatile boolean closed;
 
     public ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String storageServiceUrl,
-            AuthenticationConfig authConfig) throws Exception {
-        this(threadGroupName, createPulsarClient(pulsarServiceUrl, authConfig), storageServiceUrl);
+                                AuthenticationConfig authConfig, String secretsProviderClassName,
+                                Map<String, String> secretsProviderConfig) throws Exception
{
+        this(threadGroupName, createPulsarClient(pulsarServiceUrl, authConfig), storageServiceUrl,
secretsProviderClassName, secretsProviderConfig);
     }
 
     @VisibleForTesting
-    public ThreadRuntimeFactory(String threadGroupName, PulsarClient pulsarClient, String
storageServiceUrl) {
+    public ThreadRuntimeFactory(String threadGroupName, PulsarClient pulsarClient, String
storageServiceUrl,
+                                String secretsProviderClassName, Map<String, String>
secretsProviderConfig) {
+        try {
+            secretsProvider = (SecretsProvider) Reflections.createInstance(secretsProviderClassName,
ClassLoader.getSystemClassLoader());
 
 Review comment:
   I don't think this should be enforced it's an optional thing and no implementation should
be the default. Also just enable this for kubernetes runtime to start then add the others
in additional patches.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Mime
View raw message