Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

airbyte-workers: add /tmp emptyDir volume to connector pods #10761

Merged
merged 1 commit into from
Mar 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,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";
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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();

Expand Down