Skip to content

Commit 484d44b

Browse files
committed
Make runtime delete timeout configurable
1 parent 526f011 commit 484d44b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class KubernetesContainerFactory(
6464
logging.info(this, "Cleaning up function runtimes")
6565
val labels = Map("invoker" -> label, "release" -> KubernetesContainerFactoryProvider.release)
6666
val cleaning = kubernetes.rm(labels, true)(TransactionId.invokerNanny)
67-
Await.ready(cleaning, 30.seconds)
67+
Await.ready(cleaning, KubernetesContainerFactoryProvider.runtimeDeleteTimeout)
6868
}
6969

7070
override def createContainer(tid: TransactionId,
@@ -90,6 +90,7 @@ class KubernetesContainerFactory(
9090
object KubernetesContainerFactoryProvider extends ContainerFactoryProvider {
9191

9292
val release = loadConfigOrThrow[String]("whisk.helm.release")
93+
val runtimeDeleteTimeout = loadConfigOrThrow[FiniteDuration]("whisk.runtime.delete.timeout")
9394

9495
override def instance(actorSystem: ActorSystem,
9596
logging: Logging,

core/standalone/src/main/resources/standalone-kcf.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ whisk {
3434
port-forwarding-enabled = true
3535
}
3636
helm.release = "release"
37+
runtime.delete.timeout = "30 seconds"
3738
}

tests/src/test/resources/application.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ whisk {
103103
}
104104

105105
helm.release = "release"
106+
runtime.delete.timeout = "30 seconds"
106107
}
107108

108109
#test-only overrides so that tests can override defaults in application.conf (todo: move all defaults to reference.conf)

0 commit comments

Comments
 (0)