Skip to content

Commit

Permalink
Merge pull request #424 from Vincent056/host_mount
Browse files Browse the repository at this point in the history
OCPBUGS-14947: Fix hostmount propagation
  • Loading branch information
openshift-merge-robot committed Aug 14, 2023
2 parents c573bee + 58aa51b commit 97981b4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkg/controller/fileintegrity/fileintegrity_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ func reinitAideDaemonset(reinitDaemonSetName string, fi *v1alpha1.FileIntegrity,
priv := true
runAs := int64(0)
mode := int32(0744)
hostToContainer := corev1.MountPropagationHostToContainer

return &appsv1.DaemonSet{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -741,8 +742,9 @@ func reinitAideDaemonset(reinitDaemonSetName string, fi *v1alpha1.FileIntegrity,
Command: []string{common.AideScriptPath},
VolumeMounts: []corev1.VolumeMount{
{
Name: "hostroot",
MountPath: "/hostroot",
Name: "hostroot",
MountPath: "/hostroot",
MountPropagation: &hostToContainer,
},
{
Name: common.AideReinitScriptConfigMapName,
Expand Down Expand Up @@ -826,6 +828,8 @@ func reinitAideDaemonset(reinitDaemonSetName string, fi *v1alpha1.FileIntegrity,
func aideDaemonset(dsName string, fi *v1alpha1.FileIntegrity, operatorImage string) *appsv1.DaemonSet {
priv := true
runAs := int64(0)
hostToContainer := corev1.MountPropagationHostToContainer

return &appsv1.DaemonSet{
ObjectMeta: metav1.ObjectMeta{
Name: dsName,
Expand Down Expand Up @@ -878,8 +882,9 @@ func aideDaemonset(dsName string, fi *v1alpha1.FileIntegrity, operatorImage stri
},
VolumeMounts: []corev1.VolumeMount{
{
Name: "hostroot",
MountPath: "/hostroot",
Name: "hostroot",
MountPath: "/hostroot",
MountPropagation: &hostToContainer,
},
{
Name: "config",
Expand Down

0 comments on commit 97981b4

Please sign in to comment.