diff --git a/core/invoker/src/main/resources/application.conf b/core/invoker/src/main/resources/application.conf index 8ddb68d2ac3..be683338593 100644 --- a/core/invoker/src/main/resources/application.conf +++ b/core/invoker/src/main/resources/application.conf @@ -173,4 +173,5 @@ whisk { invoker { protocol: http } + runtime.delete.timeout = "30 seconds" } diff --git a/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala index a73cb0df23b..8292eba1eac 100644 --- a/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala @@ -64,7 +64,7 @@ class KubernetesContainerFactory( logging.info(this, "Cleaning up function runtimes") val labels = Map("invoker" -> label, "release" -> KubernetesContainerFactoryProvider.release) val cleaning = kubernetes.rm(labels, true)(TransactionId.invokerNanny) - Await.ready(cleaning, 30.seconds) + Await.ready(cleaning, KubernetesContainerFactoryProvider.runtimeDeleteTimeout) } override def createContainer(tid: TransactionId, @@ -90,6 +90,7 @@ class KubernetesContainerFactory( object KubernetesContainerFactoryProvider extends ContainerFactoryProvider { val release = loadConfigOrThrow[String]("whisk.helm.release") + val runtimeDeleteTimeout = loadConfigOrThrow[FiniteDuration]("whisk.runtime.delete.timeout") override def instance(actorSystem: ActorSystem, logging: Logging, diff --git a/core/standalone/src/main/resources/standalone-kcf.conf b/core/standalone/src/main/resources/standalone-kcf.conf index 5ab38b19283..9194d803dd7 100644 --- a/core/standalone/src/main/resources/standalone-kcf.conf +++ b/core/standalone/src/main/resources/standalone-kcf.conf @@ -34,4 +34,5 @@ whisk { port-forwarding-enabled = true } helm.release = "release" + runtime.delete.timeout = "30 seconds" } diff --git a/tests/src/test/resources/application.conf.j2 b/tests/src/test/resources/application.conf.j2 index e2eaa0f36de..53d1cc98b48 100644 --- a/tests/src/test/resources/application.conf.j2 +++ b/tests/src/test/resources/application.conf.j2 @@ -103,6 +103,7 @@ whisk { } helm.release = "release" + runtime.delete.timeout = "30 seconds" } #test-only overrides so that tests can override defaults in application.conf (todo: move all defaults to reference.conf)