influxdata / influxdata/kapacitor
Setting kafka config through env vars doesn't work
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Repro steps:
Run:
`KAPACITOR_KAFKA_0_ID="kafka-cluster" KAPACITOR_KAFKA_0_BROKERS_0="192.168.99.100:31092" KAPACITOR_KAFKA_0_ENABLED=true kapacitord`
Kapacitor logs this and exits:
```
run: create server: invalid configuration: kafka: no brokers specified, must provide at least one broker URL. To generate a valid configuration file run `kapacitord config > kapacitor.generated.conf`.
```
This is useful for easily configuring kapacitor running as a docker container.
Contributor guide
Research direction
Reproduce the issue with the KAPACITOR_KAFKA_0_* environment variables and the kapacitord command. Trace how these variables are converted into the Kafka configuration, then verify that the broker value is retained and kapacitord starts without the “no brokers specified” error. Add or update coverage for this environment-based configuration if the repository has a relevant test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kafka
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100