Skip to content

Commit

Permalink
Make datadog agent essential for metrics ingestor (#94)
Browse files Browse the repository at this point in the history
* Make datadog agent essential for metrics ingestor

* fix
  • Loading branch information
jiajames authored Apr 2, 2024
1 parent d30ee8e commit eedca8f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/datadog_agent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ locals {
image = "${var.docker_image_name}:${var.docker_image_tag}",
cpu = var.container_cpu_units,
memoryReservation = var.container_memory_reservation,
essential = false,
essential = var.essential,

dockerLabels = var.docker_labels

Expand Down
6 changes: 6 additions & 0 deletions modules/datadog_agent/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ variable "dd_site" {
nullable = false
description = "The site that the datadog agent will send data to"
}

variable "essential" {
type = bool
description = "Whether the datadog agent should be an essential container"
default = false
}
1 change: 1 addition & 0 deletions modules/metric_ingestor/datadog.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module "datadog_agent" {
datadog_api_key = var.datadog_api_key
dd_site = var.datadog_site
service_name = "metric-ingestor"
essential = true

# https://docs.datadoghq.com/containers/docker/prometheus/?tabs=standard#configuration
docker_labels = {
Expand Down

0 comments on commit eedca8f

Please sign in to comment.