runtime: paas enablevhostuserstore annotation to hypervisor config

Fixes: #6073
Signed-off-by: zhaojizhuang <571130360@qq.com>
This commit is contained in:
zhaojizhuang 2023-01-13 17:01:26 +08:00
parent 2b4b825228
commit cf1bae3521

View File

@ -469,6 +469,12 @@ func addHypervisorConfigOverrides(ocispec specs.Spec, config *vc.SandboxConfig,
config.HypervisorConfig.VhostUserStorePath = value config.HypervisorConfig.VhostUserStorePath = value
} }
if err := newAnnotationConfiguration(ocispec, vcAnnotations.EnableVhostUserStore).setBool(func(enable bool) {
config.HypervisorConfig.EnableVhostUserStore = enable
}); err != nil {
return err
}
if value, ok := ocispec.Annotations[vcAnnotations.GuestHookPath]; ok { if value, ok := ocispec.Annotations[vcAnnotations.GuestHookPath]; ok {
if value != "" { if value != "" {
config.HypervisorConfig.GuestHookPath = value config.HypervisorConfig.GuestHookPath = value