Skip to content

Commit 0c6109b

Browse files
authored
Merge pull request #1330 from consideRatio/pr/update-chart.yaml
Bump Chart.yaml apiVersion (embeds requirements.yaml content into Chart.yaml)
2 parents 195837f + e777436 commit 0c6109b

File tree

5 files changed

+33
-18
lines changed

5 files changed

+33
-18
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ These are tasks that BinderHub maintainers perform.
365365

366366
The BinderHub Helm chart depends on the [JupyterHub Helm
367367
chart](https://jupyterhub.github.io/helm-chart/), and its version is pinned
368-
within `helm-chart/binderhub/requirements.yaml`. It is straightforward to update
368+
within `helm-chart/binderhub/Chart.yaml`. It is straightforward to update
369369
it with another version from the [JupyterHub Helm chart
370370
repository](https://jupyterhub.github.io/helm-chart/).
371371

doc/debug.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ The BinderHub serving mybinder.org is deployed as a dependency of a local chart
5555
hub:
5656
...
5757

58-
Such kinds of "nested" chart dependencies are managed by a special file called ``requirements.yaml``.
59-
More info on using such a file can be found in the `related Helm docs <https://helm.sh/docs/developing_charts/#managing-dependencies-with-requirements-yaml>`_.
58+
Such kinds of "nested" chart dependencies are managed via the dependencies field in ``Chart.yaml``.
6059

6160
Ok so now that we've ascertained that indentation errors are the most likely cause of undesirable behaviour, how can we prevent them?
6261

helm-chart/binderhub/Chart.yaml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1-
apiVersion: v1
2-
description: A helm chart to install Binder
1+
# Chart.yaml v2 reference: https://helm.sh/docs/topics/charts/#the-chartyaml-file
2+
apiVersion: v2
33
name: binderhub
4-
version: 0.2.0
4+
version: 0.2.0-set.by.chartpress
5+
dependencies:
6+
# https://github.com/jupyterhub/zero-to-jupyterhub-k8s/tags
7+
- name: jupyterhub
8+
version: "1.0.1"
9+
repository: "https://jupyterhub.github.io/helm-chart"
10+
description: |-
11+
BinderHub is like a JupyterHub that automatically builds environments for the
12+
users based on repo2docker. A BinderHub is by default not configured to
13+
authenticate users or provide storage for them.
14+
keywords: [jupyter, jupyterhub, binderhub]
15+
home: https://binderhub.readthedocs.io/en/latest/
16+
sources: [https://github.com/jupyterhub/binderhub]
17+
icon: https://jupyter.org/assets/hublogo.svg
18+
kubeVersion: ">=1.17.0-0"
19+
maintainers:
20+
# Since it is a requirement of Artifact Hub to have specific maintainers
21+
# listed, we have added some below, but in practice the entire JupyterHub team
22+
# contributes to the maintenance of this Helm chart. Please go ahead and add
23+
# yourself!
24+
- name: Erik Sundell
25+

helm-chart/binderhub/requirements.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

testing/local-binder-k8s-hub/install-jupyterhub-chart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
"""
33
Makes a standalone installation of the JupyterHub Helm chart of the version
4-
specified in the BinderHub Helm chart requirements.yaml file, and use the
4+
specified in the BinderHub Helm chart's Chart.yaml file, and use the
55
configuration for the JupyterHub Helm chart nested in the BinderHub helm chart's
66
configuration.
77
"""
@@ -19,17 +19,17 @@ helm_chart = os.path.join(here, os.pardir, os.pardir, 'helm-chart')
1919
def _get_jupyterhub_dependency_version():
2020
"""
2121
Extract JupyterHub Helm chart version from the BinderHub chart's
22-
requirements.yaml
22+
Chart.yaml file that lists its chart dependencies.
2323
"""
24-
requirements_yaml = os.path.join(helm_chart, 'binderhub', 'requirements.yaml')
24+
chart_yaml = os.path.join(helm_chart, 'binderhub', 'Chart.yaml')
2525

26-
with open(requirements_yaml) as f:
27-
requirements = yaml.safe_load(f)
28-
for dep in requirements['dependencies']:
26+
with open(chart_yaml) as f:
27+
dependecies = yaml.safe_load(f)
28+
for dep in dependecies['dependencies']:
2929
if dep['name'] == 'jupyterhub':
3030
return dep['version']
3131
else:
32-
raise ValueError(f"JupyterHub as a Helm chart dependency not found in {requirements_yaml}:\n{requirements}")
32+
raise ValueError(f"JupyterHub as a Helm chart dependency not found in {chart_yaml}:\n{dependecies}")
3333

3434

3535
with NamedTemporaryFile(mode="w") as tmp:

0 commit comments

Comments
 (0)