Updated dashboard link setting

This was a casuality of the transition to helm_release. We need to set
this as a multi-line string, which didn't go well with `set`.
This commit is contained in:
Tom Augspurger 2021-09-14 12:38:42 -05:00
Родитель 63a0bfb5cc
Коммит 4c0e4cbef6
3 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -85,6 +85,8 @@ daskhub:
# The daskhub helm chart doesn't correctly handle hub.baseUrl.
# DASK_GATEWAY__PUBLIC_ADDRESS set via terraform
c.KubeSpawner.environment["DASK_GATEWAY__ADDRESS"] = "http://proxy-http:8000/compute/services/dask-gateway/"
02-set-dask-gateway-public-address: |
c.KubeSpawner.environment['DASK_GATEWAY__PUBLIC_ADDRESS'] = 'https://${jupyterhub_host}/compute/services/dask-gateway/'
templates: |
c.JupyterHub.template_paths.insert(0, "/etc/jupyterhub/templates")
pre_spawn_hook: |

Просмотреть файл

@ -18,7 +18,7 @@ resource "helm_release" "dhub" {
create_namespace = true
values = [
"${file("../../helm/values.yaml")}",
"${templatefile("../../helm/values.yaml", { jupyterhub_host = var.jupyterhub_host })}",
"${file("../../helm/jupyterhub_opencensus_monitor.yaml")}",
"${templatefile("../../helm/profiles.yaml", { python_image = var.python_image, r_image = var.r_image, gpu_pytorch_image = var.gpu_pytorch_image, qgis_image = var.qgis_image })}"
]
@ -79,11 +79,6 @@ resource "helm_release" "dhub" {
value = var.environment
}
set {
name = "daskhub.jupyterhub.hub.config.extraConfig.01-set-dask-gateway-public-address"
value = "c.KubeSpawner.environment['DASK_GATEWAY__PUBLIC_ADDRESS'] = 'https://${var.jupyterhub_host}/compute/services/dask-gateway/'"
}
set {
name = "daskhub.jupyterhub.proxy.secretToken"
value = data.azurerm_key_vault_secret.jupyterhub_proxy_secret_token.value

Просмотреть файл

@ -1,6 +1,7 @@
import os
import pytest
import requests
import dask_gateway
@ -15,5 +16,8 @@ class TestCommon:
cluster.scale(1)
client.wait_for_workers(1)
r = requests.get(cluster.dashboard_link)
assert r.status_code == 200
def test_has_pc_sdk_subscription_key(self):
assert "PC_SDK_SUBSCRIPTION_KEY" in os.environ