Skip to content

Commit

Permalink
disable datadog remote configuration/ tracing library envoy, enabled …
Browse files Browse the repository at this point in the history
…by default since Agent version 7.47.0 (#106)
  • Loading branch information
andrenarciso4 authored Jul 5, 2024
1 parent eb539aa commit 0588fdc
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 30 deletions.
63 changes: 33 additions & 30 deletions terraform/envoy-proxy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@ resource "aws_ecs_task_definition" "envoy-proxy" {
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
container_definitions = templatefile("${path.module}/templates/envoy.json.tpl", {
mtls = var.mtls
AWS_REGION = data.aws_region.current.name
ENVOY_RELEASE = var.envoy_release
ENVOY_CONFIG = aws_ssm_parameter.envoy-config-http.arn
APPMESH_NAME = var.appmesh_name
APPMESH_ENVOY_RELEASE = var.appmesh_envoy_release
EXTRA_CONTAINERS = var.extra_containers == "" ? "" : ",${var.extra_containers}"
EXTRA_DEPENDENCY = var.extra_dependency == "" ? "" : var.enable_appmesh ? ",${var.extra_dependency}" : var.extra_dependency
ULIMIT_NOFILE_SOFT = var.envoy_nofile_soft_limit
ULIMIT_NOFILE_HARD = var.envoy_nofile_hard_limit
mtls = var.mtls
AWS_REGION = data.aws_region.current.name
ENVOY_RELEASE = var.envoy_release
ENVOY_CONFIG = aws_ssm_parameter.envoy-config-http.arn
APPMESH_NAME = var.appmesh_name
APPMESH_ENVOY_RELEASE = var.appmesh_envoy_release
EXTRA_CONTAINERS = var.extra_containers == "" ? "" : ",${var.extra_containers}"
EXTRA_DEPENDENCY = var.extra_dependency == "" ? "" : var.enable_appmesh ? ",${var.extra_dependency}" : var.extra_dependency
ULIMIT_NOFILE_SOFT = var.envoy_nofile_soft_limit
ULIMIT_NOFILE_HARD = var.envoy_nofile_hard_limit
DD_REMOTE_CONFIGURATION_ENABLED = var.dd_remote_configuration_enabled
})
}

Expand All @@ -58,16 +59,17 @@ resource "aws_ecs_task_definition" "envoy-proxy-appmesh" {
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
container_definitions = templatefile("${path.module}/templates/envoy-appmesh.json.tpl", {
mtls = var.mtls
AWS_REGION = data.aws_region.current.name
ENVOY_RELEASE = var.envoy_release
ENVOY_CONFIG = aws_ssm_parameter.envoy-config-http.arn
APPMESH_NAME = var.appmesh_name
APPMESH_ENVOY_RELEASE = var.appmesh_envoy_release
EXTRA_CONTAINERS = var.extra_containers == "" ? "" : ",${var.extra_containers}"
EXTRA_DEPENDENCY = var.extra_dependency == "" ? "" : var.enable_appmesh ? ",${var.extra_dependency}" : var.extra_dependency
ULIMIT_NOFILE_SOFT = var.envoy_nofile_soft_limit
ULIMIT_NOFILE_HARD = var.envoy_nofile_hard_limit
mtls = var.mtls
AWS_REGION = data.aws_region.current.name
ENVOY_RELEASE = var.envoy_release
ENVOY_CONFIG = aws_ssm_parameter.envoy-config-http.arn
APPMESH_NAME = var.appmesh_name
APPMESH_ENVOY_RELEASE = var.appmesh_envoy_release
EXTRA_CONTAINERS = var.extra_containers == "" ? "" : ",${var.extra_containers}"
EXTRA_DEPENDENCY = var.extra_dependency == "" ? "" : var.enable_appmesh ? ",${var.extra_dependency}" : var.extra_dependency
ULIMIT_NOFILE_SOFT = var.envoy_nofile_soft_limit
ULIMIT_NOFILE_HARD = var.envoy_nofile_hard_limit
DD_REMOTE_CONFIGURATION_ENABLED = var.dd_remote_configuration_enabled
})

proxy_configuration {
Expand Down Expand Up @@ -140,16 +142,17 @@ resource "aws_ecs_task_definition" "envoy-proxy-https" {
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
container_definitions = templatefile("${path.module}/templates/envoy.json.tpl", {
mtls = var.mtls
AWS_REGION = data.aws_region.current.name
ENVOY_RELEASE = var.envoy_release
ENVOY_CONFIG = aws_ssm_parameter.envoy-config-http.arn
APPMESH_NAME = var.appmesh_name
APPMESH_ENVOY_RELEASE = var.appmesh_envoy_release
EXTRA_CONTAINERS = var.extra_containers == "" ? "" : ",${var.extra_containers}"
EXTRA_DEPENDENCY = var.extra_dependency == "" ? "" : var.enable_appmesh ? ",${var.extra_dependency}" : var.extra_dependency
ULIMIT_NOFILE_SOFT = var.envoy_nofile_soft_limit
ULIMIT_NOFILE_HARD = var.envoy_nofile_hard_limit
mtls = var.mtls
AWS_REGION = data.aws_region.current.name
ENVOY_RELEASE = var.envoy_release
ENVOY_CONFIG = aws_ssm_parameter.envoy-config-http.arn
APPMESH_NAME = var.appmesh_name
APPMESH_ENVOY_RELEASE = var.appmesh_envoy_release
EXTRA_CONTAINERS = var.extra_containers == "" ? "" : ",${var.extra_containers}"
EXTRA_DEPENDENCY = var.extra_dependency == "" ? "" : var.enable_appmesh ? ",${var.extra_dependency}" : var.extra_dependency
ULIMIT_NOFILE_SOFT = var.envoy_nofile_soft_limit
ULIMIT_NOFILE_HARD = var.envoy_nofile_hard_limit
DD_REMOTE_CONFIGURATION_ENABLED = var.dd_remote_configuration_enabled
})
}

Expand Down
6 changes: 6 additions & 0 deletions terraform/templates/envoy.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
"hardLimit": ${ULIMIT_NOFILE_HARD}
}
],
"environment": [
{
"name": "DD_REMOTE_CONFIGURATION_ENABLED",
"value": "${DD_REMOTE_CONFIGURATION_ENABLED}"
}
],
"secrets": [
{
"name": "ENVOY_CONFIG",
Expand Down
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ variable "enable_datadog" {
description = "flag to enable datadog integration"
default = false
}
variable "dd_remote_configuration_enabled" {
description = "flag to enable/disable datadog remote configuration"
default = true
}
variable "datadog_api_key" {
description = "datadog api key"
default = ""
Expand Down

0 comments on commit 0588fdc

Please sign in to comment.