From 364adfcb81de2e8d1677bf680ca79d3bdac61c96 Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 12:18:50 +0900 Subject: [PATCH 01/12] fix: remove chmod --- .../kustomize/overlays/dev/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/deployment.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/deployment.yaml index 075d914..f6dde8f 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/deployment.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/deployment.yaml @@ -17,7 +17,7 @@ spec: command: ["/bin/sh", "-c"] args: - | - chmod +x /scripts/init.sh && /scripts/init.sh + /scripts/init.sh volumeMounts: - name: init-script-volume mountPath: /scripts @@ -27,4 +27,4 @@ spec: - name: init-script-volume configMap: name: polygon-proxy-init-script - defaultMode: 0744 + defaultMode: 0777 From 6a2a68fd7eab4de613103dad37edd74f59c4c949 Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 13:13:55 +0900 Subject: [PATCH 02/12] feat: add gcloud login --- .../kustomize/overlays/dev/init-script.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index 20ae9b1..034c123 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -7,6 +7,11 @@ data: init.sh: | #!/bin/sh + gcloud auth activate-service-account load-tester-sa@goboolean-450909.iam.gserviceaccount.com \ + --key-file=/data/key.json + gcloud auth list + gcloud config set project goboolean-450909 + apk add --no-cache curl curl -Ls https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl -o /usr/local/bin/websocat From f5e8dfb5ae73c2b9913e8f5bedfcfdbc4ba708c8 Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 13:17:47 +0900 Subject: [PATCH 03/12] feat: add gcloud login --- .../kustomize/overlays/dev/init-script.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index 034c123..cf3e6e9 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -7,9 +7,7 @@ data: init.sh: | #!/bin/sh - gcloud auth activate-service-account load-tester-sa@goboolean-450909.iam.gserviceaccount.com \ - --key-file=/data/key.json - gcloud auth list + gcloud config set account load-tester-sa@goboolean-450909.iam.gserviceaccount.com gcloud config set project goboolean-450909 apk add --no-cache curl From f2a975b7138767f8d9902ae0fbf7e6acd2046ab8 Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 13:30:39 +0900 Subject: [PATCH 04/12] fixes: --- .../kustomize/overlays/dev/init-script.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index cf3e6e9..29454a2 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -7,8 +7,7 @@ data: init.sh: | #!/bin/sh - gcloud config set account load-tester-sa@goboolean-450909.iam.gserviceaccount.com - gcloud config set project goboolean-450909 + gcloud config set core/project goboolean-450909 apk add --no-cache curl From ce33a16489b0df4770f6a849012f32b32cc2ab7e Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 13:39:38 +0900 Subject: [PATCH 05/12] feat: add proper role to polygon-proxy --- .../kustomize/overlays/dev/init-script.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index 29454a2..219a17d 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -14,7 +14,6 @@ data: curl -Ls https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl -o /usr/local/bin/websocat chmod +x /usr/local/bin/websocat - gcloud auth login --quiet gsutil cp gs://goboolean-450909-load-test/output.txt /data/output.txt websocat -s 8080 --binary sh-c:'cat /data/output.txt' From a5a477b00ab963a19e9a231d2287888adf6964a6 Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 13:47:59 +0900 Subject: [PATCH 06/12] fix: websocat --- .../kustomize/overlays/dev/init-script.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index 219a17d..72b2164 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -14,6 +14,7 @@ data: curl -Ls https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl -o /usr/local/bin/websocat chmod +x /usr/local/bin/websocat + gsutil ls gs://goboolean-450909-load-test gsutil cp gs://goboolean-450909-load-test/output.txt /data/output.txt - websocat -s 8080 --binary sh-c:'cat /data/output.txt' + websocat --binary ws-listen:0.0.0.0:8080 sh-c:'cat /data/output.txt' From 255acb5d162d52021dcbd2bda5bf003ebfbfe08c Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 13:50:23 +0900 Subject: [PATCH 07/12] feat: use socketid --- .../kustomize/overlays/dev/init-script.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index 72b2164..a3d9c64 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -11,10 +11,11 @@ data: apk add --no-cache curl - curl -Ls https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl -o /usr/local/bin/websocat - chmod +x /usr/local/bin/websocat + SOCKETD_VERSION="0.5.3" # Check latest version at https://github.com/panjf2000/socketd/releases + curl -Lo /usr/local/bin/socketd https://github.com/panjf2000/socketd/releases/download/v${SOCKETD_VERSION}/socketd-x86_64-linux-musl + chmod +x /usr/local/bin/socketd gsutil ls gs://goboolean-450909-load-test gsutil cp gs://goboolean-450909-load-test/output.txt /data/output.txt - websocat --binary ws-listen:0.0.0.0:8080 sh-c:'cat /data/output.txt' + websocketd --port=8080 --static cat /data/output.txt From 8086e4f6065d82991967c4cf9f4d5860c227db84 Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 13:53:27 +0900 Subject: [PATCH 08/12] feat: use socketid --- .../kustomize/overlays/dev/init-script.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index a3d9c64..c35d93d 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -18,4 +18,6 @@ data: gsutil ls gs://goboolean-450909-load-test gsutil cp gs://goboolean-450909-load-test/output.txt /data/output.txt - websocketd --port=8080 --static cat /data/output.txt + socketd -l sd:ws://0.0.0.0:8080 -e "cat /data/output.txt" + + tail -f /dev/null From ddf1cb7239fa1127dfcd7cab3edff646e0d0bedd Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 19:27:43 +0900 Subject: [PATCH 09/12] feat: use websocat --- .../kustomize/overlays/dev/init-script.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index c35d93d..93d3708 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -11,13 +11,10 @@ data: apk add --no-cache curl - SOCKETD_VERSION="0.5.3" # Check latest version at https://github.com/panjf2000/socketd/releases - curl -Lo /usr/local/bin/socketd https://github.com/panjf2000/socketd/releases/download/v${SOCKETD_VERSION}/socketd-x86_64-linux-musl - chmod +x /usr/local/bin/socketd - gsutil ls gs://goboolean-450909-load-test gsutil cp gs://goboolean-450909-load-test/output.txt /data/output.txt - socketd -l sd:ws://0.0.0.0:8080 -e "cat /data/output.txt" + curl -Ls https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl -o /usr/local/bin/websocat + chmod +x /usr/local/bin/websocat - tail -f /dev/null + cat /data/output.txt | websocat -s 8080 From bf9390e37be2d49849af2a90c7932a408a8c371b Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 19:57:16 +0900 Subject: [PATCH 10/12] feat: set reuse-raw mode --- .../kustomize/overlays/dev/init-script.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index 93d3708..98dd9b7 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -17,4 +17,5 @@ data: curl -Ls https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl -o /usr/local/bin/websocat chmod +x /usr/local/bin/websocat - cat /data/output.txt | websocat -s 8080 + cat /data/output.txt | websocat -E -b 0.0.0.0:8080 reuse-raw:stdio: +k From 55cbaba5aad9589203ca59cd999da76f6bb74620 Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 20:00:25 +0900 Subject: [PATCH 11/12] fix: typo --- .../kustomize/overlays/dev/init-script.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index 98dd9b7..ab3a85b 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -18,4 +18,3 @@ data: chmod +x /usr/local/bin/websocat cat /data/output.txt | websocat -E -b 0.0.0.0:8080 reuse-raw:stdio: -k From 9835e78ee85e85d5eb3b3abad09dd43c0faaadd1 Mon Sep 17 00:00:00 2001 From: mulmuri Date: Sun, 23 Feb 2025 20:01:55 +0900 Subject: [PATCH 12/12] fix: typo --- .../kustomize/overlays/dev/init-script.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml index ab3a85b..47104bb 100644 --- a/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml +++ b/fetch-system.polygon-proxy/kustomize/overlays/dev/init-script.yaml @@ -17,4 +17,4 @@ data: curl -Ls https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl -o /usr/local/bin/websocat chmod +x /usr/local/bin/websocat - cat /data/output.txt | websocat -E -b 0.0.0.0:8080 reuse-raw:stdio: + cat /data/output.txt | websocat -E -b ws-l:0.0.0.0:8080 reuse-raw:stdio: