fix(elastic-setup) Fixing env var logic (#6079)

This commit is contained in:
Pedro Silva 2022-09-29 06:23:45 +01:00 committed by GitHub
parent 74d9fa25a6
commit f83eb6f759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ set -e
: ${DATAHUB_ANALYTICS_ENABLED:=true}
: ${USE_AWS_ELASTICSEARCH:=false}
: ${ELASTICSEARCH_INSECURE:=false}
if [[ $ELASTICSEARCH_USE_SSL == true ]]; then
ELASTICSEARCH_PROTOCOL=https
@ -23,8 +24,11 @@ if [[ -z $ELASTICSEARCH_AUTH_HEADER ]]; then
ELASTICSEARCH_AUTH_HEADER="Accept: */*"
fi
if [[ $ELASTICSEARCH_INSECURE ]]; then
if [[ $ELASTICSEARCH_INSECURE == true ]]; then
echo -e "Going to use default elastic insecure mode"
ELASTICSEARCH_INSECURE="-k "
else
unset ELASTICSEARCH_INSECURE
fi
function create_datahub_usage_event_datastream() {