diff --git a/airbyte-workers/src/main/java/io/airbyte/workers/process/KubePodProcess.java b/airbyte-workers/src/main/java/io/airbyte/workers/process/KubePodProcess.java index 71a058c9cec70..6ef62c0b126d0 100644 --- a/airbyte-workers/src/main/java/io/airbyte/workers/process/KubePodProcess.java +++ b/airbyte-workers/src/main/java/io/airbyte/workers/process/KubePodProcess.java @@ -115,6 +115,7 @@ public class KubePodProcess extends Process implements KubePod { private static final String STDOUT_PIPE_FILE = PIPES_DIR + "/stdout"; private static final String STDERR_PIPE_FILE = PIPES_DIR + "/stderr"; public static final String CONFIG_DIR = "/config"; + public static final String TMP_DIR = "/tmp"; private static final String TERMINATION_DIR = "/termination"; private static final String TERMINATION_FILE_MAIN = TERMINATION_DIR + "/main"; private static final String TERMINATION_FILE_CHECK = TERMINATION_DIR + "/check"; @@ -422,13 +423,24 @@ public KubePodProcess(final boolean isOrchestrator, .withMountPath(TERMINATION_DIR) .build(); + final Volume tmpVolume = new VolumeBuilder() + .withName("tmp") + .withNewEmptyDir() + .endEmptyDir() + .build(); + + final VolumeMount tmpVolumeMount = new VolumeMountBuilder() + .withName("tmp") + .withMountPath(TMP_DIR) + .build(); + final Container init = getInit(usesStdin, List.of(pipeVolumeMount, configVolumeMount), busyboxImage); final Container main = getMain( image, imagePullPolicy, usesStdin, entrypointOverride, - List.of(pipeVolumeMount, configVolumeMount, terminationVolumeMount), + List.of(pipeVolumeMount, configVolumeMount, terminationVolumeMount, tmpVolumeMount), resourceRequirements, internalToExternalPorts, envMap, @@ -496,7 +508,7 @@ public KubePodProcess(final boolean isOrchestrator, .withRestartPolicy("Never") .withInitContainers(init) .withContainers(containers) - .withVolumes(pipeVolume, configVolume, terminationVolume) + .withVolumes(pipeVolume, configVolume, terminationVolume, tmpVolume) .endSpec() .build();