diff --git a/.github/workflows/diff.yml b/.github/workflows/diff.yml index 0b1a60c126..c3a86f97ec 100644 --- a/.github/workflows/diff.yml +++ b/.github/workflows/diff.yml @@ -37,11 +37,20 @@ jobs: # NOTE: We change the directory so binderhub the chart name won't be # misunderstood as the local folder name. + # validation is disabled, because the config is for a different version! cd testing + old_config="../testing/k8s-binder-k8s-hub/binderhub-chart-config-old.yaml" + if [ -f "$old_config" ]; then + echo "using old config" + else + old_config="../testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml" + fi + helm install binderhub-test binderhub \ - --values ./k8s-binder-k8s-hub/binderhub-chart-config.yaml \ + --values "$old_config" \ --repo https://jupyterhub.github.io/helm-chart/ \ + --disable-openapi-validation \ --version=$UPGRADE_FROM_VERSION - name: "Helm diff latest released dev chart with local chart" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b606d51007..cf37243e95 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -167,10 +167,19 @@ jobs: # # https://github.com/helm/helm/issues/9244 cd ci + + old_config="../testing/k8s-binder-k8s-hub/binderhub-chart-config-old.yaml" + if [ -f "$old_config" ]; then + echo "using old config" + else + old_config="../testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml" + fi + helm install binderhub-test \ --repo https://jupyterhub.github.io/helm-chart/ binderhub \ + --disable-openapi-validation \ --version=$UPGRADE_FROM_VERSION \ - --values ../testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml \ + --values "$old_config" \ --set config.BinderHub.hub_url=http://localhost:30902 \ --set config.BinderHub.hub_url_local=http://proxy-public \ --set config.GitHubRepoProvider.access_token=$GITHUB_ACCESS_TOKEN \ diff --git a/testing/k8s-binder-k8s-hub/binderhub-chart-config-old.yaml b/testing/k8s-binder-k8s-hub/binderhub-chart-config-old.yaml new file mode 100644 index 0000000000..54c33454ff --- /dev/null +++ b/testing/k8s-binder-k8s-hub/binderhub-chart-config-old.yaml @@ -0,0 +1,63 @@ +# (DELETE ME) +# this file should be removed immediately after merging PR #1472 + +service: + type: NodePort + nodePort: 30901 + +config: + BinderHub: + # Use the internal host name for Pod to Pod communication + # We can't use `hub_url` here because that is set to localhost which + # works on the host but not from within a Pod + hub_url_local: http://proxy-public + use_registry: false + log_level: 10 + cors_allow_origin: "*" + +templates: + page.html: | + {% extends "templates/page.html" %} + {% block footer %} + {{ super() }} + test-template + {% endblock %} + +ingress: + # Enabled to test the creation/update of the k8s Ingress resource, but not + # used actively in our CI system. + enabled: true + +dind: + # Not enabled to test the creation/update of the image-cleaner DaemonSet + # resource because it also requires us to setup a container registry to test + # against which we haven't. We currently only test this via + # lint-and-validate-values.yaml that makes sure our rendered templates are + # valid against a k8s api-server. + enabled: false + +# NOTE: This is a mirror of the jupyterhub section in +# jupyterhub-chart-config.yaml in testing/local-binder-k8s-hub, keep these +# two files synced please. +jupyterhub: + debug: + enabled: true + + hub: + config: + BinderSpawner: + cors_allow_origin: "*" + db: + type: "sqlite-memory" + + proxy: + service: + type: NodePort + nodePorts: + http: 30902 + + singleuser: + storage: + type: none + memory: + guarantee: null diff --git a/testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml b/testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml index 5ebc794e2a..5df1079c72 100644 --- a/testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml +++ b/testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml @@ -1,5 +1,9 @@ # This config is used when both BinderHub and the JupyterHub it uses are # deployed to a kubernetes cluster. +# note: when changing the config schema, +# the old version of this file may need to be copied to ./binderhub-chart-config-old.yaml +# before updating, and then deleted in a subsequent PR. + service: type: NodePort nodePort: 30901