Merge pull request #1937 from coreos-inc/k8s-resource-limits
Fix kubernetes resource limits
This commit is contained in:
commit
febf3751c0
1 changed files with 8 additions and 4 deletions
|
@ -347,9 +347,11 @@ class KubernetesExecutor(BuilderExecutor):
|
|||
}
|
||||
|
||||
# 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', '4Gi'),
|
||||
'cpu' : self.executor_config.get('CONTAINER_CPU_REQUEST', "2"),
|
||||
'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'
|
||||
|
@ -392,8 +394,10 @@ class KubernetesExecutor(BuilderExecutor):
|
|||
{'name': 'VM_MEMORY', 'value': vm_memory_limit},
|
||||
{'name': 'VM_VOLUME_SIZE', 'value': vm_volume_size},
|
||||
],
|
||||
'limits' : container_limits,
|
||||
'requests' : container_requests,
|
||||
'resources': {
|
||||
'limits': container_limits,
|
||||
'requests': container_requests,
|
||||
},
|
||||
},
|
||||
],
|
||||
'imagePullSecrets': [{'name': 'builder'}],
|
||||
|
|
Reference in a new issue