From 7436fb65a9b3657bc3a9619c7a3a40416bf6975b Mon Sep 17 00:00:00 2001 From: Anmol Date: Thu, 10 Aug 2023 15:56:29 +0530 Subject: [PATCH] update port_forward.sh with grpc port forwarding (#13) --- .github/workflows/test.yaml | 16 ++++------------ action.yaml | 4 ++-- port_forward.sh | 13 ++++++++----- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5ec253f..3a61f5f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -121,12 +121,8 @@ jobs: rest: 1313 rpc: 26653 resources: - limits: - cpu: "0.2" - memory: "200M" - requests: - cpu: "0.1" - memory: "100M" + cpu: "0.2" + memory: "200M" - name: Check kubectl pods run: | @@ -159,12 +155,8 @@ jobs: type: osmosis numValidators: 1 resources: - limits: - cpu: "0.2" - memory: "200M" - requests: - cpu: "0.1" - memory: "100M" + cpu: "0.2" + memory: "200M" - name: Check kubectl pods run: | diff --git a/action.yaml b/action.yaml index 397a9bf..42d5726 100644 --- a/action.yaml +++ b/action.yaml @@ -17,9 +17,9 @@ inputs: required: false default: "" version: - description: "Version of devnet chart (default: 0.1.30)" + description: "Version of devnet chart (default: 0.1.42)" required: false - default: "0.1.32" + default: "0.1.42" chart: description: "Name of the help chart to use. Recommended: use default (default: starship/devnet)" required: false diff --git a/port_forward.sh b/port_forward.sh index 0b71a7b..cb09cd7 100755 --- a/port_forward.sh +++ b/port_forward.sh @@ -24,6 +24,7 @@ function stop_port_forward() { # Default values CHAIN_RPC_PORT=26657 +CHAIN_GRPC_PORT=9090 CHAIN_LCD_PORT=1317 CHAIN_EXPOSER_PORT=8081 CHAIN_FAUCET_PORT=8000 @@ -58,15 +59,17 @@ fi for i in $(seq 0 $num_chains); do chain=$(yq -r ".chains[$i].name" ${CONFIGFILE} ) localrpc=$(yq -r ".chains[$i].ports.rpc" ${CONFIGFILE} ) + localgrpc=$(yq -r ".chains[$i].ports.grpc" ${CONFIGFILE} ) locallcd=$(yq -r ".chains[$i].ports.rest" ${CONFIGFILE} ) localexp=$(yq -r ".chains[$i].ports.exposer" ${CONFIGFILE}) localfaucet=$(yq -r ".chains[$i].ports.faucet" ${CONFIGFILE}) - [[ "$localrpc" != "null" ]] && kubectl port-forward pods/$chain-genesis-0 $localrpc:$CHAIN_RPC_PORT > /dev/null 2>&1 & - [[ "$locallcd" != "null" ]] && kubectl port-forward pods/$chain-genesis-0 $locallcd:$CHAIN_LCD_PORT > /dev/null 2>&1 & - [[ "$localexp" != "null" ]] && kubectl port-forward pods/$chain-genesis-0 $localexp:$CHAIN_EXPOSER_PORT > /dev/null 2>&1 & - [[ "$localfaucet" != "null" ]] && kubectl port-forward pods/$chain-genesis-0 $localfaucet:$CHAIN_FAUCET_PORT > /dev/null 2>&1 & + color yellow "chains: forwarded $chain" + [[ "$localrpc" != "null" ]] && color yellow " rpc to http://localhost:$localrpc" && kubectl port-forward pods/$chain-genesis-0 $localrpc:$CHAIN_RPC_PORT > /dev/null 2>&1 & + [[ "$localgrpc" != "null" ]] && color yellow " grpc to http://localhost:$localgrpc" && kubectl port-forward pods/$chain-genesis-0 $localgrpc:$CHAIN_GRPC_PORT > /dev/null 2>&1 & + [[ "$locallcd" != "null" ]] && color yellow " lcd to http://localhost:$locallcd" && kubectl port-forward pods/$chain-genesis-0 $locallcd:$CHAIN_LCD_PORT > /dev/null 2>&1 & + [[ "$localexp" != "null" ]] && color yellow " exposer to http://localhost:$localexp" && kubectl port-forward pods/$chain-genesis-0 $localexp:$CHAIN_EXPOSER_PORT > /dev/null 2>&1 & + [[ "$localfaucet" != "null" ]] && color yellow " faucet to http://localhost:$localfaucet" && kubectl port-forward pods/$chain-genesis-0 $localfaucet:$CHAIN_FAUCET_PORT > /dev/null 2>&1 & sleep 1 - color yellow "chains: forwarded $chain lcd to http://localhost:$locallcd, rpc to http://localhost:$localrpc, faucet to http://localhost:$localfaucet" done echo "Port forward services"