Merge pull request #6074 from zhaojizhuang/enablevhostuserstore

runtime: paas enablevhostuserstore annotation to hypervisor config
This commit is contained in:
Bin Liu
2023-01-17 11:43:43 +08:00
committed by GitHub

View File

@@ -472,6 +472,12 @@ func addHypervisorConfigOverrides(ocispec specs.Spec, config *vc.SandboxConfig,
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 != "" {
config.HypervisorConfig.GuestHookPath = value