import os
c.Application.log_level = 'DEBUG'

c.JupyterHub.authenticator_class = 'oauthenticator.mediawiki.MWOAuthenticator'
c.JupyterHub.hub_ip = '127.0.0.1'
c.JupyterHub.ip = '0.0.0.0'
c.JupyterHub.db_url = os.environ['JPY_DB_URL']
c.JupyterHub.db_kwargs = {
    'pool_recycle': 60  # Do not keep connections for more than one minute
}

c.MWOAuthenticator.client_id = '0a73e346a40b07262b6e36bdba01cba4'
c.MWOAuthenticator.client_secret = '99b284730a79dd30e2c35988be42708ef7e57122'
c.MWOAuthenticator.pass_secrets = True

c.JupyterHub.spawner_class = 'kubespawner.KubeSpawner'
c.KubeSpawner.kube_namespace = 'paws'
c.KubeSpawner.kube_api_endpoint = 'https://%s' % os.environ['KUBERNETES_PORT_443_TCP_ADDR']
c.KubeSpawner.hub_ip_connect = '%s:8000' % os.environ['PAWS_PORT_8000_TCP_ADDR']
c.KubeSpawner.kube_ca_path = False
c.KubeSpawner.kube_token = os.environ['INSECURE_KUBE_TOKEN']
c.KubeSpawner.singleuser_image_spec = 'yuvipanda/pawsuser:latest'
c.KubeSpawner.volumes = [
    {
        'name': 'home',
        'hostPath': {
            'path': '/data/project/paws/userhomes/{userid}'
        }
    },
    {
        'name': 'dumps',
        'hostPath': {
            'path': '/public/dumps',
        }
    }
]
c.KubeSpawner.volume_mounts = [
    {
        'mountPath': '/home/paws',
        'name': 'home'
    },
    {
        'mountPath': '/public/dumps',
        'name': 'dumps',
        }
]
c.KubeSpawner.start_timeout = 60 * 5  # First pulls can be really slow


c.JupyterHub.base_url = '/paws/'

@@ -3,16 +3,45 @@
 port os%0A
+import hmac%0Aimport hashlib%0A%0A%0A
 c.Applic
@@ -637,16 +637,472 @@
  'paws'%0A
+%0A%0Adef generate_mysql_password(spawner):%0A    h = hmac.new(%0A        os.environ%5B'MYSQL_HMAC_KEY'%5D.encode('utf-8'),%0A        spawner.user.name.encode('utf-8'),%0A        hashlib.sha256%0A    )%0A    return h.hexdigest()%0A%0A%0Adef generate_mysql_username(spawner):%0A    return spawner.user.name%0A%0A%0Ac.KubeSpawner.extra_env = %7B%0A    'MYSQL_HOST': os.environ%5B'MYSQL_SERVICE_HOST'%5D,%0A    'MYSQL_USERNAME': generate_mysql_username,%0A    'MYSQL_PASSWORD': generate_mysql_password%0A%7D%0A%0A
 c.KubeSp

Add access to db for user containers