Skip to content

Commit

Permalink
fix for thanos querier to see store correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcVelia committed Feb 20, 2024
1 parent ff4d6db commit 7039e18
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ global:
keep_dropped_targets: 100
external_labels:
cluster: prometheus
# Each Prometheus has to have unique labels.
replica: $(POD_NAME)
rule_files:
- /etc/prometheus/prometheus.rules
alerting:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ global:
keep_dropped_targets: 100
external_labels:
cluster: prometheus
# Each Prometheus has to have unique labels.
replica: $(POD_NAME)
rule_files:
- /etc/prometheus/prometheus.rules
alerting:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ global:
keep_dropped_targets: 100
external_labels:
cluster: prometheus
# Each Prometheus has to have unique labels.
replica: $(POD_NAME)
rule_files:
- /etc/prometheus/prometheus.rules
alerting:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ global:
keep_dropped_targets: 100
external_labels:
cluster: prometheus
# Each Prometheus has to have unique labels.
replica: $(POD_NAME)
rule_files:
- /etc/prometheus/prometheus.rules
alerting:
Expand Down
12 changes: 1 addition & 11 deletions cluster/terraform_kubernetes/prometheus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,6 @@ resource "kubernetes_deployment" "prometheus" {
# "--reloader.rule-dir=/etc/prometheus/rules/",
]

env {
name = "POD_NAME"
value_from {
field_ref {
field_path = "metadata.name"
}
}
}

liveness_probe {
http_get {
path = "/-/healthy"
Expand Down Expand Up @@ -235,13 +226,12 @@ resource "kubernetes_service" "prometheus" {

spec {
port {
node_port = 30000
name = "prometheus"
port = 8080
target_port = kubernetes_deployment.prometheus.spec[0].template[0].spec[0].container[0].port[0].container_port
}
selector = {
app = "prometheus"
}
type = "NodePort"
}
}
4 changes: 2 additions & 2 deletions cluster/terraform_kubernetes/thanos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ resource "kubernetes_service" "thanos-store-gateway" {
thanos-store-api : "true"
}
type = "ClusterIP"
cluster_ip = "None"
}
}

Expand Down Expand Up @@ -84,7 +85,7 @@ resource "kubernetes_deployment" "thanos-querier" {
"query",
"--log.level=debug",
"--query.replica-label=replica",
"--store=dnssrv+thanos-store-gateway:10901",
"--store=dns+thanos-store-gateway:10901",
]

liveness_probe {
Expand Down Expand Up @@ -264,7 +265,6 @@ resource "kubernetes_deployment" "thanos-compactor" {
metadata {
labels = {
app = "thanos-compactor"
thanos-store-api = true
}
}

Expand Down

0 comments on commit 7039e18

Please sign in to comment.