redpanda-data / kminion

KMinion is a feature-rich Prometheus exporter for Apache Kafka written in Go. It is lightweight and highly configurable so that it will meet your requirements.
MIT License
601 stars 123 forks source link

fix: set environment variables config values correctly for camelCaseconfig keys #245

Open doxsch opened 5 months ago

doxsch commented 5 months ago

Lowercase the keys that are stored internally within Koanf and reload them. This is a workaround because internally keys are stored case sensitive. This causes the problem that environment variables can't match the exact key and therefore will not be unmarshalled as expected anymore.

Same workaround as in redpanda console: https://github.com/redpanda-data/console/blob/a0408520cedfdd73f4f444ddbfd364faceeb0b5f/backend/pkg/config/config.go#L162-L177

closes #179