kafbat / helm-charts

Helm charts for kafbat projects
https://ui.charts.kafbat.io/
Apache License 2.0
3 stars 7 forks source link

Set environment variables from secretRef/configMap #17

Closed chrbrnracn closed 1 week ago

chrbrnracn commented 1 month ago

Current situation:

With the change it is possible to set a named environment variable to a specific key in a specific secret or config map.

Use case:
When running Kafka with Strimzi, each KafkaUser entity gets its own secret with the password and sasl.jaas.config. With the new feature it's possible to directly access this secret and use it for Kafka UI.

  secretMappings:
    KAFKA_CLUSTERS_0_PROPERTIES_SASL_JAAS_CONFIG:
      secretName: mySuperUser
      secretKey: sasl.jaas.config

There may be a lot more use cases for this feature. That's why I added the same for configMapKeyRef.

Side note:
I had to set all other kafka.clusters.* values as envs.config instead of using yamlApplicationConfig, but not auth.* or management.*. It looks like the application does not deep-merge values from config file and YAML configuration. I didn't find this in the docs.

Haarolean commented 1 week ago

@chrbrnracn thanks for your contribution!