Skip to content

Commit

Permalink
feature(prometheus): setup proxy with kube-prometheus-stack
Browse files Browse the repository at this point in the history
msfidelis committed Jan 28, 2024
1 parent 5adbcb7 commit f331d73
Showing 2 changed files with 64 additions and 20 deletions.
43 changes: 28 additions & 15 deletions helm/prometheus/managed/values.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
# prometheus:
# enabled: true
# prometheusSpec:
# # podMonitorNamespaceSelector:
# # any: true
# podMonitorSelector: {}
# podMonitorSelectorNilUsesHelmValues: false
# # ruleNamespaceSelector:
# # any: true
# ruleSelector: {}
# ruleSelectorNilUsesHelmValues: false
# # serviceMonitorNamespaceSelector:
# # any: true
# serviceMonitorSelector: {}
# serviceMonitorSelectorNilUsesHelmValues: false
prometheus:
# podMonitorNamespaceSelector:
# any: true
podMonitorSelector: {}
podMonitorSelectorNilUsesHelmValues: false
# ruleNamespaceSelector:
# any: true
ruleSelector: {}
ruleSelectorNilUsesHelmValues: false
# serviceMonitorNamespaceSelector:
# any: true
serviceMonitorSelector: {}
serviceMonitorSelectorNilUsesHelmValues: false

kubeStateMetrics:
enabled: false

grafana:
enabled: false

alertmanager:
enabled: false

prometheusOperator:
enabled: true
namespaces: ''
denyNamespaces: ''
prometheusInstanceNamespaces: ''
alertmanagerInstanceNamespaces: ''
thanosRulerInstanceNamespaces: ''
41 changes: 36 additions & 5 deletions helm_managed_prometheus.tf
Original file line number Diff line number Diff line change
@@ -87,13 +87,44 @@ resource "helm_release" "managed_prometheus" {

version = "45.8.0"

# set {
# name = "fullnameOverride"
# value = "prometheus"
# }
set {
name = "prometheus.serviceAccount.name"
value = "managed-prometheus"
}

set {
name = "prometheus.serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn"
value = aws_iam_role.managed_prometheus_role.arn
}

set {
name = "prometheus.prometheusSpec.remoteWrite[0].url"
value = format("%sapi/v1/remote_write", aws_prometheus_workspace.main[0].prometheus_endpoint)
}

set {
name = "prometheus.prometheusSpec.remoteWrite[0].sigv4.region"
value = var.aws_region
}

set {
name = "prometheus.prometheusSpec.remoteWrite[0].queue_config.max_samples_per_send"
value = "1000"
}

set {
name = "prometheus.prometheusSpec.remoteWrite[0].queue_config.max_shards"
value = "200"
}

set {
name = "prometheus.prometheusSpec.remoteWrite[0].queue_config.capacity"
value = "2500"
}


values = [
"${file("./helm/prometheus/values.yml")}"
"${file("./helm/prometheus/managed/values.yml")}"
]


0 comments on commit f331d73

Please sign in to comment.