@@ -178,6 +178,10 @@ func AddTFDefaultClientConfBeforePatch(
178178 Name : constants .TFLibsVolumeName ,
179179 MountPath : constants .TFLibsVolumeMountPath ,
180180 },
181+ {
182+ Name : constants .TFConfVolumeName ,
183+ MountPath : constants .TFConfVolumeMountPath ,
184+ },
181185 },
182186 Resources : v1.ResourceRequirements {
183187 Requests : injectLibResource ,
@@ -191,6 +195,12 @@ func AddTFDefaultClientConfBeforePatch(
191195 EmptyDir : & v1.EmptyDirVolumeSource {},
192196 },
193197 })
198+ pod .Spec .Volumes = append (pod .Spec .Volumes , v1.Volume {
199+ Name : constants .TFConfVolumeName ,
200+ VolumeSource : v1.VolumeSource {
201+ EmptyDir : & v1.EmptyDirVolumeSource {},
202+ },
203+ })
194204
195205 for _ , injectContainerIndex := range injectContainerIndices {
196206 pod .Spec .Containers [injectContainerIndex ].Env = append (pod .Spec .Containers [injectContainerIndex ].Env , v1.EnvVar {
@@ -205,12 +215,12 @@ func AddTFDefaultClientConfBeforePatch(
205215 pod .Spec .Containers [injectContainerIndex ].VolumeMounts = append (
206216 pod .Spec .Containers [injectContainerIndex ].VolumeMounts ,
207217 v1.VolumeMount {
208- Name : constants .TFLibsVolumeName ,
218+ Name : constants .TFConfVolumeName ,
209219 MountPath : constants .LdPreloadFile ,
210220 SubPath : constants .LdPreloadFileName ,
211221 ReadOnly : true ,
212222 }, v1.VolumeMount {
213- Name : constants .TFLibsVolumeName ,
223+ Name : constants .TFConfVolumeName ,
214224 MountPath : constants .LdLibraryPathFile ,
215225 SubPath : constants .LdLibraryPathFileName ,
216226 ReadOnly : true ,
0 commit comments