public static VolumeMount[] formatFlumeContainerVolumeMount(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(FLUME_MOUNT_PATH_PREFIX + idxSuffix);
      volumeMounts.add(volumeMount);
      idxSuffix++;
    }
  }
  return volumeMounts.toArray(new VolumeMount[]{});
}

public static VolumeMount [ ] formatFlumeContainerVolumeMount ( 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 ( FLUME_MOUNT_PATH_PREFIX + idxSuffix ) ; volumeMounts . add ( volumeMount ) ; idxSuffix ++ ; } } return volumeMounts . toArray ( new VolumeMount [ ] { } ) ; }
corresponding volumemount so that the flume container can access the log file
