{"action":"created","issue":{"url":"https://api.github.com/repos/jupyterhub/kubespawner/issues/137","repository_url":"https://api.github.com/repos/jupyterhub/kubespawner","labels_url":"https://api.github.com/repos/jupyterhub/kubespawner/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/jupyterhub/kubespawner/issues/137/comments","events_url":"https://api.github.com/repos/jupyterhub/kubespawner/issues/137/events","html_url":"https://github.com/jupyterhub/kubespawner/pull/137","id":301457202,"number":137,"title":"Add kube profile spawner","user":{"login":"gsemet","id":133498,"avatar_url":"https://avatars1.githubusercontent.com/u/133498?v=4","gravatar_id":"","url":"https://api.github.com/users/gsemet","html_url":"https://github.com/gsemet","followers_url":"https://api.github.com/users/gsemet/followers","following_url":"https://api.github.com/users/gsemet/following{/other_user}","gists_url":"https://api.github.com/users/gsemet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsemet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsemet/subscriptions","organizations_url":"https://api.github.com/users/gsemet/orgs","repos_url":"https://api.github.com/users/gsemet/repos","events_url":"https://api.github.com/users/gsemet/events{/privacy}","received_events_url":"https://api.github.com/users/gsemet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":40,"created_at":"2018-03-01T15:54:29Z","updated_at":"2018-05-01T02:08:10Z","closed_at":"2018-04-17T20:56:20Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/jupyterhub/kubespawner/pulls/137","html_url":"https://github.com/jupyterhub/kubespawner/pull/137","diff_url":"https://github.com/jupyterhub/kubespawner/pull/137.diff","patch_url":"https://github.com/jupyterhub/kubespawner/pull/137.patch"},"body":"Reference #135 \r\n\r\nAdds `profile_list` parameter to `KubeSpawner` allowing override of one or several parameter (ex: cpu_limit, image_spec, or any other `KubeSpawner` parameter)\r\n\r\nHere an example:\r\n```\r\nc.JupyterHub.spawner_class = 'kubespawner.KubeSpawner'\r\nc.KubeSpawner.namespace = ...\r\nc.KubeSpawner.start_timeout = ...\r\nc.KubeSpawner.singleuser_image_spec = ...\r\nc.KubeSpawner.singleuser_extra_labels = ...\r\nc.KubeSpawner.singleuser_uid = ...\r\n...\r\nc.KubeSpawner.profile_list = [\r\n    {\r\n        'display_name': 'Training Env - Python',\r\n        'kubespawner_override': {\r\n            'singleuser_image_spec': 'training/python:label',\r\n            'cpu_limit': 1,\r\n        }\r\n    },\r\n    {   \r\n        'display_name': 'Training Env - Datascience',\r\n        'kubespawner_override': {\r\n            'singleuser_image_spec': 'training/datascience:label',\r\n            'cpu_limit': 4,\r\n        }\r\n    }, {\r\n        'display_name': 'DataScience - Small instance',\r\n        'kubespawner_override': {\r\n            'singleuser_image_spec': 'datascience/small:label',\r\n            'cpu_limit': 10,\r\n        }\r\n    }, {\r\n        'display_name': 'DataScience - Medium instance',\r\n        'kubespawner_override': {\r\n            'singleuser_image_spec': 'datascience/medium:label',\r\n            'cpu_limit': 48,\r\n        }\r\n    }, {\r\n        'display_name': 'DataScience - Medium instance (GPUx2)',\r\n        'kubespawner_override': {\r\n            'singleuser_image_spec': 'datascience/medium:label',\r\n            'cpu_limit': 48,\r\n            'extra_resource_guarantees': {\"nvidia.com/gpu\": \"2\"},\r\n        }\r\n    }\r\n]\r\n```\r\n\r\nI have not fully tested this version, and if we agree, this class can be merged into `KubeSpawner` ultimately.\r\n\r\nScreenshot:\r\n![profilespawner](https://user-images.githubusercontent.com/133498/36854846-50fe8ce6-1d72-11e8-8ccc-1e2f16d3e22a.png)"},"comment":{"url":"https://api.github.com/repos/jupyterhub/kubespawner/issues/comments/385581841","html_url":"https://github.com/jupyterhub/kubespawner/pull/137#issuecomment-385581841","issue_url":"https://api.github.com/repos/jupyterhub/kubespawner/issues/137","id":385581841,"user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars1.githubusercontent.com/u/1839645?v=4","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"created_at":"2018-05-01T02:08:10Z","updated_at":"2018-05-01T02:08:10Z","author_association":"OWNER","body":"@jgerardsimcock we are working on getting it into the Z2JH helm chart, but it isn't in there yet"}}
{"actor":{"display_login":"choldgraf"}}