mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 14:58:16 +00:00
runtime: delete initdata annotation
Delete annotation from OCI spec and sandbox config. This is done after the optional initdata annotation value has been read. Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
This commit is contained in:
@@ -167,6 +167,10 @@ func CreateSandbox(ctx context.Context, vci vc.VC, ociSpec specs.Spec, runtimeCo
|
||||
delete(ociSpec.Annotations, vcAnnotations.Policy)
|
||||
delete(sandboxConfig.Annotations, vcAnnotations.Policy)
|
||||
|
||||
// The value of this annotation is sent to the sandbox using init data.
|
||||
delete(ociSpec.Annotations, vcAnnotations.Initdata)
|
||||
delete(sandboxConfig.Annotations, vcAnnotations.Initdata)
|
||||
|
||||
sandbox, err := vci.CreateSandbox(ctx, sandboxConfig, func(ctx context.Context) error {
|
||||
// Run pre-start OCI hooks, in the runtime namespace.
|
||||
if err := PreStartHooks(ctx, ociSpec, containerID, bundlePath); err != nil {
|
||||
@@ -236,6 +240,9 @@ func CreateContainer(ctx context.Context, sandbox vc.VCSandbox, ociSpec specs.Sp
|
||||
// The value of this annotation is sent to the sandbox using SetPolicy.
|
||||
delete(ociSpec.Annotations, vcAnnotations.Policy)
|
||||
|
||||
// The value of this annotation is sent to the sandbox using init data.
|
||||
delete(ociSpec.Annotations, vcAnnotations.Initdata)
|
||||
|
||||
ociSpec = SetEphemeralStorageType(ociSpec, disableGuestEmptyDir)
|
||||
|
||||
contConfig, err := oci.ContainerConfig(ociSpec, bundlePath, containerID, disableOutput)
|
||||
|
Reference in New Issue
Block a user