@@ -19,6 +19,7 @@ import io.argoproj.workflow.models.IoArgoprojWorkflowV1alpha1Template
1919import io.argoproj.workflow.models.IoArgoprojWorkflowV1alpha1Workflow
2020import io.argoproj.workflow.models.IoArgoprojWorkflowV1alpha1WorkflowSpec
2121import io.kubernetes.client.custom.Quantity
22+ import io.kubernetes.client.openapi.models.V1ConfigMapVolumeSource
2223import io.kubernetes.client.openapi.models.V1Container
2324import io.kubernetes.client.openapi.models.V1EnvFromSource
2425import io.kubernetes.client.openapi.models.V1EnvVar
@@ -43,6 +44,8 @@ internal const val VOLUME_CLAIM_DATASETS_SUBPATH = "datasetsdir"
4344internal const val VOLUME_CLAIM_PARAMETERS_SUBPATH = " parametersdir"
4445internal const val VOLUME_CLAIM_OUTPUT_SUBPATH = " outputdir"
4546internal const val VOLUME_CLAIM_TEMP_SUBPATH = " tempdir"
47+
48+ private const val VOLUME_COAL_PATH = " /mnt/coal"
4649private const val VOLUME_DATASETS_PATH = " /mnt/scenariorun-data"
4750private const val VOLUME_PARAMETERS_PATH = " /mnt/scenariorun-parameters"
4851private const val VOLUME_OUTPUT_PATH = " /pkg/share/Simulation/Output"
@@ -67,6 +70,13 @@ internal fun buildTemplate(
6770 }
6871 }
6972
73+ val configMapMount =
74+ listOf (
75+ V1VolumeMount ()
76+ .name(" coal-config" )
77+ .mountPath(VOLUME_COAL_PATH )
78+ .subPath(VOLUME_COAL_PATH + " /" + " ${organizationId} -${workspaceId} -coal-config" )
79+ )
7080 val secretVolumeMount =
7181 csmPlatformProperties.argo.workflows.secrets.map { secret ->
7282 V1VolumeMount ().name(secret.name).mountPath(VOLUME_SECRETS_PATH + " /" + secret.name)
@@ -91,7 +101,7 @@ internal fun buildTemplate(
91101 .subPath(VOLUME_CLAIM_TEMP_SUBPATH ),
92102 )
93103
94- val volumeMounts = normalVolumeMount + secretVolumeMount
104+ val volumeMounts = normalVolumeMount + secretVolumeMount + configMapMount
95105
96106 val sizingInfo = runContainer.runSizing ? : BASIC_SIZING .toContainerResourceSizing()
97107
@@ -193,6 +203,15 @@ internal fun buildWorkflowSpec(
193203 .entrypoint(CSM_DAG_ENTRYPOINT )
194204 .templates(templates)
195205 .volumeClaimTemplates(buildVolumeClaims(csmPlatformProperties))
206+ .addVolumesItem(
207+ V1Volume ()
208+ .name(" coal-config" )
209+ .configMap(
210+ V1ConfigMapVolumeSource ()
211+ .name(" ${organizationId} -${workspaceId} -coal-config" )
212+ .optional(true )
213+ )
214+ )
196215
197216 if (csmPlatformProperties.argo.workflows.secrets.isNotEmpty()) {
198217 val argoSecrets = csmPlatformProperties.argo.workflows.secrets
0 commit comments