Only set memory request on Kubernetes builds

This removes the aboslute limits on Kubernetes builds for now (KVM
will still limit resources) and only sets the memory request as a hint
to the scheduler.
This commit is contained in:
Brad Ison 2016-10-04 20:42:51 -04:00
parent c7c51d37c6
commit 087dca3482

View file

@ -340,18 +340,11 @@ class KubernetesExecutor(BuilderExecutor):
vm_memory_limit = self.executor_config.get('VM_MEMORY_LIMIT', '4G')
vm_volume_size = self.executor_config.get('VOLUME_SIZE', '32G')
# Max values for this container
container_limits = {
'memory' : self.executor_config.get('CONTAINER_MEMORY_LIMIT', '4Gi'),
'cpu' : self.executor_config.get('CONTAINER_CPU_LIMIT', "2"),
}
# Minimum acceptable free resources for this container to "fit" in a quota
# These may be lower than the aboslute limits if the cluster is knowingly
# oversubscribed by some amount.
container_requests = {
'memory' : self.executor_config.get('CONTAINER_MEMORY_REQUEST', '3968Mi'),
'cpu' : self.executor_config.get('CONTAINER_CPU_REQUEST', "1"),
}
release_sha = release.GIT_HEAD or 'none'
@ -395,7 +388,6 @@ class KubernetesExecutor(BuilderExecutor):
{'name': 'VM_VOLUME_SIZE', 'value': vm_volume_size},
],
'resources': {
'limits': container_limits,
'requests': container_requests,
},
},