Skip to content

Commit

Permalink
improve: don't unser limits in low-resource-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
perangel committed Sep 16, 2024
1 parent 1106fb9 commit a994580
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions internal/cmd/local/local/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,39 +182,27 @@ func (c *Command) Install(ctx context.Context, opts InstallOpts) error {
airbyteValues := []string{
"global.env_vars.AIRBYTE_INSTALLATION_ID=" + telUser,
"global.auth.enabled=true",
"global.jobs.resources.limits.cpu=3",
"global.jobs.resources.limits.memory=4Gi",
}

if opts.LowResourceMode {
airbyteValues = append(airbyteValues,
"server.env_vars.JOB_RESOURCE_VARIANT_OVERRIDE=lowresource",
"global.jobs.resources.limits.cpu=0",
"global.jobs.resources.requests.cpu=0",
"global.jobs.resources.limits.memory=0",
"global.jobs.resources.requests.memory=0",

"workload-launcher.env_vars.CHECK_JOB_MAIN_CONTAINER_CPU_LIMIT=0",
"workload-launcher.env_vars.CHECK_JOB_MAIN_CONTAINER_CPU_REQUEST=0",
"workload-launcher.env_vars.CHECK_JOB_MAIN_CONTAINER_MEMORY_LIMIT=0",
"workload-launcher.env_vars.CHECK_JOB_MAIN_CONTAINER_MEMORY_REQUEST=0",
"workload-launcher.env_vars.DISCOVER_JOB_MAIN_CONTAINER_CPU_LIMIT=0",
"workload-launcher.env_vars.DISCOVER_JOB_MAIN_CONTAINER_CPU_REQUEST=0",
"workload-launcher.env_vars.DISCOVER_JOB_MAIN_CONTAINER_MEMORY_LIMIT=0",
"workload-launcher.env_vars.DISCOVER_JOB_MAIN_CONTAINER_MEMORY_REQUEST=0",
"workload-launcher.env_vars.SPEC_JOB_MAIN_CONTAINER_CPU_LIMIT=0",
"workload-launcher.env_vars.SPEC_JOB_MAIN_CONTAINER_CPU_REQUEST=0",
"workload-launcher.env_vars.SPEC_JOB_MAIN_CONTAINER_MEMORY_LIMIT=0",
"workload-launcher.env_vars.SPEC_JOB_MAIN_CONTAINER_MEMORY_REQUEST=0",
"workload-launcher.env_vars.SIDECAR_MAIN_CONTAINER_CPU_LIMIT=0",
"workload-launcher.env_vars.SIDECAR_MAIN_CONTAINER_CPU_REQUEST=0",
"workload-launcher.env_vars.SIDECAR_MAIN_CONTAINER_MEMORY_LIMIT=0",
"workload-launcher.env_vars.SIDECAR_MAIN_CONTAINER_MEMORY_REQUEST=0",
)
} else {
airbyteValues = append(airbyteValues,
"global.jobs.resources.limits.cpu=3",
"global.jobs.resources.limits.memory=4Gi",
)
}

if opts.InsecureCookies {
airbyteValues = append(airbyteValues,
"global.auth.cookieSecureSetting=false")
Expand Down

0 comments on commit a994580

Please sign in to comment.