summaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-11 09:34:14 +0200
committerGitHub <noreply@github.com>2019-09-11 09:34:14 +0200
commit9cf852c305a9eadb5eb7471ea171e025bc15d866 (patch)
treec902be561b430c030f42d7ac52bff25b14ee579b /libpod/container_internal_linux.go
parent7ac6ed3b4b27621e7aa15da335e65ffa601fb83e (diff)
parentdf036f9f8eafe3d1355cfe9e52c69a07e8f79b63 (diff)
downloadpodman-9cf852c305a9eadb5eb7471ea171e025bc15d866.tar.gz
podman-9cf852c305a9eadb5eb7471ea171e025bc15d866.tar.bz2
podman-9cf852c305a9eadb5eb7471ea171e025bc15d866.zip
Merge pull request #3927 from openSUSE/manager-annotations
Add `ContainerManager` annotation to created containers
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 21429c09e..9f16389e6 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -21,7 +21,7 @@ import (
"github.com/containernetworking/plugins/pkg/ns"
"github.com/containers/buildah/pkg/secrets"
"github.com/containers/libpod/libpod/define"
- crioAnnotations "github.com/containers/libpod/pkg/annotations"
+ "github.com/containers/libpod/pkg/annotations"
"github.com/containers/libpod/pkg/apparmor"
"github.com/containers/libpod/pkg/cgroups"
"github.com/containers/libpod/pkg/criu"
@@ -349,9 +349,13 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
}
g.SetRootPath(c.state.Mountpoint)
- g.AddAnnotation(crioAnnotations.Created, c.config.CreatedTime.Format(time.RFC3339Nano))
+ g.AddAnnotation(annotations.Created, c.config.CreatedTime.Format(time.RFC3339Nano))
g.AddAnnotation("org.opencontainers.image.stopSignal", fmt.Sprintf("%d", c.config.StopSignal))
+ if _, exists := g.Config.Annotations[annotations.ContainerManager]; !exists {
+ g.AddAnnotation(annotations.ContainerManager, annotations.ContainerManagerLibpod)
+ }
+
for _, i := range c.config.Spec.Linux.Namespaces {
if i.Type == spec.UTSNamespace {
hostname := c.Hostname()