问题描述
当前, application.conf 中的Invoker组件配置具有以下容器代理配置:
container-proxy {
timeouts {
# The "unusedTimeout" in the ContainerProxy,#aka 'How long should a container sit idle until we kill it?'
idle-container = 10 minutes
pause-grace = 50 milliseconds
}
我通过 Helm 在 kubernetes 上安装了 openwhisk 。
如何在 values.yaml 或 cluster.yaml 中配置闲置容器? 我在 values.yaml 和 cluster.yaml 中尝试了以下方法,但不起作用:
whisk:
containerProxy:
timeouts:
idleContainer: "3minutes"
解决方法
要覆盖.conf
文件中的默认值,请在调用程序/控制器容器中设置以CONFIG_开头的环境变量。具体来说,要更改whisk.container-proxy.timeouts.idle-container
,您可以将环境变量CONFIG_whisk_containerProxy_timeouts_idleContainer
定义为具有所需值。
在当前OpenWhisk掌舵图中,这需要编辑invoker-pod.yaml
或container-pod.yaml
的yaml文件以添加其他环境变量定义。这些文件中定义了多个CONFIG_
变量,因此您应该有一些示例。