mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-16 22:39:01 +00:00
runtime: Enable to get cdh_api_timeout from configuration file
This commit allows `cdh_api_timeout` to be configured from the configuration file. The configuration is commented out with specifying a default value (50s) because the default value is configured in the agent. Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
This commit is contained in:
@@ -282,6 +282,10 @@ kernel_modules=[]
|
||||
# (default: 45)
|
||||
dial_timeout = 45
|
||||
|
||||
# Confidential Data Hub API timeout value in seconds
|
||||
# (default: 50)
|
||||
#cdh_api_timeout = 50
|
||||
|
||||
[runtime]
|
||||
# If enabled, the runtime will log additional debug messages to the
|
||||
# system log
|
||||
|
@@ -157,6 +157,10 @@ disable_selinux=@DEFDISABLESELINUX@
|
||||
# (default: 45)
|
||||
dial_timeout = 45
|
||||
|
||||
# Confidential Data Hub API timeout value in seconds
|
||||
# (default: 50)
|
||||
#cdh_api_timeout = 50
|
||||
|
||||
[runtime]
|
||||
# If enabled, the runtime will log additional debug messages to the
|
||||
# system log
|
||||
|
@@ -328,6 +328,10 @@ block_device_driver = "virtio-blk"
|
||||
# (default: 45)
|
||||
dial_timeout = 45
|
||||
|
||||
# Confidential Data Hub API timeout value in seconds
|
||||
# (default: 50)
|
||||
#cdh_api_timeout = 50
|
||||
|
||||
[runtime]
|
||||
# If enabled, the runtime will log additional debug messages to the
|
||||
# system log
|
||||
|
@@ -282,6 +282,10 @@ kernel_modules=[]
|
||||
# (default: 45)
|
||||
dial_timeout = 45
|
||||
|
||||
# Confidential Data Hub API timeout value in seconds
|
||||
# (default: 50)
|
||||
#cdh_api_timeout = 50
|
||||
|
||||
[runtime]
|
||||
# If enabled, the runtime will log additional debug messages to the
|
||||
# system log
|
||||
|
@@ -567,6 +567,10 @@ kernel_modules=[]
|
||||
# (default: 45)
|
||||
dial_timeout = 45
|
||||
|
||||
# Confidential Data Hub API timeout value in seconds
|
||||
# (default: 50)
|
||||
#cdh_api_timeout = 50
|
||||
|
||||
[runtime]
|
||||
# If enabled, the runtime will log additional debug messages to the
|
||||
# system log
|
||||
|
@@ -566,6 +566,10 @@ kernel_modules=[]
|
||||
# (default: 45)
|
||||
dial_timeout = 45
|
||||
|
||||
# Confidential Data Hub API timeout value in seconds
|
||||
# (default: 50)
|
||||
#cdh_api_timeout = 50
|
||||
|
||||
[runtime]
|
||||
# If enabled, the runtime will log additional debug messages to the
|
||||
# system log
|
||||
|
@@ -294,6 +294,10 @@ kernel_modules = []
|
||||
# (default: 45)
|
||||
dial_timeout = 45
|
||||
|
||||
# Confidential Data Hub API timeout value in seconds
|
||||
# (default: 50)
|
||||
#cdh_api_timeout = 50
|
||||
|
||||
[runtime]
|
||||
# If enabled, the runtime will log additional debug messages to the
|
||||
# system log
|
||||
|
@@ -198,6 +198,7 @@ type agent struct {
|
||||
Tracing bool `toml:"enable_tracing"`
|
||||
DebugConsoleEnabled bool `toml:"debug_console_enabled"`
|
||||
DialTimeout uint32 `toml:"dial_timeout"`
|
||||
CdhApiTimeout uint32 `toml:"cdh_api_timeout"`
|
||||
}
|
||||
|
||||
func (orig *tomlConfig) Clone() tomlConfig {
|
||||
@@ -736,6 +737,10 @@ func (a agent) dialTimout() uint32 {
|
||||
return a.DialTimeout
|
||||
}
|
||||
|
||||
func (a agent) cdhApiTimout() uint32 {
|
||||
return a.CdhApiTimeout
|
||||
}
|
||||
|
||||
func (a agent) debug() bool {
|
||||
return a.Debug
|
||||
}
|
||||
@@ -1415,6 +1420,7 @@ func updateRuntimeConfigAgent(configPath string, tomlConf tomlConfig, config *oc
|
||||
KernelModules: agent.kernelModules(),
|
||||
EnableDebugConsole: agent.debugConsoleEnabled(),
|
||||
DialTimeout: agent.dialTimout(),
|
||||
CdhApiTimeout: agent.cdhApiTimout(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -283,6 +283,7 @@ type KataAgentConfig struct {
|
||||
KernelModules []string
|
||||
ContainerPipeSize uint32
|
||||
DialTimeout uint32
|
||||
CdhApiTimeout uint32
|
||||
LongLiveConn bool
|
||||
Debug bool
|
||||
Trace bool
|
||||
@@ -348,6 +349,11 @@ func KataAgentKernelParams(config KataAgentConfig) []Param {
|
||||
params = append(params, Param{Key: kernelParamDebugConsoleVPort, Value: kernelParamDebugConsoleVPortValue})
|
||||
}
|
||||
|
||||
if config.CdhApiTimeout > 0 {
|
||||
cdhApiTimeout := strconv.FormatUint(uint64(config.CdhApiTimeout), 10)
|
||||
params = append(params, Param{Key: vcAnnotations.CdhApiTimeoutKernelParam, Value: cdhApiTimeout})
|
||||
}
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
|
@@ -309,6 +309,8 @@ const (
|
||||
AgentContainerPipeSize = kataAnnotAgentPrefix + ContainerPipeSizeOption
|
||||
ContainerPipeSizeOption = "container_pipe_size"
|
||||
ContainerPipeSizeKernelParam = "agent." + ContainerPipeSizeOption
|
||||
CdhApiTimeoutOption = "cdh_api_timeout"
|
||||
CdhApiTimeoutKernelParam = "agent." + CdhApiTimeoutOption
|
||||
|
||||
// Policy is an annotation containing the contents of an agent policy file, base64 encoded.
|
||||
Policy = kataAnnotAgentPrefix + "policy"
|
||||
|
Reference in New Issue
Block a user