Add stub to build common OCI spec
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
@@ -24,7 +24,6 @@ import (
|
||||
"github.com/containerd/containerd/oci"
|
||||
"github.com/containerd/containerd/snapshots"
|
||||
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
|
||||
"github.com/containerd/containerd/pkg/cri/annotations"
|
||||
@@ -37,7 +36,7 @@ func (c *criService) containerMounts(sandboxID string, config *runtime.Container
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *criService) containerSpec(
|
||||
func (c *criService) platformSpec(
|
||||
id string,
|
||||
sandboxID string,
|
||||
sandboxPid uint32,
|
||||
@@ -49,7 +48,7 @@ func (c *criService) containerSpec(
|
||||
imageConfig *imagespec.ImageConfig,
|
||||
extraMounts []*runtime.Mount,
|
||||
ociRuntime config.Runtime,
|
||||
) (*runtimespec.Spec, error) {
|
||||
) ([]oci.SpecOpts, error) {
|
||||
specOpts := []oci.SpecOpts{
|
||||
customopts.WithProcessArgs(config, imageConfig),
|
||||
}
|
||||
@@ -136,7 +135,8 @@ func (c *criService) containerSpec(
|
||||
customopts.WithAnnotation(annotations.ImageName, imageName),
|
||||
customopts.WithAnnotation(annotations.WindowsHostProcess, strconv.FormatBool(sandboxHpc)),
|
||||
)
|
||||
return c.runtimeSpec(id, ociRuntime.BaseRuntimeSpec, specOpts...)
|
||||
|
||||
return specOpts, nil
|
||||
}
|
||||
|
||||
// No extra spec options needed for windows.
|
||||
|
||||
Reference in New Issue
Block a user