From 88de877f0ba82d3e0122433719e04173f2711f5f Mon Sep 17 00:00:00 2001 From: "Thomas P." Date: Fri, 18 Oct 2024 06:23:35 +0200 Subject: [PATCH] fix(loki): workaround targetdown alert for loki-gateway (#3043) We wouldn't get much details from nginx anyway as the pod is nginx OSS, so let's forget about metrics for this component Ref: https://github.com/grafana/loki/issues/9522#issuecomment-2183086539 Signed-off-by: Thomas P. --- loki-stack.tf | 4 ++++ modules/aws/loki-stack.tf | 4 ++++ modules/google/loki-stack.tf | 4 ++++ modules/scaleway/loki-stack.tf | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/loki-stack.tf b/loki-stack.tf index 1dd38dedc..03c14ec3d 100644 --- a/loki-stack.tf +++ b/loki-stack.tf @@ -22,6 +22,10 @@ locals { priorityClassName: ${local.priority-class["create"] ? kubernetes_priority_class.kubernetes_addons[0].metadata[0].name : ""} serviceMonitor: enabled: ${local.kube-prometheus-stack["enabled"] || local.victoria-metrics-k8s-stack["enabled"]} +gateway: + service: + labels: + prometheus.io/service-monitor: "false" VALUES } diff --git a/modules/aws/loki-stack.tf b/modules/aws/loki-stack.tf index fba1f0a4e..e581e9222 100644 --- a/modules/aws/loki-stack.tf +++ b/modules/aws/loki-stack.tf @@ -30,6 +30,10 @@ locals { enabled: false serviceMonitor: enabled: ${local.kube-prometheus-stack["enabled"] || local.victoria-metrics-k8s-stack["enabled"]} + gateway: + service: + labels: + prometheus.io/service-monitor: "false" priorityClassName: ${local.priority-class["create"] ? kubernetes_priority_class.kubernetes_addons[0].metadata[0].name : ""} serviceAccount: name: ${local.loki-stack["name"]} diff --git a/modules/google/loki-stack.tf b/modules/google/loki-stack.tf index 795c2adc7..5688ff90c 100644 --- a/modules/google/loki-stack.tf +++ b/modules/google/loki-stack.tf @@ -32,6 +32,10 @@ locals { enabled: false serviceMonitor: enabled: ${local.kube-prometheus-stack["enabled"] || local.victoria-metrics-k8s-stack["enabled"]} + gateway: + service: + labels: + prometheus.io/service-monitor: "false" priorityClassName: ${local.priority-class["create"] ? kubernetes_priority_class.kubernetes_addons[0].metadata[0].name : ""} serviceAccount: create: false diff --git a/modules/scaleway/loki-stack.tf b/modules/scaleway/loki-stack.tf index 4d508acaf..2d503ecdc 100644 --- a/modules/scaleway/loki-stack.tf +++ b/modules/scaleway/loki-stack.tf @@ -26,6 +26,10 @@ locals { dnsService: coredns serviceMonitor: enabled: ${local.kube-prometheus-stack["enabled"] || local.victoria-metrics-k8s-stack["enabled"]} + gateway: + service: + labels: + prometheus.io/service-monitor: "false" priorityClassName: ${local.priority-class["create"] ? kubernetes_priority_class.kubernetes_addons[0].metadata[0].name : ""} persistence: enabled: true