mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
63 lines
1.5 KiB
Terraform
63 lines
1.5 KiB
Terraform
locals {
|
|
name = "adot-collector-nginx"
|
|
namespace = try(var.helm_config.namespace, local.name)
|
|
}
|
|
|
|
data "aws_partition" "current" {}
|
|
|
|
module "helm_addon" {
|
|
source = "github.com/aws-ia/terraform-aws-eks-blueprints/modules/kubernetes-addons/helm-addon"
|
|
|
|
helm_config = merge(
|
|
{
|
|
name = local.name
|
|
chart = "${path.module}/otel-config"
|
|
version = "0.2.0"
|
|
namespace = local.namespace
|
|
description = "ADOT helm Chart deployment configuration"
|
|
},
|
|
var.helm_config
|
|
)
|
|
|
|
set_values = [
|
|
{
|
|
name = "ampurl"
|
|
value = "${var.amazon_prometheus_workspace_endpoint}api/v1/remote_write"
|
|
},
|
|
{
|
|
name = "region"
|
|
value = var.amazon_prometheus_workspace_region
|
|
},
|
|
{
|
|
name = "prometheusMetricsEndpoint"
|
|
value = "metrics"
|
|
},
|
|
{
|
|
name = "prometheusMetricsPort"
|
|
value = 8888
|
|
},
|
|
{
|
|
name = "scrapeInterval"
|
|
value = "15s"
|
|
},
|
|
{
|
|
name = "scrapeTimeout"
|
|
value = "10s"
|
|
},
|
|
{
|
|
name = "scrapeSampleLimit"
|
|
value = 1000
|
|
}
|
|
]
|
|
|
|
irsa_config = {
|
|
create_kubernetes_namespace = try(var.helm_config["create_namespace"], true)
|
|
kubernetes_namespace = local.namespace
|
|
create_kubernetes_service_account = true
|
|
kubernetes_service_account = try(var.helm_config.service_account, local.name)
|
|
irsa_iam_policies = ["arn:${data.aws_partition.current.partition}:iam::aws:policy/AmazonPrometheusRemoteWriteAccess"]
|
|
}
|
|
|
|
addon_context = var.addon_context
|
|
}
|