mirror of
https://github.com/ansible/awx.git
synced 2026-03-24 04:15:02 -02:30
Merge pull request #11559 from kdelee/pending_container_group_jobs_take2
Add resource requests to default podspec
This commit is contained in:
@@ -389,7 +389,7 @@ class AWXReceptorJob:
|
|||||||
self.task.instance.result_traceback = detail
|
self.task.instance.result_traceback = detail
|
||||||
self.task.instance.save(update_fields=['result_traceback'])
|
self.task.instance.save(update_fields=['result_traceback'])
|
||||||
else:
|
else:
|
||||||
logger.warn(f'No result details or output from {self.task.instance.log_format}, status:\n{unit_status}')
|
logger.warn(f'No result details or output from {self.task.instance.log_format}, status:\n{state_name}')
|
||||||
except Exception:
|
except Exception:
|
||||||
raise RuntimeError(detail)
|
raise RuntimeError(detail)
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ def get_default_pod_spec():
|
|||||||
"image": ee.image,
|
"image": ee.image,
|
||||||
"name": 'worker',
|
"name": 'worker',
|
||||||
"args": ['ansible-runner', 'worker', '--private-data-dir=/runner'],
|
"args": ['ansible-runner', 'worker', '--private-data-dir=/runner'],
|
||||||
|
"resources": {"requests": {"cpu": "250m", "memory": "100Mi"}},
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ IS_K8S = False
|
|||||||
AWX_CONTAINER_GROUP_K8S_API_TIMEOUT = 10
|
AWX_CONTAINER_GROUP_K8S_API_TIMEOUT = 10
|
||||||
AWX_CONTAINER_GROUP_DEFAULT_NAMESPACE = os.getenv('MY_POD_NAMESPACE', 'default')
|
AWX_CONTAINER_GROUP_DEFAULT_NAMESPACE = os.getenv('MY_POD_NAMESPACE', 'default')
|
||||||
# Timeout when waiting for pod to enter running state. If the pod is still in pending state , it will be terminated. Valid time units are "s", "m", "h". Example : "5m" , "10s".
|
# Timeout when waiting for pod to enter running state. If the pod is still in pending state , it will be terminated. Valid time units are "s", "m", "h". Example : "5m" , "10s".
|
||||||
AWX_CONTAINER_GROUP_POD_PENDING_TIMEOUT = "5m"
|
AWX_CONTAINER_GROUP_POD_PENDING_TIMEOUT = "2h"
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/dev/topics/i18n/
|
# https://docs.djangoproject.com/en/dev/topics/i18n/
|
||||||
|
|||||||
Reference in New Issue
Block a user