Skip to content

[bug] add_kubernetes_metadata async creation can lead to events missing data #50507

@michel-laterman

Description

@michel-laterman

The async creation that is used by add_kubernetes_metadata:

// complete processor's initialisation asynchronously to re-try on failing k8s client initialisations in case
// the k8s node is not yet ready.
go processor.init(config, cfg)

can lead to instances where some events are processed by the Run method:

func (k *kubernetesAnnotator) Run(event *beat.Event) (*beat.Event, error) {
if !k.kubernetesAvailable {
return event, nil
}

before processor.init finishes so that the internal kubernetesAvailable var is still false.
This results in events that are processed without k8s metadata being attached.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions