From dae195dd5f184aef446f0cdaa8ac66c2047db9fe Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 13 Apr 2023 19:10:57 +0900 Subject: [PATCH 1/6] cli web path read fix --- hollaex | 2 +- kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hollaex b/hollaex index 321a051..2a1aaa2 100755 --- a/hollaex +++ b/hollaex @@ -6007,7 +6007,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; diff --git a/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml b/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml index 6d123f3..e1d9b24 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.0 \ No newline at end of file From fed6a0189325c6721d6732f6e0c595e4f8d3c477 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Mon, 17 Apr 2023 18:39:10 +0900 Subject: [PATCH 2/6] Logs target plugins support --- hollaex | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hollaex b/hollaex index 2a1aaa2..10fa59b 100755 --- a/hollaex +++ b/hollaex @@ -8989,7 +8989,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/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 From 312660c865cb4651de117680bcd8ab58c966e6f5 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 20 Apr 2023 20:18:53 +0900 Subject: [PATCH 3/6] Update tools_generator.sh --- tools_generator.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools_generator.sh b/tools_generator.sh index 168c335..9955c01 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,8 @@ metadata: internal; return 503; } + + real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" spec: rules: From 69ed54da6fbcc2b82e4727711c5298f77acac808 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 20 Apr 2023 20:25:50 +0900 Subject: [PATCH 4/6] Update tools_generator.sh --- tools_generator.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools_generator.sh b/tools_generator.sh index 9955c01..44e0e68 100644 --- a/tools_generator.sh +++ b/tools_generator.sh @@ -1786,7 +1786,6 @@ metadata: internal; return 503; } - real_ip_header X-Forwarded-For; nginx.ingress.kubernetes.io/proxy-body-size: "6m" spec: @@ -1834,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; @@ -1870,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: | @@ -1905,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: | @@ -1943,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" From 5ca362887454495828cc2f67e0bee741905a2cd9 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 21 Apr 2023 14:25:34 +0900 Subject: [PATCH 5/6] exchange owner verification check --- hollaex | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/hollaex b/hollaex index 10fa59b..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 From 55ca322d4585909d19db0c937952c3572f10aefd Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 21 Apr 2023 14:26:48 +0900 Subject: [PATCH 6/6] Update Chart.yaml --- kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml b/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml index e1d9b24..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.6.0 \ No newline at end of file +version: 2.6.1 \ No newline at end of file