@@ -306,20 +306,34 @@ def _valid_badge_base_url(self, proposal):
306306 config = True
307307 )
308308
309+ build_memory_request = ByteSpecification (
310+ 0 ,
311+ help = """
312+ Amount of memory to request when scheduling a build
313+
314+ 0 reserves no memory.
315+
316+ This is used as the request for the pod that is spawned to do the building,
317+ even though the pod itself will not be using that much memory
318+ since the docker building is happening outside the pod.
319+ However, it makes kubernetes aware of the resources being used,
320+ and lets it schedule more intelligently.
321+ """ ,
322+ config = True ,
323+ )
309324 build_memory_limit = ByteSpecification (
310325 0 ,
311326 help = """
312327 Max amount of memory allocated for each image build process.
313328
314329 0 sets no limit.
315330
316- This is used as both the memory limit & request for the pod
317- that is spawned to do the building, even though the pod itself
318- will not be using that much memory since the docker building is
319- happening outside the pod. However, it makes kubernetes aware of
320- the resources being used, and lets it schedule more intelligently.
331+ This is applied to the docker build itself via repo2docker,
332+ though it is also applied to our pod that submits the build,
333+ even though that pod will rarely consume much memory.
334+ Still, it makes it easier to see the resource limits in place via kubernetes.
321335 """ ,
322- config = True
336+ config = True ,
323337 )
324338
325339 debug = Bool (
@@ -598,6 +612,7 @@ def initialize(self, *args, **kwargs):
598612 'extra_footer_scripts' : self .extra_footer_scripts ,
599613 'jinja2_env' : jinja_env ,
600614 'build_memory_limit' : self .build_memory_limit ,
615+ 'build_memory_request' : self .build_memory_request ,
601616 'build_docker_host' : self .build_docker_host ,
602617 'base_url' : self .base_url ,
603618 'badge_base_url' : self .badge_base_url ,
0 commit comments