From 29b519a7a7ba83721cdd21b2c5f80f0e6e62dda8 Mon Sep 17 00:00:00 2001 From: EylonLevy <46627613+EylonLevy@users.noreply.github.com> Date: Fri, 10 Mar 2023 11:22:02 +0200 Subject: [PATCH] Add ability to add config files when using druid on Kubernetes (#13795) You can now add additional configuration files to be copied to the final conf directory on startup when running in a containerized environment. Useful for running on Kubernetes and needing to add more files with a config map. To specify the path where the configMap is mounted, utilize the DRUID_ADDITIONAL_CONF_DIR environment variable. --- distribution/docker/druid.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/distribution/docker/druid.sh b/distribution/docker/druid.sh index b51419991fe..1bc2f4f071a 100755 --- a/distribution/docker/druid.sh +++ b/distribution/docker/druid.sh @@ -40,6 +40,10 @@ # - DRUID_CONFIG_COMMON -- full path to a file for druid 'common' properties # - DRUID_CONFIG_${service} -- full path to a file for druid 'service' properties # - DRUID_SINGLE_NODE_CONF -- config to use at runtime. Choose from: {large, medium, micro-quickstart, nano-quickstart, small, xlarge} +# - DRUID_ADDITIONAL_CLASSPATH -- a list of colon-separated paths that will be added to the classpath of druid processes. +# These paths can include jars, additional configuration folders (such as HDFS config), etc. +# It is important to ensure that these paths must exist in the environment druid runs in if they are not part of the distribution. + set -e SERVICE="$1" @@ -196,4 +200,4 @@ then mkdir -p ${DRUID_DIRS_TO_CREATE} fi -exec bin/run-java ${JAVA_OPTS} -cp $COMMON_CONF_DIR:$SERVICE_CONF_DIR:lib/*: org.apache.druid.cli.Main server $@ +exec bin/run-java ${JAVA_OPTS} -cp $COMMON_CONF_DIR:$SERVICE_CONF_DIR:lib/*:$DRUID_ADDITIONAL_CLASSPATH org.apache.druid.cli.Main server $@