mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 23:38:31 +00:00
annotations: Add missing hypervisor control annotation
Add missing annotation definitions for a hypervisor control binary: - `io.katacontainers.config.hypervisor.ctlpath` - `io.katacontainers.config.hypervisor.hypervisorctl_hash` Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
76064e3e2d
commit
0f26f1cd6f
@ -42,6 +42,9 @@ const (
|
|||||||
// HypervisorPath is a sandbox annotation for passing a per container path pointing at the hypervisor that will run the container VM.
|
// HypervisorPath is a sandbox annotation for passing a per container path pointing at the hypervisor that will run the container VM.
|
||||||
HypervisorPath = kataAnnotHypervisorPrefix + "path"
|
HypervisorPath = kataAnnotHypervisorPrefix + "path"
|
||||||
|
|
||||||
|
// HypervisorCtlPath is a sandbox annotation for passing a per container path pointing at the hypervisor control binary that will run the container VM.
|
||||||
|
HypervisorCtlPath = kataAnnotHypervisorPrefix + "ctlpath"
|
||||||
|
|
||||||
// JailerPath is a sandbox annotation for passing a per container path pointing at the jailer that will constrain the container VM.
|
// JailerPath is a sandbox annotation for passing a per container path pointing at the jailer that will constrain the container VM.
|
||||||
JailerPath = kataAnnotHypervisorPrefix + "jailer_path"
|
JailerPath = kataAnnotHypervisorPrefix + "jailer_path"
|
||||||
|
|
||||||
@ -63,6 +66,9 @@ const (
|
|||||||
// HypervisorHash is an sandbox annotation for passing a container hypervisor binary SHA-512 hash value.
|
// HypervisorHash is an sandbox annotation for passing a container hypervisor binary SHA-512 hash value.
|
||||||
HypervisorHash = kataAnnotHypervisorPrefix + "hypervisor_hash"
|
HypervisorHash = kataAnnotHypervisorPrefix + "hypervisor_hash"
|
||||||
|
|
||||||
|
// HypervisorCtlHash is a sandbox annotation for passing a container hypervisor control binary SHA-512 hash value.
|
||||||
|
HypervisorCtlHash = kataAnnotHypervisorPrefix + "hypervisorctl_hash"
|
||||||
|
|
||||||
// JailerHash is an sandbox annotation for passing a jailer binary SHA-512 hash value.
|
// JailerHash is an sandbox annotation for passing a jailer binary SHA-512 hash value.
|
||||||
JailerHash = kataAnnotHypervisorPrefix + "jailer_hash"
|
JailerHash = kataAnnotHypervisorPrefix + "jailer_hash"
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ func (t AssetType) Annotations() (string, string, error) {
|
|||||||
return annotations.InitrdPath, annotations.InitrdHash, nil
|
return annotations.InitrdPath, annotations.InitrdHash, nil
|
||||||
case HypervisorAsset:
|
case HypervisorAsset:
|
||||||
return annotations.HypervisorPath, annotations.HypervisorHash, nil
|
return annotations.HypervisorPath, annotations.HypervisorHash, nil
|
||||||
|
case HypervisorCtlAsset:
|
||||||
|
return annotations.HypervisorCtlPath, annotations.HypervisorCtlHash, nil
|
||||||
case JailerAsset:
|
case JailerAsset:
|
||||||
return annotations.JailerPath, annotations.JailerHash, nil
|
return annotations.JailerPath, annotations.JailerHash, nil
|
||||||
case FirmwareAsset:
|
case FirmwareAsset:
|
||||||
@ -93,6 +95,8 @@ func (a *Asset) Valid() bool {
|
|||||||
return true
|
return true
|
||||||
case HypervisorAsset:
|
case HypervisorAsset:
|
||||||
return true
|
return true
|
||||||
|
case HypervisorCtlAsset:
|
||||||
|
return true
|
||||||
case JailerAsset:
|
case JailerAsset:
|
||||||
return true
|
return true
|
||||||
case FirmwareAsset:
|
case FirmwareAsset:
|
||||||
|
@ -116,6 +116,7 @@ func TestAssetNew(t *testing.T) {
|
|||||||
{annotations.ImagePath, annotations.ImageHash, ImageAsset, assetContentHash, false, false},
|
{annotations.ImagePath, annotations.ImageHash, ImageAsset, assetContentHash, false, false},
|
||||||
{annotations.InitrdPath, annotations.InitrdHash, InitrdAsset, assetContentHash, false, false},
|
{annotations.InitrdPath, annotations.InitrdHash, InitrdAsset, assetContentHash, false, false},
|
||||||
{annotations.HypervisorPath, annotations.HypervisorHash, HypervisorAsset, assetContentHash, false, false},
|
{annotations.HypervisorPath, annotations.HypervisorHash, HypervisorAsset, assetContentHash, false, false},
|
||||||
|
{annotations.HypervisorCtlPath, annotations.HypervisorCtlHash, HypervisorCtlAsset, assetContentHash, false, false},
|
||||||
{annotations.JailerPath, annotations.JailerHash, JailerAsset, assetContentHash, false, false},
|
{annotations.JailerPath, annotations.JailerHash, JailerAsset, assetContentHash, false, false},
|
||||||
{annotations.FirmwarePath, annotations.FirmwareHash, FirmwareAsset, assetContentHash, false, false},
|
{annotations.FirmwarePath, annotations.FirmwareHash, FirmwareAsset, assetContentHash, false, false},
|
||||||
|
|
||||||
@ -124,6 +125,7 @@ func TestAssetNew(t *testing.T) {
|
|||||||
{annotations.ImagePath, annotations.ImageHash, ImageAsset, assetContentWrongHash, true, false},
|
{annotations.ImagePath, annotations.ImageHash, ImageAsset, assetContentWrongHash, true, false},
|
||||||
{annotations.InitrdPath, annotations.InitrdHash, InitrdAsset, assetContentWrongHash, true, false},
|
{annotations.InitrdPath, annotations.InitrdHash, InitrdAsset, assetContentWrongHash, true, false},
|
||||||
{annotations.HypervisorPath, annotations.HypervisorHash, HypervisorAsset, assetContentWrongHash, true, false},
|
{annotations.HypervisorPath, annotations.HypervisorHash, HypervisorAsset, assetContentWrongHash, true, false},
|
||||||
|
{annotations.HypervisorCtlPath, annotations.HypervisorCtlHash, HypervisorCtlAsset, assetContentWrongHash, true, false},
|
||||||
{annotations.JailerPath, annotations.JailerHash, JailerAsset, assetContentWrongHash, true, false},
|
{annotations.JailerPath, annotations.JailerHash, JailerAsset, assetContentWrongHash, true, false},
|
||||||
{annotations.FirmwarePath, annotations.FirmwareHash, FirmwareAsset, assetContentWrongHash, true, false},
|
{annotations.FirmwarePath, annotations.FirmwareHash, FirmwareAsset, assetContentWrongHash, true, false},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user