Skip to content

Commit

Permalink
Rename env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysonsantos committed Oct 23, 2020
1 parent 9b9cc23 commit 88b13a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/config/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ var Config = struct {
RecorderKafkaCAFile string `env:"FLAGR_RECORDER_KAFKA_CAFILE" envDefault:""`
RecorderKafkaVerifySSL bool `env:"FLAGR_RECORDER_KAFKA_VERIFYSSL" envDefault:"false"`
RecorderKafkaSimpleSSL bool `env:"FLAGR_RECORDER_KAFKA_SIMPLE_SSL" envDefault:"false"`
RecorderKafkaUsername string `env:"FLAGR_RECORDER_KAFKA_USERNAME" envDefault:""`
RecorderKafkaPassword string `env:"FLAGR_RECORDER_KAFKA_PASSWORD" envDefault:""`
RecorderKafkaSASLUsername string `env:"FLAGR_RECORDER_KAFKA_SASL_USERNAME" envDefault:""`
RecorderKafkaSASLPassword string `env:"FLAGR_RECORDER_KAFKA_SASL_PASSWORD" envDefault:""`
RecorderKafkaVerbose bool `env:"FLAGR_RECORDER_KAFKA_VERBOSE" envDefault:"true"`
RecorderKafkaTopic string `env:"FLAGR_RECORDER_KAFKA_TOPIC" envDefault:"flagr-records"`
RecorderKafkaRetryMax int `env:"FLAGR_RECORDER_KAFKA_RETRYMAX" envDefault:"5"`
Expand Down
6 changes: 3 additions & 3 deletions pkg/handler/data_recorder_kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ var NewKafkaRecorder = func() DataRecorder {
cfg.Net.TLS.Config = tlscfg
}

if config.Config.RecorderKafkaUsername != "" && config.Config.RecorderKafkaPassword != "" {
if config.Config.RecorderKafkaSASLUsername != "" && config.Config.RecorderKafkaSASLPassword != "" {
cfg.Net.SASL.Enable = true
cfg.Net.SASL.User = config.Config.RecorderKafkaSASLUsername
cfg.Net.SASL.Password = config.Config.RecorderKafkaSASLPassword
}
cfg.Net.SASL.User = config.Config.RecorderKafkaUsername
cfg.Net.SASL.Password = config.Config.RecorderKafkaPassword

cfg.Producer.RequiredAcks = sarama.WaitForLocal
cfg.Producer.Retry.Max = config.Config.RecorderKafkaRetryMax
Expand Down

0 comments on commit 88b13a2

Please sign in to comment.