mirror of
https://github.com/containerd/containerd.git
synced 2026-08-12 22:16:27 +00:00
Revert "not set sandbox id when use podsandbox type"
This reverts commit 4b4e6f7c69.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -32,7 +32,6 @@ import (
|
||||
cio "github.com/containerd/containerd/v2/internal/cri/io"
|
||||
crilabels "github.com/containerd/containerd/v2/internal/cri/labels"
|
||||
customopts "github.com/containerd/containerd/v2/internal/cri/opts"
|
||||
podsandboxtypes "github.com/containerd/containerd/v2/internal/cri/server/podsandbox/types"
|
||||
containerstore "github.com/containerd/containerd/v2/internal/cri/store/container"
|
||||
"github.com/containerd/containerd/v2/internal/cri/store/sandbox"
|
||||
"github.com/containerd/containerd/v2/internal/cri/util"
|
||||
@@ -410,9 +409,7 @@ func (c *criService) createContainer(r *createContainerRequest) (_ string, retEr
|
||||
containerd.WithContainerExtension(crilabels.ContainerMetadataExtension, r.meta),
|
||||
)
|
||||
|
||||
if r.sandbox.Sandboxer != podsandboxtypes.InternalSandboxID {
|
||||
opts = append(opts, containerd.WithSandbox(r.sandboxID))
|
||||
}
|
||||
opts = append(opts, containerd.WithSandbox(r.sandboxID))
|
||||
|
||||
opts = append(opts, c.nri.WithContainerAdjustment())
|
||||
defer func() {
|
||||
|
||||
@@ -47,7 +47,7 @@ import (
|
||||
func init() {
|
||||
registry.Register(&plugin.Registration{
|
||||
Type: plugins.PodSandboxPlugin,
|
||||
ID: types.InternalSandboxID,
|
||||
ID: "podsandbox",
|
||||
Requires: []plugin.Type{
|
||||
plugins.EventPlugin,
|
||||
plugins.LeasePlugin,
|
||||
|
||||
@@ -26,10 +26,6 @@ import (
|
||||
sandboxstore "github.com/containerd/containerd/v2/internal/cri/store/sandbox"
|
||||
)
|
||||
|
||||
const (
|
||||
InternalSandboxID = "podsandbox"
|
||||
)
|
||||
|
||||
type PodSandbox struct {
|
||||
ID string
|
||||
Container containerd.Container
|
||||
|
||||
Reference in New Issue
Block a user