dgrove-oss closed pull request #3409: Remove namespace configuration; use 
invoker's instead
URL: https://github.com/apache/incubator-openwhisk/pull/3409

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/invoker/src/main/resources/application.conf 
index 7f85eb571c..bc651fcdfe 100644
--- a/core/invoker/src/main/resources/application.conf
+++ b/core/invoker/src/main/resources/application.conf
@@ -19,7 +19,6 @@ whisk {
   kubernetes {
-    namespace: openwhisk
     # Timeouts for k8s commands. Set to "Inf" to disable timeout.
     timeouts {
       run: 1 minute
diff --git 
index 5f7c7d6413..6853f66e14 100644
@@ -79,9 +79,7 @@ case class KubernetesInvokerAgentConfig(enabled: Boolean, 
port: Int)
  * General configuration for kubernetes client
-case class KubernetesClientConfig(namespace: String,
-                                  timeouts: KubernetesClientTimeoutConfig,
-                                  invokerAgent: KubernetesInvokerAgentConfig)
+case class KubernetesClientConfig(timeouts: KubernetesClientTimeoutConfig, 
invokerAgent: KubernetesInvokerAgentConfig)
  * Serves as interface to the kubectl CLI tool.
@@ -150,12 +148,13 @@ class KubernetesClient(
-    kubeRestClient.pods.inNamespace(config.namespace).create(pod)
+    val namespace = kubeRestClient.getNamespace
+    kubeRestClient.pods.inNamespace(namespace).create(pod)
     Future {
       blocking {
         val createdPod = kubeRestClient.pods
-          .inNamespace(config.namespace)
+          .inNamespace(namespace)
           .waitUntilReady(config.timeouts.run.length, config.timeouts.run.unit)
@@ -178,7 +177,7 @@ class KubernetesClient(
       Future {
         blocking {
-            .inNamespace(config.namespace)
+            .inNamespace(kubeRestClient.getNamespace)
             .withLabel(key, value)


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:

With regards,
Apache Git Services

Reply via email to