From df036f9f8eafe3d1355cfe9e52c69a07e8f79b63 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 3 Sep 2019 11:10:01 +0200 Subject: Add `ContainerManager` annotation to created containers This change adds the following annotation to every container created by podman: ```json "Annotations": { "io.containers.manager": "libpod" } ``` Target of this annotaions is to indicate which project in the containers ecosystem is the major manager of a container when applications share the same storage paths. This way projects can decide if they want to manipulate the container or not. For example, since CRI-O and podman are not using the same container library (libpod), CRI-O can skip podman containers and provide the end user more useful information. A corresponding end-to-end test has been adapted as well. Relates to: https://github.com/cri-o/cri-o/pull/2761 Signed-off-by: Sascha Grunert --- pkg/annotations/annotations.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/annotations/annotations.go') diff --git a/pkg/annotations/annotations.go b/pkg/annotations/annotations.go index fe2591a0c..19b1029d1 100644 --- a/pkg/annotations/annotations.go +++ b/pkg/annotations/annotations.go @@ -102,6 +102,10 @@ const ( // CNIResult is the JSON string representation of the Result from CNI CNIResult = "io.kubernetes.cri-o.CNIResult" + + // ContainerManager is the annotation key for indicating the creator and + // manager of the container + ContainerManager = "io.container.manager" ) // ContainerType values @@ -112,3 +116,7 @@ const ( // ContainerTypeContainer represents a container running within a pod ContainerTypeContainer = "container" ) + +// ContainerManagerLibpod indicates that libpod created and manages the +// container +const ContainerManagerLibpod = "libpod" -- cgit v1.2.3-54-g00ecf