aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-clamp-docker/src/main/docker/kubernetes-participant.sh
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2021-07-23 15:53:46 +0100
committerFrancescoFioraEst <francesco.fiora@est.tech>2021-07-27 16:05:33 +0100
commit252a4bba14ebfa2bc58261a87d7c593414a5f944 (patch)
tree0b4a5ef00405c06cb527d351e820af01f9434f86 /packages/policy-clamp-docker/src/main/docker/kubernetes-participant.sh
parent395f61064ab29a9506a18bae505ebf1da3315e94 (diff)
Replace JSON properties files to Yaml from docker images
POLICY-3469: Replace JSON properties files to Yaml from docker images Change-Id: I23fbd9d84640286725440453d464c397e3144662 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'packages/policy-clamp-docker/src/main/docker/kubernetes-participant.sh')
-rw-r--r--packages/policy-clamp-docker/src/main/docker/kubernetes-participant.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/policy-clamp-docker/src/main/docker/kubernetes-participant.sh b/packages/policy-clamp-docker/src/main/docker/kubernetes-participant.sh
index 50995de3b..cb5ae9251 100644
--- a/packages/policy-clamp-docker/src/main/docker/kubernetes-participant.sh
+++ b/packages/policy-clamp-docker/src/main/docker/kubernetes-participant.sh
@@ -25,7 +25,17 @@ TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}"
+if [ "$#" -eq 1 ]; then
+ CONFIG_FILE=$1
+else
+ CONFIG_FILE=${CONFIG_FILE}
+fi
+
+if [ -z "$CONFIG_FILE" ]; then
+ CONFIG_FILE="${POLICY_HOME}/etc/KubernetesParticipantParameters.yaml"
+fi
+echo "Policy clamp config file: $CONFIG_FILE"
if [ -f "${POLICY_HOME}/etc/mounted/policy-truststore" ]; then
echo "overriding policy-truststore"
@@ -42,8 +52,12 @@ if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
cp -f "${POLICY_HOME}"/etc/mounted/logback*.xml "${POLICY_HOME}"/etc/
fi
+mkdir -p "${POLICY_HOME}"/config/
+cp -f "${CONFIG_FILE}" "${POLICY_HOME}"/config/KubernetesParticipantParameters.yaml
+
$JAVA_HOME/bin/java -Dserver.ssl.keyStore="${KEYSTORE}" \
-Dserver.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \
-Dserver.ssl.trustStore="${TRUSTSTORE}" \
-Dserver.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \
- -jar /app/app.jar
+ -jar /app/app.jar \
+ --spring.config.location="${POLICY_HOME}/config/KubernetesParticipantParameters.yaml"