Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #8240 to 6.3: Clone any cached data from docker and k8s #8245

Merged
merged 1 commit into from
Sep 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ https://github.com/elastic/beats/compare/v6.3.2...6.3[Check the HEAD diff]
*Affecting all Beats*

- Fix a race condition with the `add_host_metadata` and the event serialization. {pull}8223[8223]
- Enforce that data used by k8s or docker doesn't use any reference. {pull}8240[8240]

*Auditbeat*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (d *addDockerMetadata) Run(event *beat.Event) (*beat.Event, error) {
meta.Put("container.id", container.ID)
meta.Put("container.image", container.Image)
meta.Put("container.name", container.Name)
event.Fields["docker"] = meta
event.Fields["docker"] = meta.Clone()
} else {
d.log.Debugf("Container not found: cid=%s", cid)
}
Expand Down
2 changes: 1 addition & 1 deletion libbeat/processors/add_kubernetes_metadata/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (k *kubernetesAnnotator) Run(event *beat.Event) (*beat.Event, error) {
}

event.Fields.DeepUpdate(common.MapStr{
"kubernetes": metadata,
"kubernetes": metadata.Clone(),
})

return event, nil
Expand Down