mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-17 14:24:27 +01:00
runtime-rs: call TomlConfig's validate function after load
Call TomlConfig's validate function after it is loaded and adjusted by annotations. Fixes: #5112 Signed-off-by: Bin Liu <bin@hyper.sh>
This commit is contained in:
@@ -313,6 +313,9 @@ fn load_config(spec: &oci::Spec) -> Result<TomlConfig> {
|
||||
TomlConfig::load_from_file(&config_path).context("load toml config")?;
|
||||
annotation.update_config_by_annotation(&mut toml_config)?;
|
||||
|
||||
// validate configuration and return the error
|
||||
toml_config.validate()?;
|
||||
|
||||
// Sandbox sizing information *may* be provided in two scenarios:
|
||||
// 1. The upper layer runtime (ie, containerd or crio) provide sandbox sizing information as an annotation
|
||||
// in the 'sandbox container's' spec. This would typically be a scenario where as part of a create sandbox
|
||||
|
||||
Reference in New Issue
Block a user