diff --git a/qhub/stages/checks.py b/qhub/stages/checks.py index 949b5c620..1eaa76f40 100644 --- a/qhub/stages/checks.py +++ b/qhub/stages/checks.py @@ -310,6 +310,6 @@ def _attempt_connect_url( services = stage_outputs[directory]["service_urls"]["value"] for service_name, service in services.items(): service_url = service["health_url"] - if not _attempt_connect_url(service_url): + if service_url and not _attempt_connect_url(service_url): print(f"ERROR: Service {service_name} DOWN when checking url={service_url}") sys.exit(1) diff --git a/qhub/template/stages/07-kubernetes-services/outputs.tf b/qhub/template/stages/07-kubernetes-services/outputs.tf index 757005689..ff84c7af6 100644 --- a/qhub/template/stages/07-kubernetes-services/outputs.tf +++ b/qhub/template/stages/07-kubernetes-services/outputs.tf @@ -13,13 +13,13 @@ output "service_urls" { url = "https://${var.endpoint}/" health_url = "https://${var.endpoint}/hub/api/" } - monitoring = { - url = "https://${var.endpoint}/monitoring/" - health_url = "https://${var.endpoint}/monitoring/api/health" - } keycloak = { url = "https://${var.endpoint}/auth/" health_url = "https://${var.endpoint}/auth/realms/master" } + monitoring = { + url = var.monitoring-enabled ? "https://${var.endpoint}/monitoring/" : null + health_url = var.monitoring-enabled ? "https://${var.endpoint}/monitoring/api/health" : null + } } }