Skip to content

Commit

Permalink
fix!: remove specific var and use the ServiceMonitor boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
lentidas committed Feb 27, 2024
1 parent 2f0258e commit 1a53b36
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 19 deletions.
3 changes: 1 addition & 2 deletions aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion charts/thanos/templates/grafana-dashboard.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if $.Values.grafana_dashboard.enabled }}
{{- if $.Values.thanos.metrics.serviceMonitor.enabled }}
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
Expand Down
3 changes: 1 addition & 2 deletions eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
3 changes: 1 addition & 2 deletions kind/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
3 changes: 0 additions & 3 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,6 @@ locals {
}

}
grafana_dashboard = {
enabled = var.enable_monitoring_dashboard
}
}]

thanos_defaults = {
Expand Down
3 changes: 1 addition & 2 deletions sks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
8 changes: 1 addition & 7 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 1a53b36

Please sign in to comment.