From issues-return-41027-archive-asf-public=cust-asf.ponee.io@openwhisk.apache.org Tue Nov 5 04:23:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3396F180658 for ; Tue, 5 Nov 2019 05:23:05 +0100 (CET) Received: (qmail 90727 invoked by uid 500); 5 Nov 2019 04:23:04 -0000 Mailing-List: contact issues-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list issues@openwhisk.apache.org Received: (qmail 90709 invoked by uid 99); 5 Nov 2019 04:23:04 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Nov 2019 04:23:04 +0000 From: GitBox To: issues@openwhisk.apache.org Subject: [GitHub] [openwhisk] chetanmeh commented on a change in pull request #4712: Fixes #4711 - add a namespace configuration option to KCF Message-ID: <157292778442.17572.13539183254116661568.gitbox@gitbox.apache.org> Date: Tue, 05 Nov 2019 04:23:04 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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