From 142a21726fd5213ee9018a4a52d5f06914d0e634 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 15 Mar 2024 12:47:31 +0000 Subject: [PATCH] Fix loki gateway url when deployed on non-dev namespace --- .../modules/kubernetes/services/monitoring/main.tf | 8 ++++++++ .../modules/kubernetes/services/monitoring/values.yaml | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/main.tf b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/main.tf index 413a9e08d..869f616c7 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/main.tf +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/main.tf @@ -181,6 +181,14 @@ resource "helm_release" "prometheus-grafana" { "${var.node-group.key}" = var.node-group.value } + additionalDataSources = [ + { + name = "Loki" + type = "loki" + url = "http://loki-gateway.${var.namespace}" + } + ] + # Avoid using the default password, as that's a security risk adminPassword : random_password.grafana_admin_password.result diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/values.yaml b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/values.yaml index f3cf47c88..ada868882 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/values.yaml +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/values.yaml @@ -1,7 +1 @@ # https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml - -grafana: - additionalDataSources: - - name: Loki - type: loki - url: http://loki-gateway.dev