Skip to content

Commit

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

for container in spec['containers']:
if ('limits' not in container['resources'].keys() or \
container['resources']['limits'] is None) and \
container['resources']['requests'] is not None:
if 'limits' not in container['resources'].keys():
container['resources']['limits'] = None
if 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 fb8ef82

Please sign in to comment.