Skip to content

Commit

Permalink
Merge pull request openshift#1228 from jcantrill/log1862
Browse files Browse the repository at this point in the history
LOG-1862: Use correct keys for kafka username/password
  • Loading branch information
openshift-merge-robot committed Oct 25, 2021
2 parents 8ba6f62 + 1234beb commit c874faa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/generator/fluentd/output/kafka/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ var _ = Describe("Generate fluentd config", func() {
brokers broker1-kafka.svc.messaging.cluster.local:9092
default_topic build_complete
use_event_time true
sasl_plain_username "#{File.exists?('/var/run/ocp-collector/secrets/kafka-receiver-1/username') ? open('/var/run/ocp-collector/secrets/kafka-receiver-1/username','r') do |f|f.read end : ''}"
sasl_plain_password "#{File.exists?('/var/run/ocp-collector/secrets/kafka-receiver-1/password') ? open('/var/run/ocp-collector/secrets/kafka-receiver-1/password','r') do |f|f.read end : ''}"
username "#{File.exists?('/var/run/ocp-collector/secrets/kafka-receiver-1/username') ? open('/var/run/ocp-collector/secrets/kafka-receiver-1/username','r') do |f|f.read end : ''}"
password "#{File.exists?('/var/run/ocp-collector/secrets/kafka-receiver-1/password') ? open('/var/run/ocp-collector/secrets/kafka-receiver-1/password','r') do |f|f.read end : ''}"
sasl_over_ssl false
<format>
@type json
Expand Down
4 changes: 2 additions & 2 deletions internal/generator/fluentd/output/kafka/userpass.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ func (up UserNamePass) Name() string {

func (up UserNamePass) Template() string {
return `{{define "` + up.Name() + `" -}}
sasl_plain_username "#{File.exists?({{.UsernamePath}}) ? open({{.UsernamePath}},'r') do |f|f.read end : ''}"
sasl_plain_password "#{File.exists?({{.PasswordPath}}) ? open({{.PasswordPath}},'r') do |f|f.read end : ''}"
username "#{File.exists?({{.UsernamePath}}) ? open({{.UsernamePath}},'r') do |f|f.read end : ''}"
password "#{File.exists?({{.PasswordPath}}) ? open({{.PasswordPath}},'r') do |f|f.read end : ''}"
{{- end}}
`
}

0 comments on commit c874faa

Please sign in to comment.