From 9c58d7a1ca4892766fd83d850fd05ba610e6d655 Mon Sep 17 00:00:00 2001 From: Scott Davidson <49713135+sd109@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:14:14 +0000 Subject: [PATCH] BinderHub chart fixes (#12) * Bump upstream BinderHub chart to latest * Fix missing imports * Switch to podman-in-k8s image builder --------- Co-authored-by: sd109 --- binderhub-azimuth/Chart.yaml | 5 +++-- .../templates/binderhub-registry-config.yml | 11 +++++++++++ binderhub-azimuth/values.yaml | 17 ++++++++++++----- 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 binderhub-azimuth/templates/binderhub-registry-config.yml diff --git a/binderhub-azimuth/Chart.yaml b/binderhub-azimuth/Chart.yaml index 01b4b72d..1bc6323e 100644 --- a/binderhub-azimuth/Chart.yaml +++ b/binderhub-azimuth/Chart.yaml @@ -7,10 +7,11 @@ appVersion: 0.2.0 icon: https://raw.githubusercontent.com/jupyterhub/binderhub/main/binderhub/static/logo.svg keywords: [jupyter, binderhub] +# List of latest BinderHub chart release tags can be found here: +# https://hub.jupyter.org/helm-chart/#development-releases-binderhub dependencies: - name: binderhub - # version: 1.0.0-0.dev.git.3170.h84b1db9 - version: 1.0.0-0.dev.git.3171.h88669a1 + version: 1.0.0-0.dev.git.3350.he7995d6 repository: https://jupyterhub.github.io/helm-chart/ annotations: diff --git a/binderhub-azimuth/templates/binderhub-registry-config.yml b/binderhub-azimuth/templates/binderhub-registry-config.yml new file mode 100644 index 00000000..19effc22 --- /dev/null +++ b/binderhub-azimuth/templates/binderhub-registry-config.yml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + # Note: Name must match .Values.binderhub.binder.extraVolumes entry + name: binderhub-registry-config +data: + 001-binderhub.conf: | + [[registry]] + location = "{{ .Values.registry.serviceName }}:80" + insecure = true diff --git a/binderhub-azimuth/values.yaml b/binderhub-azimuth/values.yaml index 223905cc..ab5f2fd2 100644 --- a/binderhub-azimuth/values.yaml +++ b/binderhub-azimuth/values.yaml @@ -290,12 +290,18 @@ binderhub: extraEnv: JUPYTERHUB_SINGLEUSER_APP: "jupyter_server.serverapp.ServerApp" - imageBuilderType: dind - dind: + imageBuilderType: pink + pink: daemonset: - extraArgs: - - "--insecure-registry" - - "binderhub-registry:80" + extraVolumes: + - name: binderhub-registry-config + configMap: + # NOTE: This should match the name of the config map in templates/binderhub-registry-config.yml + name: binderhub-registry-config + extraVolumeMounts: + - name: binderhub-registry-config + mountPath: /etc/containers/registries.conf.d/001-binderhub.conf + subPath: 001-binderhub.conf # Don't use a Loadbalancer for binderhub since service will sit behind Zenith service: @@ -334,6 +340,7 @@ binderhub: # already exists in the underlying JupyterHub chart but not in the BinderHub chart. The following code snippet is adapted from: # https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/e1e1b49fba13c1e1c0ee454baf5998e8bc2ec725/jupyterhub/files/hub/jupyterhub_config.py#L483C1-L492 read-config-volumes.py: | + import os, glob config_dir = "/etc/binderhub/config/extra_config.d" if os.path.isdir(config_dir): for file_path in sorted(glob.glob(f"{config_dir}/*.py")):