File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1259,7 +1259,15 @@ func (r *driverReconcile) reconcileNodePluginDeamonSet() error {
12591259 utils .PodNamespaceEnvVar ,
12601260 },
12611261 VolumeMounts : utils .Call (func () []corev1.VolumeMount {
1262- mounts := []corev1.VolumeMount {
1262+ mounts := append (
1263+ // Add user defined volume mounts at the start to make sure they do not
1264+ // overwrite built in volumes mounts.
1265+ utils .MapSlice (
1266+ pluginSpec .Volumes ,
1267+ func (v csiv1.VolumeSpec ) corev1.VolumeMount {
1268+ return v .Mount
1269+ },
1270+ ),
12631271 utils .HostDevVolumeMount ,
12641272 utils .HostSysVolumeMount ,
12651273 utils .HostRunMountVolumeMount ,
@@ -1269,7 +1277,7 @@ func (r *driverReconcile) reconcileNodePluginDeamonSet() error {
12691277 utils .CsiConfigVolumeMount ,
12701278 utils .PluginMountDirVolumeMount (kubeletDirPath ),
12711279 utils .PodsMountDirVolumeMount (kubeletDirPath ),
1272- }
1280+ )
12731281 if ptr .Deref (pluginSpec .EnableSeLinuxHostMount , false ) {
12741282 mounts = append (mounts , utils .EtcSelinuxVolumeMount )
12751283 }
You can’t perform that action at this time.
0 commit comments