summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorNaadir Jeewa <naadir@randomvariable.co.uk>2018-02-01 07:15:13 +0000
committerNaadir Jeewa <naadir@randomvariable.co.uk>2018-02-01 07:15:59 +0000
commit21482ad1a861148ae994e0b12e6ecf82da97f4be (patch)
tree1bfebd70bda0bacbcfac340f60a2f5df52dee20e /cmd/podman
parent7f6a141839212c0d4d50324a726c5477817c8887 (diff)
downloadpodman-21482ad1a861148ae994e0b12e6ecf82da97f4be.tar.gz
podman-21482ad1a861148ae994e0b12e6ecf82da97f4be.tar.bz2
podman-21482ad1a861148ae994e0b12e6ecf82da97f4be.zip
Set default configuration container type annotation to sandbox
This allows podman to provide sufficient hints to start containers with Intel Clear Containers: https://github.com/clearcontainers/runtime/blob/master/docs/architecture/architecture.md#oci-annotations Signed-off-by: Naadir Jeewa <naadir@randomvariable.co.uk>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/spec.go2
-rw-r--r--cmd/podman/spec_test.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/spec.go b/cmd/podman/spec.go
index d18da79ea..341a50796 100644
--- a/cmd/podman/spec.go
+++ b/cmd/podman/spec.go
@@ -439,7 +439,7 @@ func getDefaultAnnotations() map[string]string {
annotations[ann.Annotations] = ""
annotations[ann.ContainerID] = ""
annotations[ann.ContainerName] = ""
- annotations[ann.ContainerType] = ""
+ annotations[ann.ContainerType] = "sandbox"
annotations[ann.Created] = ""
annotations[ann.HostName] = ""
annotations[ann.IP] = ""
diff --git a/cmd/podman/spec_test.go b/cmd/podman/spec_test.go
index 586c09656..768b079aa 100644
--- a/cmd/podman/spec_test.go
+++ b/cmd/podman/spec_test.go
@@ -23,6 +23,12 @@ func TestCreateConfig_GetVolumeMounts(t *testing.T) {
assert.True(t, reflect.DeepEqual(data, specMount[0]))
}
+func TestCreateConfig_GetAnnotations(t *testing.T) {
+ config := createConfig{}
+ annotations := config.GetAnnotations()
+ assert.True(t, reflect.DeepEqual("sandbox", annotations["io.kubernetes.cri-o.ContainerType"]))
+}
+
func TestCreateConfig_GetTmpfsMounts(t *testing.T) {
data := spec.Mount{
Destination: "/homer",