aboutsummaryrefslogtreecommitdiff
path: root/libpod/events.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2022-08-24 13:27:17 -0400
committerMatthew Heon <matthew.heon@pm.me>2022-09-22 14:18:56 -0400
commit6ee582315bfba8db13541406f6def26ecd8f6aeb (patch)
treebc958f363aa5d40069baf9fb9933d189ba0e7a4a /libpod/events.go
parent08993516a939576fa009db6e7ed32524026a822d (diff)
downloadpodman-6ee582315bfba8db13541406f6def26ecd8f6aeb.tar.gz
podman-6ee582315bfba8db13541406f6def26ecd8f6aeb.tar.bz2
podman-6ee582315bfba8db13541406f6def26ecd8f6aeb.zip
Events for containers in pods now include the pod's ID
This allows tools like Cockpit to know that the pod in question has also been updated, so they can refresh the list of containers in the pod. Fixes #15408 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/events.go')
-rw-r--r--libpod/events.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/events.go b/libpod/events.go
index 2f9799114..31a857a7d 100644
--- a/libpod/events.go
+++ b/libpod/events.go
@@ -34,6 +34,7 @@ func (c *Container) newContainerEvent(status events.Status) {
e.Details = events.Details{
ID: e.ID,
+ PodID: c.PodID(),
Attributes: c.Labels(),
}
@@ -59,6 +60,7 @@ func (c *Container) newContainerExitedEvent(exitCode int32) {
e.Name = c.Name()
e.Image = c.config.RootfsImageName
e.Type = events.Container
+ e.PodID = c.PodID()
e.ContainerExitCode = int(exitCode)
e.Details = events.Details{