use of org.apache.flink.kubernetes.utils.Constants.FLINK_CONF_VOLUME in project flink by apache.
the class FlinkConfMountDecorator method decoratePod.
private Pod decoratePod(Pod pod) {
final List<KeyToPath> keyToPaths = getLocalLogConfFiles().stream().map(file -> new KeyToPathBuilder().withKey(file.getName()).withPath(file.getName()).build()).collect(Collectors.toList());
keyToPaths.add(new KeyToPathBuilder().withKey(FLINK_CONF_FILENAME).withPath(FLINK_CONF_FILENAME).build());
final Volume flinkConfVolume = new VolumeBuilder().withName(FLINK_CONF_VOLUME).withNewConfigMap().withName(getFlinkConfConfigMapName(kubernetesComponentConf.getClusterId())).withItems(keyToPaths).endConfigMap().build();
return new PodBuilder(pod).editSpec().addNewVolumeLike(flinkConfVolume).endVolume().endSpec().build();
}
Aggregations