Skip to content

Commit

Permalink
fix: enforce memory limits for user pods
Browse files Browse the repository at this point in the history
closes #147
  • Loading branch information
rokroskar committed May 10, 2019
1 parent f26ad81 commit 91f503e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jupyterhub/spawners.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ def get_pod_manifest(self):
server_options = options.get('server_options', {})
self.default_url = server_options.get('defaultUrl')
self.cpu_guarantee = float(server_options.get('cpu_request', 0.1))

# Make the user pods be in Guaranteed QoS class if the user
# had specified a memory request. Otherwise use a sensible default.
self.mem_guarantee = server_options.get('mem_request', '500M')
self.mem_limit = server_options.get('mem_request','1G')

gpu = server_options.get('gpu_request', {})
if gpu:
Expand Down

0 comments on commit 91f503e

Please sign in to comment.