diff --git a/hollaex b/hollaex index 321a051..9125460 100755 --- a/hollaex +++ b/hollaex @@ -2983,6 +2983,28 @@ elif [[ "$1" == "pull" ]]; then fi fi + + # Avoid running cloud exchange as DIY + if [[ "$HOLLAEX_IS_SETUP" ]]; then + + export VERIFICATION_STATUS_CHECK=$(curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $BITHOLLA_ACCOUNT_TOKEN" -w "=%{http_code}" \ + --request POST \ + -d '{"activation_code": "'$HOLLAEX_SECRET_ACTIVATION_CODE'"}' \ + $hollaexAPIURL/v2/exchange/activate) + + VERIFICATION_STATUS_CHECK_RESPOND=$(echo $VERIFICATION_STATUS_CHECK | cut -f1 -d "=") + VERIFICATION_STATUS_CHECK_RESPOND_HTTP_CODE=$(echo $VERIFICATION_STATUS_CHECK | cut -f2 -d "=") + + if [[ ! "$VERIFICATION_STATUS_CHECK_RESPOND_HTTP_CODE" == "200" ]]; then + + printf "\n\033[91mError: Exchange owner is not verified yet!\033[39m\n" + printf "Please visit https://dash.hollaex.com/verifyAgree and verify your account first.\n\n" + + exit 1; + + fi + + fi # Avoid running multiple setup if [[ "$HOLLAEX_IS_SETUP" ]] && [[ ! "$HOLLAEX_SETUP_FORCE" ]]; then @@ -6007,7 +6029,7 @@ elif [[ "$1" == "web" ]]; then # Create docker registry secret on Kubernetes. - if ! command kubectl get secret docker-registry-secret --namespace $ENVIRONMENT_EXCHANGE_NAME > /dev/null && [[ ! "$ENVIRONMENT_USER_HOLLAEX_CORE_IMAGE_REGISTRY" == "hollaex/hollaex-kit" ]]; then + if ! command kubectl get secret docker-registry-secret --namespace $ENVIRONMENT_EXCHANGE_NAME > /dev/null && [[ ! "$ENVIRONMENT_USER_HOLLAEX_WEB_IMAGE_REGISTRY" == "hollaex/hollaex-kit" ]]; then create_kubernetes_docker_registry_secret; @@ -8989,7 +9011,7 @@ elif [[ "$1" == "logs" ]]; then function hollaex_log_target_whitelist() { - local whitelist=("api" "stream" "db" "redis") + local whitelist=("api" "stream" "db" "redis" "plugins") if ! command printf '%s\n' ${whitelist[@]} | grep $HOLLAEX_LOGS_TARGET > /dev/null; then diff --git a/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml b/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml index 6d123f3..25efa24 100644 --- a/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml +++ b/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 description: A Helm chart for HollaEx Kit name: hollaex-kit -version: 2.5.3 \ No newline at end of file +version: 2.6.1 \ No newline at end of file diff --git a/tools_generator.sh b/tools_generator.sh index 168c335..44e0e68 100644 --- a/tools_generator.sh +++ b/tools_generator.sh @@ -1586,6 +1586,8 @@ metadata: internal; return 503; } + + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/configuration-snippet: | $(if [[ "$ENVIRONMENT_KUBERNETES_INGRESS_OPTIMIZED_RATE_LIMIT" ]]; then echo 'limit_req zone=api burst=10 nodelay; limit_req_log_level notice; @@ -1623,6 +1625,8 @@ metadata: internal; return 503; } + + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/configuration-snippet: | #error_page 403 @maintenance_503; @@ -1655,6 +1659,8 @@ metadata: internal; return 503; } + + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" nginx.ingress.kubernetes.io/configuration-snippet: | #error_page 403 @maintenance_503; @@ -1689,6 +1695,8 @@ metadata: internal; return 503; } + + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" nginx.ingress.kubernetes.io/configuration-snippet: | #error_page 403 @maintenance_503; @@ -1726,6 +1734,8 @@ metadata: internal; return 503; } + + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" nginx.org/websocket-services: "${ENVIRONMENT_EXCHANGE_NAME}-server-stream" nginx.ingress.kubernetes.io/upstream-hash-by: "\$binary_remote_addr" @@ -1776,6 +1786,7 @@ metadata: internal; return 503; } + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" spec: rules: @@ -1822,6 +1833,7 @@ metadata: internal; return 503; } + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/configuration-snippet: | $(if [[ "$ENVIRONMENT_KUBERNETES_INGRESS_OPTIMIZED_RATE_LIMIT" ]]; then echo 'limit_req zone=api burst=10 nodelay; limit_req_log_level notice; @@ -1858,6 +1870,7 @@ metadata: internal; return 503; } + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" nginx.ingress.kubernetes.io/rewrite-target: /plugins/\$2 nginx.ingress.kubernetes.io/configuration-snippet: | @@ -1893,6 +1906,7 @@ metadata: internal; return 503; } + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" nginx.ingress.kubernetes.io/rewrite-target: /plugins/sms/verify/\$2 nginx.ingress.kubernetes.io/configuration-snippet: | @@ -1931,6 +1945,7 @@ metadata: internal; return 503; } + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" nginx.org/websocket-services: "${ENVIRONMENT_EXCHANGE_NAME}-server-stream" nginx.ingress.kubernetes.io/upstream-hash-by: "\$binary_remote_addr" diff --git a/version b/version index 914ec96..b8d12d7 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.6.0 \ No newline at end of file +2.6.1 \ No newline at end of file