question: public static VolumeMount [ ] formatOriginalContainerVolumeMount ( LogDraft logDraft ) { List < VolumeMount > volumeMounts = new ArrayList < > ( ) ; int idxSuffix = 1 ; for ( LogItemDraft logItemDraft : logDraft . getLogItemDrafts ( ) ) { if ( logItemDraft . isAutoCollect ( ) || logItemDraft . isAutoDelete ( ) ) { VolumeMount volumeMount = new VolumeMount ( ) ; volumeMount . setName ( "data" + idxSuffix ) ; volumeMount . setMountPath ( LogItemDraft . getLogParentPath ( logItemDraft . getLogPath ( ) ) ) ; volumeMounts . add ( volumeMount ) ; idxSuffix ++ ; } } return volumeMounts . toArray ( new VolumeMount [ ] { } ) ; }
target:  if a container sets log path, then we need to mount the log path so that the flume container can access the log file