kafka-lag-exporter icon indicating copy to clipboard operation
kafka-lag-exporter copied to clipboard

property placeholder support in application.conf

Open FrVaBe opened this issue 2 years ago • 2 comments

Enhancement Support for property placeholders in application.conf.

One use case is to provide a standardized Kubernetes deployment for different systems. In the systems themselves, only the bootstrap-brokers specification changes. This could be set as an environment variable in the deployment. The environment variable would then be used in the application.conf and no system-specific configuration files would be required.

  clusters = [
    {
      name = "my-kafka-cluster"
      bootstrap-brokers = "${BOOTSTRAP_BROKERS}"
      topic-whitelist = [
        ".*"
      ]
      ....
	}
  ]

Additional context If I missed something to support this use case in other ways, I would be glad to here about it.

FrVaBe avatar Jun 15 '23 10:06 FrVaBe

Maybe I'm missing something but this is already possible, we are using kafka-lag-exporter like this. We have an application.conf with ${BOOTSTRAP_BROKERS} in the contents. BOOTSTRAP_SERVERS is further specified in our helm chart/application set.

Philippus avatar Jun 26 '23 18:06 Philippus

Unfortunately, I don't know anything about helm. Is the property perhaps replaced by helm during the deployment? My use case is that the application.conf must be loaded by the kafka-lag-exporter with the property placeholder and the kafka-lag-exporter than replaces the property with the Environemt variable value. At least this did not work in my test.

FrVaBe avatar Jun 27 '23 06:06 FrVaBe