docs: Add comprehensive example for configuration via standard Druid environment variables (Secret Injection)#246
Merged
AdheipSingh merged 1 commit intodatainfrahq:masterfrom Nov 28, 2025
Conversation
…ables Adds a section on configuring Druid using environment variables, recommended for sensitive data. Includes an example of secure injection of Druid secrets and properties via Kubernetes Secrets. Removes sensitive settings from `runtime.properties` and replaces them with environment variables in the cluster examples. This improves security and flexibility, allowing configurations to be easily changed between environments without modifying configuration files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The current documentation for securing configuration (like metadata store connection strings) primarily uses the inline JSON format (
{"type": "environment", "variable": "VAR"}) withinruntime.properties.This approach presents two main limitations:
.propertiesfiles.This PR introduces and documents the recommended alternative leveraging the default behavior of the official Druid Docker entrypoint: any environment variable prefixed with
druid_is automatically converted into the corresponding Druid property (druid_storage_typebecomesdruid.storage.type).This standardized approach offers superior security and flexibility by allowing operators to:
valueFrom.runtime.properties), adhering to secrets management best practices.Changes:
docs/examples.md: Configuration via Environment Variables (Recommended for sensitive data), detailing the use ofdruid_prefixed environment variables mapped from Kubernetes Secrets.examples/tiny-cluster.yamlandexamples/tiny-cluster-hpa.yamlto demonstrate the new approach by moving metadata storage configuration fromruntime.propertiesto environment variables.