Skip to content

Commit

Permalink
In case limits do not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
lvarin committed Aug 28, 2024
1 parent 688bd01 commit 2d0c2d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tesk_core/taskmaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def run_executor(executor, namespace, pvc=None):
spec['restartPolicy'] = spec['restart_policy']

for container in spec['containers']:
if container['resources']['limits'] is None and \
container['resources']['requests'] is not None:
if ('limits' not in container['resources'].keys() or \
container['resources']['limits'] is None) and \
container['resources']['requests'] is not None:
container['resources']['limits'] = container['resources']['requests']

if pvc is not None:
Expand Down

0 comments on commit 2d0c2d3

Please sign in to comment.