Skip to content

Commit

Permalink
Merge pull request #44 from jdelucaa/joana/remove-alertmanager
Browse files Browse the repository at this point in the history
remove alertmanager from module
  • Loading branch information
loafoe authored Oct 6, 2021
2 parents 1667b2c + 23143f6 commit 8046921
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 121 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## v5.0.0
- BREAKING: Removed Alertmanager app from this module. This module still supports alert managers and it now accepts a list of alert managers endpoints.
- The alertmanager app is now a separate module at [philips-labs/terraform-cloudfoundry-alertmanager](https://github.com/philips-labs/terraform-cloudfoundry-alertmanager)

## v4.4.1
- Deploy improvements

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Setup for Prometheus + Thanos on Cloudfoundry. This provides a path towards unli
- Deploys a Thanos instance with S3 Bucket as storage
- [Variant](https://github.com/philips-software/variant) sidecar for scrape target and rule discovery
- Alertmanager support
- Teams notification support

## Example of Thanos Terraform

```
Expand Down
80 changes: 0 additions & 80 deletions alertmanager.tf

This file was deleted.

2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ locals {
thanos_routes = var.thanos_public_endpoints ? [cloudfoundry_route.thanos.id, cloudfoundry_route.thanos_internal.id] : [cloudfoundry_route.thanos_internal.id]
postfix = var.name_postfix != "" ? var.name_postfix : random_id.id.hex
prometheus_config = templatefile("${path.module}/templates/prometheus.yml", {
alertmanagers = ["0.tf-alertmanager-${local.postfix}.apps.internal:9093"]
alertmanagers = var.alertmanagers_endpoints
})
}

Expand Down
10 changes: 0 additions & 10 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,3 @@ output "thanos_store_endpoint" {
description = "Internal only URL of Thanos store deployment"
value = "${cloudfoundry_route.thanos_store_internal.endpoint}:9090"
}

output "alertmanager_app_id" {
description = "App id of Alertmanager"
value = cloudfoundry_app.alertmanager.id
}

output "alertmanager_internal_endpoint" {
description = "Internal route of alertmanager"
value = "${cloudfoundry_route.alertmanager_internal.endpoint}:9093"
}
10 changes: 0 additions & 10 deletions templates/alertmanager.yml

This file was deleted.

23 changes: 5 additions & 18 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,8 @@ variable "cf_paas_exporter_disk_quota" {
default = 100
}

variable "alertmanager" {
type = object({
docker_image = optional(string)
memory = optional(string)
config_file = optional(string)
docker_username = optional(string)
docker_password = optional(string)
})
default = {}
}

locals {
alertmanager = defaults(var.alertmanager, {
memory = 128
docker_image = "prom/alertmanager:v0.23.0"
config_file = ""
})
}
variable "alertmanagers_endpoints" {
type = list(string)
description = "List of endpoints of the alert managers"
default = []
}

0 comments on commit 8046921

Please sign in to comment.