Fix k8s builder to use the declared volume size

Fixes #1773
This commit is contained in:
Joseph Schorr 2016-08-29 15:16:28 -04:00
parent e19d386acd
commit cd2d0341a7
2 changed files with 4 additions and 0 deletions

View file

@ -324,6 +324,7 @@ class KubernetesExecutor(BuilderExecutor):
def _job_resource(self, build_uuid, user_data, coreos_channel='stable'):
vm_memory_limit = self.executor_config.get('VM_MEMORY_LIMIT', '8G')
vm_volume_size = self.executor_config.get('VOLUME_SIZE', '32G')
# Max values for this container
container_limits = {
@ -375,6 +376,7 @@ class KubernetesExecutor(BuilderExecutor):
'env': [
{'name': 'USERDATA', 'value': user_data},
{'name': 'VM_MEMORY', 'value': vm_memory_limit},
{'name': 'VM_VOLUME_SIZE', 'value': vm_volume_size},
],
'limits' : container_limits,
'requests' : container_requests,

View file

@ -7,6 +7,8 @@ set -o nounset
mkdir -p /userdata/openstack/latest
echo "$USERDATA" > /userdata/openstack/latest/user_data
qemu-img resize ./coreos_production_qemu_image.img "${VM_VOLUME_SIZE}"
qemu-system-x86_64 \
-enable-kvm \
-cpu host \