From f5f5967042e75df8f4b79c191f8f97ff63a6504b Mon Sep 17 00:00:00 2001 From: Derek Horton Date: Wed, 4 Oct 2023 09:43:46 -0500 Subject: [PATCH] Separate kafka ca cert config from kafka sasl config --- internal/config/config.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index f6c00b4c..289475b6 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -423,15 +423,14 @@ func GetConfig() *Config { config.KafkaUsername = *broker.Sasl.Username config.KafkaPassword = *broker.Sasl.Password config.KafkaSASLMechanism = *broker.Sasl.SaslMechanism + } - if broker.Cacert != nil { - caPath, err := cfg.KafkaCa(broker) - if err != nil { - panic("Kafka CA cert failed to write") - } - - config.KafkaCA = caPath + if broker.Cacert != nil { + caPath, err := cfg.KafkaCa(broker) + if err != nil { + panic("Kafka CA cert failed to write") } + config.KafkaCA = caPath } config.ConnectionDatabaseHost = cfg.Database.Hostname