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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airbyte-workers: add default sidecar cpu request and limit #10759

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 @@ -102,8 +102,11 @@ public class KubePodProcess extends Process implements KubePod {
private static final String INIT_CONTAINER_NAME = "init";
private static final String DEFAULT_MEMORY_REQUEST = "25Mi";
private static final String DEFAULT_MEMORY_LIMIT = "50Mi";
private static final String DEFAULT_CPU_REQUEST = "0.1";
private static final String DEFAULT_CPU_LIMIT = "0.2";
private static final ResourceRequirements DEFAULT_SIDECAR_RESOURCES = new ResourceRequirements()
.withMemoryLimit(DEFAULT_MEMORY_LIMIT).withMemoryRequest(DEFAULT_MEMORY_REQUEST);
.withMemoryLimit(DEFAULT_MEMORY_LIMIT).withMemoryRequest(DEFAULT_MEMORY_REQUEST)
.withCpuLimit(DEFAULT_CPU_LIMIT).withCpuRequest(DEFAULT_CPU_REQUEST);

private static final String PIPES_DIR = "/pipes";
private static final String STDIN_PIPE_FILE = PIPES_DIR + "/stdin";
Expand Down Expand Up @@ -176,6 +179,7 @@ private static Container getInit(final boolean usesStdin,
.withImage(busyboxImage)
.withWorkingDir(CONFIG_DIR)
.withCommand("sh", "-c", initCommand)
.withResources(getResourceRequirementsBuilder(DEFAULT_SIDECAR_RESOURCES).build())
.withVolumeMounts(mainVolumeMounts)
.build();
}
Expand Down