From 35cdf615478b5f41c79092ab14d91be1025ada99 Mon Sep 17 00:00:00 2001 From: Pierre Mavro Date: Fri, 16 Apr 2021 17:46:45 +0200 Subject: [PATCH] feat: remove discord notifications, not needed anymore --- .../chart_values/prometheus_operator.yaml | 35 +++--- .../bootstrap/helm-alertmanager-discord.tf | 100 +++++++++--------- 2 files changed, 63 insertions(+), 72 deletions(-) diff --git a/lib/aws/bootstrap/chart_values/prometheus_operator.yaml b/lib/aws/bootstrap/chart_values/prometheus_operator.yaml index 572cea04..f3cbb17c 100644 --- a/lib/aws/bootstrap/chart_values/prometheus_operator.yaml +++ b/lib/aws/bootstrap/chart_values/prometheus_operator.yaml @@ -132,28 +132,19 @@ alertmanager: config: global: resolve_timeout: 5m - route: - group_by: ['job'] - group_wait: 30s - group_interval: 2m - repeat_interval: 3h - receiver: 'discord_webhook' - routes: - - receiver: 'null' - match: - alertname: Watchdog - - receiver: 'null' - match: - alertname: KubeDeploymentReplicasMismatch - - receiver: 'null' - match: - alertname: CPUThrottlingHigh - - receiver: 'discord_webhook' - receivers: - - name: 'null' - - name: 'discord_webhook' - webhook_configs: - - url: 'http://alertmanager-discord.prometheus.svc:9095' + route: + group_by: ['job'] + group_wait: 30s + group_interval: 5m + repeat_interval: 12h + receiver: 'null' + routes: + - match: + alertname: Watchdog + receiver: 'null' + receivers: + - name: 'null' + ## Pass the Alertmanager configuration directives through Helm's templating ## engine. If the Alertmanager configuration contains Alertmanager templates, diff --git a/lib/aws/bootstrap/helm-alertmanager-discord.tf b/lib/aws/bootstrap/helm-alertmanager-discord.tf index 4e3c161a..0e3e5bc1 100644 --- a/lib/aws/bootstrap/helm-alertmanager-discord.tf +++ b/lib/aws/bootstrap/helm-alertmanager-discord.tf @@ -1,50 +1,50 @@ -resource "helm_release" "alertmanager_discord" { - name = "alertmanager-discord" - chart = "common/charts/alertmanager-discord" - namespace = "prometheus" - create_namespace = true - atomic = true - max_history = 50 - - set { - name = "replicaCount" - value = "1" - } - - # Interrupt channel - set { - name = "application.environmentVariables.DISCORD_WEBHOOK" - value = var.discord_api_key - } - - set { - name = "resources.limits.cpu" - value = "50m" - } - - set { - name = "resources.requests.cpu" - value = "50m" - } - - set { - name = "resources.limits.memory" - value = "50Mi" - } - - set { - name = "resources.requests.memory" - value = "50Mi" - } - - set { - name = "forced_upgrade" - value = var.forced_upgrade - } - - depends_on = [ - aws_eks_cluster.eks_cluster, - helm_release.aws_vpc_cni, - helm_release.cluster_autoscaler, - ] -} \ No newline at end of file +//resource "helm_release" "alertmanager_discord" { +// name = "alertmanager-discord" +// chart = "common/charts/alertmanager-discord" +// namespace = "prometheus" +// create_namespace = true +// atomic = true +// max_history = 50 +// +// set { +// name = "replicaCount" +// value = "1" +// } +// +// # Interrupt channel +// set { +// name = "application.environmentVariables.DISCORD_WEBHOOK" +// value = var.discord_api_key +// } +// +// set { +// name = "resources.limits.cpu" +// value = "50m" +// } +// +// set { +// name = "resources.requests.cpu" +// value = "50m" +// } +// +// set { +// name = "resources.limits.memory" +// value = "50Mi" +// } +// +// set { +// name = "resources.requests.memory" +// value = "50Mi" +// } +// +// set { +// name = "forced_upgrade" +// value = var.forced_upgrade +// } +// +// depends_on = [ +// aws_eks_cluster.eks_cluster, +// helm_release.aws_vpc_cni, +// helm_release.cluster_autoscaler, +// ] +//} \ No newline at end of file