Skip to content

Commit

Permalink
Merge pull request #797 from kdelee/sky-is-the-limit
Browse files Browse the repository at this point in the history
only set mem/cpu setting if limit is set
  • Loading branch information
shanemcd authored Feb 15, 2022
2 parents 7807bc5 + 479c009 commit c02e059
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roles/installer/templates/config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ data:

# Set memory available based off of resource request/limit for the task pod
memory_limit = '{{ task_resource_requirements["limits"]["memory"] if "limits" in task_resource_requirements and "memory" in task_resource_requirements["limits"] }}'
memory_request = '{{ task_resource_requirements["requests"]["memory"] if "requests" in task_resource_requirements and "memory" in task_resource_requirements["requests"] }}'
SYSTEM_TASK_ABS_MEM = memory_limit if memory_limit else memory_request
if memory_limit:
SYSTEM_TASK_ABS_MEM = memory_limit

# Set cpu available based off of resource request/limit for the task pod
cpu_limit = '{{ task_resource_requirements["limits"]["cpu"] if "limits" in task_resource_requirements and "cpu" in task_resource_requirements["limits"] }}'
cpu_request = '{{ task_resource_requirements["requests"]["cpu"] if "requests" in task_resource_requirements and "cpu" in task_resource_requirements["requests"] }}'
SYSTEM_TASK_ABS_CPU = cpu_limit if cpu_limit else cpu_request
if cpu_limit:
SYSTEM_TASK_ABS_CPU = cpu_limit

SECRET_KEY = get_secret()

Expand Down

0 comments on commit c02e059

Please sign in to comment.