diff --git a/hollaex b/hollaex index 0176b08..9b727b5 100755 --- a/hollaex +++ b/hollaex @@ -1617,11 +1617,13 @@ elif [[ "$1" == "pull" ]]; then --request GET \ https://$ENVIRONMENT_HOLLAEX_NETWORK_TARGET_SERVER/v2/exchange) + BITHOLLA_USER_EXCHANGE_LIST=$(curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $BITHOLLA_ACCOUNT_TOKEN"\ --request GET \ https://$ENVIRONMENT_HOLLAEX_NETWORK_TARGET_SERVER/v2/exchange \ | jq '.') + if [[ ! "$BITHOLLA_USER_TOKEN_EXPIRY_CHECK" ]] || [[ ! "$BITHOLLA_USER_TOKEN_EXPIRY_CHECK" == "200" ]]; then printf "\033[91mFailed to pull the exchange data from bitHolla.\033[39m\n\n" @@ -3354,6 +3356,16 @@ elif [[ "$1" == "apply" ]]; then kubectl delete -f $TEMPLATE_GENERATE_PATH/kubernetes/config/$ENVIRONMENT_EXCHANGE_NAME-ingress.yaml fi + + # DROP OLD INGRESS RULES IF IT EXISTS ON THE CLUSTER + if command kubectl get ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order -n $ENVIRONMENT_EXCHANGE_NAME > /dev/null; then + + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-admin + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-explorer + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-docs + + fi run_and_upgrade_hollaex_on_kubernetes; @@ -3682,6 +3694,16 @@ elif [[ "$1" == "terminate" ]]; then fi + # DROP OLD INGRESS RULES IF IT EXISTS ON THE CLUSTER + if command kubectl get ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order -n $ENVIRONMENT_EXCHANGE_NAME > /dev/null; then + + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-admin + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-explorer + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-docs + + fi + echo "Running a final backup for the exchange database." if ! command hollaex toolbox --backup --kube; then @@ -5110,6 +5132,16 @@ elif [[ "$1" == "toolbox" ]]; then echo "Deleting Ingress rules for the exchange..." kubectl delete -f $TEMPLATE_GENERATE_PATH/kubernetes/config/$ENVIRONMENT_EXCHANGE_NAME-ingress.yaml + # DROP OLD INGRESS RULES IF IT EXISTS ON THE CLUSTER + if command kubectl get ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order -n $ENVIRONMENT_EXCHANGE_NAME > /dev/null; then + + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-admin + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-explorer + kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-docs + + fi + if [[ "$ENVIRONMENT_KUBERNETES_RUN_POSTGRESQL_DB" ]]; then @@ -6210,6 +6242,8 @@ elif [[ "$1" == "cloud" ]]; then # # # END # # # + hollaex pull --skip + if [[ "$HOLLAEX_CLOUD_START" ]]; then echo -e "\nSending a request to start the stopped exchange on the HollaCloud..." diff --git a/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml b/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml index 95dd78b..54552b7 100644 --- a/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml +++ b/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml @@ -13,7 +13,7 @@ spec: spec: containers: - name: postgres-backup-to-s3 - image: bitholla/postgres-s3-backup-cronjob:psql12.4-awscli + image: bitholla/postgres-s3-backup-cronjob:psql12.6-awscli env: - name: AWS_BUCKET value: {{.Values.awsBucket}} diff --git a/tools_generator.sh b/tools_generator.sh index e8805c7..79e4b80 100644 --- a/tools_generator.sh +++ b/tools_generator.sh @@ -2794,12 +2794,11 @@ function hollaex_pull_and_apply_exchange_data() { #LOGO PATH ESCAPING local ORIGINAL_CHARACTER_FOR_LOGO_IMAGE=$(echo $BITHOLLA_USER_EXCHANGE_LIST | jq -r ".data[$BITHOLLA_USER_EXCHANGE_ORDER].info.biz.LOGO_IMAGE";) - local HOLLAEX_CONFIGMAP_LOGO_IMAGE_OVERRIDE="${ORIGINAL_CHARACTER_FOR_LOGO_PATH//\//\\/}" + local HOLLAEX_CONFIGMAP_LOGO_IMAGE_OVERRIDE="${ORIGINAL_CHARACTER_FOR_LOGO_IMAGE//\//\\/}" # Set the default HollaEx Server version as the maximum compatible version of the current release of CLI. local ENVIRONMENT_DOCKER_IMAGE_VERSION_OVERRIDE="$(cat $HOLLAEX_CLI_INIT_PATH/server/package.json | jq -r '.version')" - # CONFIGMAP sed -i.bak "s/ENVIRONMENT_EXCHANGE_NAME=.*/ENVIRONMENT_EXCHANGE_NAME=$ENVIRONMENT_EXCHANGE_NAME_OVERRIDE/" $CONFIGMAP_FILE_PATH diff --git a/version b/version index ed35d09..fee3c92 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.9 \ No newline at end of file +2.0.10 \ No newline at end of file