openwhisk-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [openwhisk] chetanmeh commented on a change in pull request #4712: Fixes #4711 - add a namespace configuration option to KCF
Date Tue, 05 Nov 2019 04:23:04 GMT
chetanmeh commented on a change in pull request #4712: Fixes #4711 - add a namespace configuration
option to KCF
URL: https://github.com/apache/openwhisk/pull/4712#discussion_r342377023
 
 

 ##########
 File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClient.scala
 ##########
 @@ -93,10 +94,15 @@ class KubernetesClient(
     with ProcessRunner {
   implicit protected val ec = executionContext
   implicit protected val am = ActorMaterializer()
+  protected val configBuilder = new ConfigBuilder()
 
 Review comment:
   As `configBuilder` is not to be used further we can avoid making it a instance field. So
we can refactor this a bit via
   
   ```scala
     implicit protected val kubeRestClient = {
       val builder = new ConfigBuilder()
         .withConnectionTimeout(config.timeouts.logs.toMillis.toInt)
         .withRequestTimeout(config.timeouts.logs.toMillis.toInt)
       config.actionNamespace.foreach(builder.withNamespace)
       new DefaultKubernetesClient(builder.build())
     }
   ```
   
   

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

Mime
View raw message