Skip to content

Commit

Permalink
feat: service monitor for alertmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwalsh committed Jul 29, 2022
1 parent baad0e0 commit 5e213d7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/alertmanager/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ locals { name = "prometheus-operator" }

resource "kubernetes_service" "this" {
metadata {
labels = {
app = "${local.name}-alertmanager"
release = local.name
}
name = "${local.name}-alertmanager"
namespace = var.namespace
}
Expand Down Expand Up @@ -60,6 +64,10 @@ resource "kubernetes_manifest" "servicemonitor" {
apiVersion = "monitoring.coreos.com/v1"
kind = "ServiceMonitor"
metadata = {
labels = {
app = "${local.name}-alertmanager"
release = local.name
}
name = "${local.name}-alertmanager"
namespace = var.namespace
}
Expand Down

0 comments on commit 5e213d7

Please sign in to comment.