Skip to content

Commit

Permalink
add tls_config
Browse files Browse the repository at this point in the history
  • Loading branch information
musa-asad committed Jan 21, 2025
1 parent 62f794d commit a713e78
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ func AddTAConfigToPromConfig(prometheus map[interface{}]interface{}, taServiceNa
targetAllocatorCfg["endpoint"] = fmt.Sprintf("https://%s:%d", taServiceName, naming.TargetAllocatorServicePort)
targetAllocatorCfg["interval"] = "30s"

targetAllocatorCfg["tls"] = map[string]interface{}{
"ca_file": "/etc/amazon-cloudwatch-observability-agent-cert/tls-ca.crt",
"cert_file": "/etc/amazon-cloudwatch-observability-agent-outbound-cert/client.crt",
"key_file": "/etc/amazon-cloudwatch-observability-agent-outbound-cert/client.key",
}

// Remove the scrape_configs key from the map
delete(prometheusCfg, "scrape_configs")

Expand Down

0 comments on commit a713e78

Please sign in to comment.