From d951543584013a8f8525541971e867d6bd918415 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 30 May 2021 19:28:37 +0200 Subject: [PATCH 1/9] maint: add misc files to .gitignore --- .gitignore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 3ba0ebf265..a359111d2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ +# Added by 2i2c +Chart.lock +**/charts/*.tgz + +.env-* + + + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] From b3e53bfe6a99af7c99184b921545a0f92fdfea0d Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 30 May 2021 20:08:28 +0200 Subject: [PATCH 2/9] maint: remove requirements.lock and Chart.lock --- hub-templates/basehub/requirements.lock | 6 ------ hub-templates/daskhub/Chart.lock | 9 --------- hub-templates/daskhub/requirements.lock | 6 ------ 3 files changed, 21 deletions(-) delete mode 100644 hub-templates/basehub/requirements.lock delete mode 100644 hub-templates/daskhub/Chart.lock delete mode 100644 hub-templates/daskhub/requirements.lock diff --git a/hub-templates/basehub/requirements.lock b/hub-templates/basehub/requirements.lock deleted file mode 100644 index 0a01bcff09..0000000000 --- a/hub-templates/basehub/requirements.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: jupyterhub - repository: https://jupyterhub.github.io/helm-chart/ - version: 0.9.0-n287.hd5f1f881 -digest: sha256:7b8507dd312d0d2973cc7379f1d12095531e6a97c8d4a6872ec54746236e78e0 -generated: "2020-10-02T15:19:55.004879+05:30" diff --git a/hub-templates/daskhub/Chart.lock b/hub-templates/daskhub/Chart.lock deleted file mode 100644 index 32fa77b0ec..0000000000 --- a/hub-templates/daskhub/Chart.lock +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: basehub - repository: file://../basehub - version: 0.0.1-n569.hb296398 -- name: dask-gateway - repository: https://dask.org/dask-gateway-helm-repo/ - version: 0.9.0 -digest: sha256:ee9b98778c76df42a5525f80fb31f8db53b84232a8a91515577a4d38cd9a1daf -generated: "2021-05-06T12:20:07.326225+05:30" diff --git a/hub-templates/daskhub/requirements.lock b/hub-templates/daskhub/requirements.lock deleted file mode 100644 index 8e3b3ab1a2..0000000000 --- a/hub-templates/daskhub/requirements.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: basehub - repository: file://../basehub - version: v0.0.1 -digest: sha256:6ca4e6932a628f86794cf70bacb9a159a26aee474202336f73841855d9449f15 -generated: "2020-12-04T09:50:53.935463+05:30" From 0ebfc2ec16c877796dc407005d94cc2206a2dbbe Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 30 May 2021 20:11:37 +0200 Subject: [PATCH 3/9] docs: add README.md to the support Helm chart --- support/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 support/README.md diff --git a/support/README.md b/support/README.md new file mode 100644 index 0000000000..bb9554cd92 --- /dev/null +++ b/support/README.md @@ -0,0 +1,11 @@ +## FIXME: Describe this Helm chart + +Describe more about this Helm chart. What are the assumptions made within it for +example, and what are the assumptions on basehub and daskhub with regards to +what is available within the k8s cluster. Do they rely on ingress-nginx and +cert-manager for example? + +### Observations +- This Helm chart contains config specific to 2i2c k8s cluster, as noted by a + domain name configured for grafana. +- This Helm chart contain a template creating a GCP specific k8s StorageClass From d9d79370abe2f2ef046c510e502f1172903b7edd Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 30 May 2021 20:22:03 +0200 Subject: [PATCH 4/9] basehub/daskhub: reference clearly irrelevant chart versions --- hub-templates/basehub/Chart.yaml | 3 +-- hub-templates/daskhub/Chart.yaml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hub-templates/basehub/Chart.yaml b/hub-templates/basehub/Chart.yaml index 3f37cb2659..255f68f49f 100644 --- a/hub-templates/basehub/Chart.yaml +++ b/hub-templates/basehub/Chart.yaml @@ -2,8 +2,7 @@ apiVersion: v2 appVersion: '1.0' description: Deployment Chart for JupyterHub name: basehub -# Let's keep this constant so other charts in this repo can depend on this easily -version: 0.0.1-n769.hfd04ce8 +version: "0.1.0" dependencies: - name: jupyterhub # REMEMBER TO CHANGE BASE IMAGE OF images/hub/ WHEN CHANGING THIS diff --git a/hub-templates/daskhub/Chart.yaml b/hub-templates/daskhub/Chart.yaml index de4b46f32e..fb1cc26a2f 100644 --- a/hub-templates/daskhub/Chart.yaml +++ b/hub-templates/daskhub/Chart.yaml @@ -2,10 +2,9 @@ apiVersion: v2 appVersion: '1.0' description: Deployment Chart for a dask-enabled JupyterHub name: daskhub -version: 0.0.1-n2724.h1dfae31 +version: "0.1.0" dependencies: - name: basehub - version: 0.0.1 repository: file://../basehub - name: dask-gateway version: "0.9.0" From 551bdc92f915a5534c5645dcb0a5e24c07143dae Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 30 May 2021 20:29:42 +0200 Subject: [PATCH 5/9] basehub: relocate singleuser.admin -> custom.singleuserAdmin This is needed to be compatible with z2jh 1.0.0 with schema validation logic that will complain about unrecognized configuration options under singleuser or anything but `custom`. --- hub-templates/basehub/values.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hub-templates/basehub/values.yaml b/hub-templates/basehub/values.yaml index 02d3634ce0..8f089d85b9 100644 --- a/hub-templates/basehub/values.yaml +++ b/hub-templates/basehub/values.yaml @@ -29,6 +29,11 @@ nfsPVC: jupyterhub: custom: + singleuserAdmin: + extraVolumeMounts: + - name: home + mountPath: /home/jovyan/shared-readwrite + subPath: _shared cloudResources: provider: null gcp: @@ -95,11 +100,6 @@ jupyterhub: letsencrypt: contactEmail: yuvipanda@gmail.com singleuser: - admin: - extraVolumeMounts: - - name: home - mountPath: /home/jovyan/shared-readwrite - subPath: _shared startTimeout: 600 # 10 mins, because sometimes we have too many new nodes coming up together defaultUrl: /tree nodeSelector: @@ -256,7 +256,7 @@ jupyterhub: class CustomSpawner(ConfiguratorSpawnerMixin, KubeSpawner): def start(self, *args, **kwargs): - custom_admin = get_config('singleuser.admin', {}) + custom_admin = get_config('custom.singleuserAdmin', {}) if custom_admin and self.user.admin: extra_init_containers = custom_admin.get('initContainers', []) extra_volume_mounts = custom_admin.get('extraVolumeMounts', []) From f8d049859492d26d0cd3fb1b2b7c86b3086b96bb Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 30 May 2021 21:03:24 +0200 Subject: [PATCH 6/9] basehub: update to 1.0.0-beta.1 --- hub-templates/basehub/Chart.yaml | 4 ++-- hub-templates/daskhub/values.yaml | 1 - hub-templates/images/hub/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hub-templates/basehub/Chart.yaml b/hub-templates/basehub/Chart.yaml index 255f68f49f..b8d713d8b5 100644 --- a/hub-templates/basehub/Chart.yaml +++ b/hub-templates/basehub/Chart.yaml @@ -5,6 +5,6 @@ name: basehub version: "0.1.0" dependencies: - name: jupyterhub - # REMEMBER TO CHANGE BASE IMAGE OF images/hub/ WHEN CHANGING THIS - version: 0.11.1-n277.h61b0e003 + # REMEMBER TO CHANGE BASE IMAGE OF images/hub/ WHEN CHANGING THIS + version: 1.0.0-beta.1 repository: https://jupyterhub.github.io/helm-chart/ diff --git a/hub-templates/daskhub/values.yaml b/hub-templates/daskhub/values.yaml index c296affa22..9870d479f4 100644 --- a/hub-templates/daskhub/values.yaml +++ b/hub-templates/daskhub/values.yaml @@ -41,7 +41,6 @@ basehub: - port: 22 protocol: TCP cloudMetadata: - enabled: true # Don't block access to AWS cloud metadata # If we don't, our users can't access S3 buckets / other AWS services # without an explicit identity diff --git a/hub-templates/images/hub/Dockerfile b/hub-templates/images/hub/Dockerfile index 71a5a5f6e9..dece568d2a 100644 --- a/hub-templates/images/hub/Dockerfile +++ b/hub-templates/images/hub/Dockerfile @@ -1,6 +1,6 @@ # Should match the hub image used by version of chart in hub/requirements.yaml # If that changes, this should be changed too! -FROM jupyterhub/k8s-hub:0.11.1-n298.hd9d7403b +FROM jupyterhub/k8s-hub:1.0.0-beta.1 ENV CONFIGURATOR_VERSION ed7e3a0df1e3d625d10903ef7d7fd9c2fbb548db From eb67f86e3073910ad6dcf091dea952264bd5f375 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 30 May 2021 20:39:09 +0200 Subject: [PATCH 7/9] maint: migrate support chart to v2 api (default in helm3) --- support/Chart.yaml | 34 +++++++++++++++++++++++++++++----- support/requirements.yaml | 13 ------------- 2 files changed, 29 insertions(+), 18 deletions(-) delete mode 100644 support/requirements.yaml diff --git a/support/Chart.yaml b/support/Chart.yaml index f947821ae3..0e8d264acf 100644 --- a/support/Chart.yaml +++ b/support/Chart.yaml @@ -1,6 +1,30 @@ -apiVersion: v1 -appVersion: '1.0' -description: Support chart for entire cluster +apiVersion: v2 name: support -# Let's keep this constant so other charts in this repo can depend on this easily -version: 0.0.1 +version: "0.1.0" +description: Cluster wide depdencies for deployed hubs + +dependencies: + # Prometheus for collection of metrics. + # https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus + - name: prometheus + version: 11.15.0 + repository: https://prometheus-community.github.io/helm-charts + + # Grafana for dashboarding of metrics. + # https://github.com/grafana/helm-charts/tree/main/charts/grafana + - name: grafana + version: 5.6.4 + repository: https://grafana.github.io/helm-charts + + # ingress-nginx for a k8s Ingress resource controller that routes traffic from + # a single IP entrypoint to various services exposed via k8s Ingress resources + # that references this controller. + - name: ingress-nginx + version: 2.15.0 + repository: https://kubernetes.github.io/ingress-nginx + + # cert-manager for acquisition of TLS certificates + # https://github.com/jetstack/cert-manager/tree/master/deploy/charts/cert-manager + - name: cert-manager + version: v1.0.0-beta.1 + repository: https://charts.jetstack.io diff --git a/support/requirements.yaml b/support/requirements.yaml deleted file mode 100644 index 8c12322468..0000000000 --- a/support/requirements.yaml +++ /dev/null @@ -1,13 +0,0 @@ -dependencies: - - name: prometheus - version: 11.15.0 - repository: https://prometheus-community.github.io/helm-charts - - name: grafana - version: 5.6.4 - repository: https://grafana.github.io/helm-charts - - name: cert-manager - version: v1.0.0-beta.1 - repository: https://charts.jetstack.io - - name: ingress-nginx - version: 2.15.0 - repository: https://kubernetes.github.io/ingress-nginx From ef5d6d78dcb5145634400a486854659fed91405c Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 31 May 2021 03:14:11 +0200 Subject: [PATCH 8/9] maint: add chartpress/six to requirements.txt --- requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2aa4d81fea..be83ecb179 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,7 @@ backoff +chartpress +six # temp workaround for docker==5.0.0, used by chartpress, that failed to depend on six ruamel.yaml auth0-python jhub-client==0.1.2 -jsonschema \ No newline at end of file +jsonschema From 3eb9522654c09634cfe8924c4180e0719d12e4fb Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Mon, 31 May 2021 19:25:56 +0530 Subject: [PATCH 9/9] Run chartpress to update hub image --- hub-templates/basehub/values.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hub-templates/basehub/values.yaml b/hub-templates/basehub/values.yaml index 8f089d85b9..950eb1bb09 100644 --- a/hub-templates/basehub/values.yaml +++ b/hub-templates/basehub/values.yaml @@ -35,9 +35,9 @@ jupyterhub: mountPath: /home/jovyan/shared-readwrite subPath: _shared cloudResources: - provider: null + provider: gcp: - projectId: null + projectId: scratchBucket: enabled: false ingress: @@ -72,8 +72,6 @@ jupyterhub: hook: enabled: false proxy: - https: - enabled: false service: type: ClusterIP chp: @@ -161,7 +159,8 @@ jupyterhub: interfaces: - value: "/tree" title: Classic Notebook - description: The original single-document interface for creating Jupyter Notebooks. + description: The original single-document interface for creating + Jupyter Notebooks. - value: "/lab" title: JupyterLab description: A Powerful next generation notebook interface @@ -179,7 +178,7 @@ jupyterhub: - --Configurator.config_file=/usr/local/etc/jupyterhub-configurator/jupyterhub_configurator_config.py image: name: quay.io/2i2c/pilot-hub - tag: '0.0.1-n769.hfd04ce8' + tag: '0.0.1-n781.hf8d0498' config: JupyterHub: authenticator_class: oauthenticator.auth0.Auth0OAuthenticator @@ -311,4 +310,4 @@ jupyterhub: 'PANGEO_SCRATCH': f'{bucket_protocol}://{bucket_name}/$(JUPYTERHUB_USER)', } - c.KubeSpawner.environment.update(env) \ No newline at end of file + c.KubeSpawner.environment.update(env)