Merge pull request #7073 from ruiwen-zhao/event

Add container event support to containerd
This commit is contained in:
Fu Wei
2022-12-09 15:24:23 +08:00
committed by GitHub
23 changed files with 392 additions and 23 deletions

View File

@@ -104,6 +104,9 @@ func (c *criService) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodS
// Release the sandbox name reserved for the sandbox.
c.sandboxNameIndex.ReleaseByKey(id)
// Send CONTAINER_DELETED event with ContainerId equal to SandboxId.
c.generateAndSendContainerEvent(ctx, id, id, runtime.ContainerEventType_CONTAINER_DELETED_EVENT)
sandboxRemoveTimer.WithValues(sandbox.RuntimeHandler).UpdateSince(start)
return &runtime.RemovePodSandboxResponse{}, nil