|
10 | 10 |
|
11 | 11 | from bridge.lib.magic_numbers import DEFAULT_POSTGRES_PORT |
12 | 12 | from bridge.lib.versions import JUPYTERHUB_CHART_VERSION |
| 13 | +from ol_infrastructure.applications.jupyterhub.values import ( |
| 14 | + get_prepuller_config_with_images, |
| 15 | +) |
13 | 16 | from ol_infrastructure.components.aws.database import OLAmazonDB, OLPostgresDBConfig |
14 | 17 | from ol_infrastructure.components.services.cert_manager import ( |
15 | 18 | OLCertManagerCert, |
@@ -50,7 +53,6 @@ def provision_jupyterhub_deployment( # noqa: PLR0913 |
50 | 53 | disabled_extensions_json: str | None = None, |
51 | 54 | extra_config: str | None = None, |
52 | 55 | ) -> kubernetes.helm.v3.Release: |
53 | | - |
54 | 56 | base_name = jupyterhub_deployment_config["name"] |
55 | 57 | domain_name = jupyterhub_deployment_config["domain"] |
56 | 58 | namespace = jupyterhub_deployment_config["namespace"] |
@@ -221,6 +223,7 @@ def provision_jupyterhub_deployment( # noqa: PLR0913 |
221 | 223 | extra_images_list = extra_images or {} |
222 | 224 | admin_users_list = jupyterhub_deployment_config.get("admin_users", []) |
223 | 225 | allowed_users_list = jupyterhub_deployment_config.get("allowed_users", []) |
| 226 | + enable_prepuller = jupyterhub_deployment_config.get("enable_prepuller", True) |
224 | 227 | return kubernetes.helm.v3.Release( |
225 | 228 | f"{base_name}-{env_name.upper()}-application-helm-release", |
226 | 229 | kubernetes.helm.v3.ReleaseArgs( |
@@ -330,25 +333,10 @@ def provision_jupyterhub_deployment( # noqa: PLR0913 |
330 | 333 | }, |
331 | 334 | }, |
332 | 335 | }, |
333 | | - "prePuller": { |
334 | | - "continuous": { |
335 | | - "enabled": True, |
336 | | - }, |
337 | | - "hook": { |
338 | | - "enabled": False, |
339 | | - }, |
340 | | - "extraImages": extra_images_list, |
341 | | - "resources": { |
342 | | - "requests": { |
343 | | - "cpu": "10m", |
344 | | - "memory": "128Mi", |
345 | | - }, |
346 | | - "limits": { |
347 | | - "cpu": "100m", |
348 | | - "memory": "512Mi", |
349 | | - }, |
350 | | - }, |
351 | | - }, |
| 336 | + # Consider keying off extra_images, it's only used for this |
| 337 | + "prePuller": get_prepuller_config_with_images(extra_images_list) |
| 338 | + if enable_prepuller |
| 339 | + else {}, |
352 | 340 | "singleuser": { |
353 | 341 | "extraFiles": { |
354 | 342 | "menu_override": { |
|
0 commit comments