diff --git a/aks/main.tf b/aks/main.tf index 2ad1bec7..fdea314a 100644 --- a/aks/main.tf +++ b/aks/main.tf @@ -72,8 +72,7 @@ module "thanos" { app_autosync = var.app_autosync dependency_ids = var.dependency_ids - thanos = var.thanos - enable_monitoring_dashboard = var.enable_monitoring_dashboard + thanos = var.thanos helm_values = concat(local.helm_values, var.helm_values) } diff --git a/charts/thanos/templates/grafana-dashboard.yaml b/charts/thanos/templates/grafana-dashboard.yaml index fbc21bdc..b640adbd 100644 --- a/charts/thanos/templates/grafana-dashboard.yaml +++ b/charts/thanos/templates/grafana-dashboard.yaml @@ -1,4 +1,4 @@ -{{- if $.Values.grafana_dashboard.enabled }} +{{- if $.Values.thanos.metrics.serviceMonitor.enabled }} {{- $files := .Files.Glob "dashboards/*.json" }} {{- if $files }} apiVersion: v1 diff --git a/eks/main.tf b/eks/main.tf index 60cc0ade..a4a77213 100644 --- a/eks/main.tf +++ b/eks/main.tf @@ -14,8 +14,7 @@ module "thanos" { app_autosync = var.app_autosync dependency_ids = var.dependency_ids - thanos = var.thanos - enable_monitoring_dashboard = var.enable_monitoring_dashboard + thanos = var.thanos helm_values = concat(local.helm_values, var.helm_values) } diff --git a/kind/main.tf b/kind/main.tf index 60cc0ade..a4a77213 100644 --- a/kind/main.tf +++ b/kind/main.tf @@ -14,8 +14,7 @@ module "thanos" { app_autosync = var.app_autosync dependency_ids = var.dependency_ids - thanos = var.thanos - enable_monitoring_dashboard = var.enable_monitoring_dashboard + thanos = var.thanos helm_values = concat(local.helm_values, var.helm_values) } diff --git a/locals.tf b/locals.tf index 8f89ec77..ceeceddd 100644 --- a/locals.tf +++ b/locals.tf @@ -302,9 +302,6 @@ locals { } } - grafana_dashboard = { - enabled = var.enable_monitoring_dashboard - } }] thanos_defaults = { diff --git a/sks/main.tf b/sks/main.tf index 60cc0ade..a4a77213 100644 --- a/sks/main.tf +++ b/sks/main.tf @@ -14,8 +14,7 @@ module "thanos" { app_autosync = var.app_autosync dependency_ids = var.dependency_ids - thanos = var.thanos - enable_monitoring_dashboard = var.enable_monitoring_dashboard + thanos = var.thanos helm_values = concat(local.helm_values, var.helm_values) } diff --git a/variables.tf b/variables.tf index 5f755d4f..03050b63 100644 --- a/variables.tf +++ b/variables.tf @@ -92,13 +92,7 @@ variable "thanos" { } variable "enable_service_monitor" { - description = "Boolean to enable the deployment of a service monitor for Prometheus. This also enables the deployment of default Prometheus rules, which are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.yaml[here]." + description = "Boolean to enable the deployment of a service monitor for Prometheus. This also enables the deployment of default Prometheus rules and Grafana dashboards, which are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.yaml[here]." type = bool default = false } - -variable "enable_monitoring_dashboard" { - description = "Boolean to enable the provisioning of multiple Grafana dashboards, one for each component of Thanos. These dashboards are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/tree/main/examples/dashboards[here]. Requires the variable `enable_service_monitor` to be set to `true`." - type = bool - default = true -}