controller: instance manager: Add mount propagation explicitly to the pod
Longhorn
@@ -47,6 +47,10 @@ const (
PollInterval = 500 * time.Millisecond
)
+var (
+ hostToContainer = v1.MountPropagationHostToContainer
+)
+
type InstanceManagerController struct {
namespace string
controllerID string
@@ -586,6 +590,7 @@ func (imc *InstanceManagerController) createEngineManagerPodSpec(im *longhorn.In
{
MountPath: types.EngineBinaryDirectoryInContainer,
Name: "engine-binaries",
+ MountPropagation: &hostToContainer,
},
}
podSpec.Spec.Volumes = []v1.Volume{
@@ -634,6 +639,7 @@ func (imc *InstanceManagerController) createReplicaManagerPodSpec(im *longhorn.I
{
MountPath: "/host",
Name: "host",
+ MountPropagation: &hostToContainer,
},
}
podSpec.Spec.Volumes = []v1.Volume{
