Run Engine Image Pods as Privileged
This will allow the Engine Image Pods to run successfully on nodes that
have SELinux enabled. longhorn/longhorn#1273
@@ -565,6 +565,7 @@ func (ic *EngineImageController) createEngineImageDaemonSetSpec(ei *longhorn.Eng
"trap 'rm /data/longhorn* && echo cleaned up' EXIT && sleep infinity",
}
maxUnavailable := intstr.FromString(`100%`)
+ privileged := true
d := &appsv1.DaemonSet{
ObjectMeta: metav1.ObjectMeta{
Name: dsName,
@@ -612,6 +613,9 @@ func (ic *EngineImageController) createEngineImageDaemonSetSpec(ei *longhorn.Eng
InitialDelaySeconds: 5,
PeriodSeconds: 5,
},
+ SecurityContext: &v1.SecurityContext{
+ Privileged: &privileged,
+ },
},
},
Volumes: []v1.Volume{
