Commit 3c5e5c5 1 parent c50b98d commit 3c5e5c5 Copy full SHA for 3c5e5c5
File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ package core
19
19
import (
20
20
"context"
21
21
"fmt"
22
+
23
+ dockermounttypes "github.com/docker/docker/api/types/mount"
24
+
22
25
"github.com/Mirantis/cri-dockerd/libdocker"
23
26
"github.com/sirupsen/logrus"
24
27
v1 "k8s.io/cri-api/pkg/apis/runtime/v1"
@@ -61,11 +64,21 @@ func (ds *dockerService) ContainerStatus(
61
64
for i := range r .Mounts {
62
65
m := r .Mounts [i ]
63
66
readonly := ! m .RW
67
+ var propagation v1.MountPropagation
68
+ switch m .Propagation {
69
+ case dockermounttypes .PropagationPrivate :
70
+ propagation = v1 .MountPropagation_PROPAGATION_PRIVATE
71
+ case dockermounttypes .PropagationRShared :
72
+ propagation = v1 .MountPropagation_PROPAGATION_BIDIRECTIONAL
73
+ case dockermounttypes .PropagationRSlave :
74
+ propagation = v1 .MountPropagation_PROPAGATION_HOST_TO_CONTAINER
75
+ }
64
76
mounts = append (mounts , & v1.Mount {
65
77
HostPath : m .Source ,
66
78
ContainerPath : m .Destination ,
67
79
Readonly : readonly ,
68
80
// Note: Can't set SeLinuxRelabel
81
+ Propagation : propagation ,
69
82
})
70
83
}
71
84
// Interpret container states.
You can’t perform that action at this time.
0 commit comments