Skip to content

Commit

Permalink
chore: updated iac daemon bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Oct 10, 2024
1 parent a82c152 commit e6eb4ed
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 13 deletions.
19 changes: 10 additions & 9 deletions .github/iac/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ module "fabric_rpc" {
module "fabric_daemon" {
source = "../../bootstrap/daemon"

namespace = local.daemon_namespace
image = var.daemon_image
cluster_id = "txpipe-us-east-2-m2"
broker_urls = local.broker_urls
consumer_name = "daemon-us-west-2-m2-hi6"
kafka_username = local.kafka_daemon_username
kafka_password = local.kafka_daemon_password
kafka_topic = local.kafka_topic
mode = "usage"
namespace = local.daemon_namespace
image = var.daemon_image
cluster_id = "txpipe-us-east-2-m2"
broker_urls = local.broker_urls
consumer_monitor_name = "daemon-us-west-2-m2-monitor-hi6"
consumer_cache_name = "daemon-us-west-2-m2-cache-hi6"
kafka_username = local.kafka_daemon_username
kafka_password = local.kafka_daemon_password
kafka_topic = local.kafka_topic
mode = "usage"
}
3 changes: 2 additions & 1 deletion bootstrap/daemon/config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ resource "kubernetes_config_map_v1" "fabric_daemon_config" {
"${path.module}/daemon.toml.tftpl",
{
broker_urls = var.broker_urls
consumer_name = var.consumer_name
consumer_cache_name = var.consumer_cache_name
consumer_monitor_name = var.consumer_monitor_name
kafka_username = var.kafka_username
kafka_password = var.kafka_password
topic = var.kafka_topic
Expand Down
18 changes: 16 additions & 2 deletions bootstrap/daemon/daemon.toml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,27 @@ mode = "${mode}"
url = "${prometheus_url}"
query_step = "${prometheus_query_step}"

[kafka]
[kafka_producer]
"bootstrap.servers" = "${broker_urls}"
"group.id"= "${consumer_name}"
"security.protocol" = "SASL_SSL"
"sasl.mechanisms" = "SCRAM-SHA-256"
"sasl.username" = "${kafka_username}"
"sasl.password" = "${kafka_password}"

[kafka_monitor]
"bootstrap.servers" = "${broker_urls}"
"group.id"= "${consumer_monitor_name}"
"auto.offset.reset" = "earliest"
"security.protocol" = "SASL_SSL"
"sasl.mechanisms" = "SCRAM-SHA-256"
"sasl.username" = "${kafka_username}"
"sasl.password" = "${kafka_password}"

[kafka_cache]
"bootstrap.servers" = "${broker_urls}"
"group.id"= "${consumer_cache_name}"
"auto.offset.reset" = "earliest"
"security.protocol" = "SASL_SSL"
"sasl.mechanisms" = "SCRAM-SHA-256"
"sasl.username" = "${kafka_username}"
"sasl.password" = "${kafka_password}"
6 changes: 5 additions & 1 deletion bootstrap/daemon/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ variable "broker_urls" {
description = "Comma separated values of the queue broker urls."
}

variable "consumer_name" {
variable "consumer_monitor_name" {
type = string
}

variable "consumer_cache_name" {
type = string
}

Expand Down

0 comments on commit e6eb4ed

Please sign in to comment.