@@ -30,6 +30,7 @@ const (
3030 csiAddonsEndpoint = "unix://" + SocketDir + "/csi-addons.sock"
3131
3232 kmsConfigVolumeName = "ceph-csi-kms-config"
33+ csiMountInfoVolumeName = "ceph-csi-mountinfo"
3334 registrationVolumeName = "registration-dir"
3435 pluginDirVolumeName = "plugin-dir"
3536 podsMountDirVolumeName = "pods-mount-dir"
@@ -126,6 +127,17 @@ var EtcSelinuxVolume = corev1.Volume{
126127 },
127128}
128129
130+ func CsiMountInfoVolume (kubeletDirPath string , driverName string ) corev1.Volume {
131+ return corev1.Volume {
132+ Name : csiMountInfoVolumeName ,
133+ VolumeSource : corev1.VolumeSource {
134+ HostPath : & corev1.HostPathVolumeSource {
135+ Path : fmt .Sprintf ("%s/plugins/%s/mountinfo" , kubeletDirPath , driverName ),
136+ Type : ptr .To (corev1 .HostPathDirectoryOrCreate ),
137+ },
138+ },
139+ }
140+ }
129141func KmsConfigVolume (configRef * corev1.LocalObjectReference ) corev1.Volume {
130142 return corev1.Volume {
131143 Name : kmsConfigVolumeName ,
@@ -245,6 +257,10 @@ var CsiConfigVolumeMount = corev1.VolumeMount{
245257 Name : CsiConfigVolume .Name ,
246258 MountPath : "/etc/ceph-csi-config" ,
247259}
260+ var CsiMountInfoVolumeMount = corev1.VolumeMount {
261+ Name : csiMountInfoVolumeName ,
262+ MountPath : "/csi/mountinfo" ,
263+ }
248264var KmsConfigVolumeMount = corev1.VolumeMount {
249265 Name : kmsConfigVolumeName ,
250266 MountPath : "/etc/ceph-csi-encryption-kms-config/" ,
0 commit comments