Skip to content

[Evented PLEG support] Add multi-subscriber support to GetContainerEvents CRI API #7318

@ruiwen-zhao

Description

@ruiwen-zhao

What is the problem you're trying to solve

This is a follow up action item of supporting Kubernete's Evented PLEG feature [1].

In the current implementation [2], only one GetContainerEvents caller is supported. If there are multiple callers, then each caller can only get some events, because they all read from the same channel.

In most, if not all, cases, kubelet is the only one that calls GetContainerEvents, but this is not guaranteed or ensured by CRI API. Ideally we still need to support multi-subscriber.

[1] kubernetes/enhancements#3386

[2] #7073

Describe the solution you'd like

Support multi-subscriber by keeping a record of current subscribers and broadcast each event to all of them.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions