-
Notifications
You must be signed in to change notification settings - Fork 3
/
config-template.yaml
102 lines (94 loc) · 2.95 KB
/
config-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
proxy:
secretToken: "{{ secret_token }}"
https:
enabled: false
singleuser:
image:
name: aiidalab/aiidalab-docker-stack
#tag: latest
tag: 21.02.1
pullPolicy: Always
fsGid: 1000
cmd: /sbin/my_my_init
extraEnv:
NB_USER: "aiida"
NB_UID: "1000"
NB_GID: "1000"
storage:
homeMountPath: "/home/aiida"
dynamic:
storageClass: aws-efs
memory:
limit: 9G
guarantee: 3G
cpu:
limit: 2.0
guarantee: .5
startTimeout: 180
auth:
type: custom
custom:
className: firstuseauthenticator.FirstUseAuthenticator
config:
create_users: true
## OIDC example
# type: custom
# custom:
# className: oauthenticator.generic.GenericOAuthenticator
# config:
# client_id: "{{ oauth_client_id }}"
# client_secret: "{{ oauth_client_secret }}"
# username_key: "email"
# token_url: "{{ oauth_host }}/token"
# userdata_url: "{{ oauth_host }}/userinfo"
# scope: ["openid", "profile", "email", "eduperson_scoped_affiliation", "eduperson_entitlement"]
hub:
# extraEnv:
# OAUTH2_AUTHORIZE_URL: "{{ oauth_host }}/authorize"
# OAUTH2_TOKEN_URL: "{{ oauth_host }}/token"
# OAUTH_CALLBACK_URL: "{{ jh_host }}/hub/oauth_callback"
db:
pvc:
storageClassName: gp2
extraConfig:
myConfig: |
c.KubeSpawner.http_timeout = 300
# phusion init system needs to run as root
c.KubeSpawner.uid = 0
# Setting the gid was needed to fix
# https://github.com/aiidalab/aiidalab-docker-stack/issues/20
c.KubeSpawner.gid = 1000
# insert template path for custom login template
c.JupyterHub.template_paths.insert(0, "/etc/jupyterhub/templates")
# # overwrite logout handler to also log out of main Materials Cloud site
# # https://github.com/jupyterhub/jupyterhub/blob/master/jupyterhub/handlers/login.py#L14
# import urllib.parse
# def logout_handler(self):
# user = self.get_current_user()
# if user:
# self.log.info("User logged out: %s", user.name)
# self.clear_login_cookie()
# self.statsd.incr('logout')
# next = urllib.parse.quote("{{ jh_host }}")
# url = "{{ oauth_host }}/logout?next="+next
# self.redirect(url, permanent=False)
#
# from jupyterhub.handlers.login import LogoutHandler
# LogoutHandler.get = logout_handler
extraVolumes:
## Make the hub pod be able to access a ConfigMap volume
- name: hub-templates
configMap:
name: hub-templates
extraVolumeMounts:
## Make the hub pod hub container mount that ConfigMap volume
- mountPath: /etc/jupyterhub/templates
name: hub-templates
# removing inactive pods (=no response from the user's browser).
cull:
enabled: true
# timeout = 24h
timeout: 86400
# check every hour
every: 3600