Move PLEG event back to CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
@@ -43,10 +43,6 @@ import (
|
||||
type CRIService interface {
|
||||
// TODO: we should implement Event backoff in Controller.
|
||||
BackOffEvent(id string, event interface{})
|
||||
|
||||
// TODO: refactor event generator for PLEG.
|
||||
// GenerateAndSendContainerEvent is called by controller for sandbox container events.
|
||||
GenerateAndSendContainerEvent(ctx context.Context, containerID string, sandboxID string, eventType runtime.ContainerEventType)
|
||||
}
|
||||
|
||||
// ImageService specifies dependencies to CRI image service.
|
||||
|
||||
@@ -20,8 +20,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/log"
|
||||
@@ -59,10 +57,5 @@ func (c *Controller) Shutdown(ctx context.Context, sandboxID string) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Send CONTAINER_DELETED event with ContainerId equal to SandboxId.
|
||||
c.cri.GenerateAndSendContainerEvent(ctx, sandboxID, sandboxID, runtime.ContainerEventType_CONTAINER_DELETED_EVENT)
|
||||
|
||||
c.sandboxStore.Delete(sandboxID)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user