Skip to content

Commit

Permalink
update port_forward.sh with grpc port forwarding (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 authored Aug 10, 2023
1 parent 142de4b commit 7436fb6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions port_forward.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 7436fb6

Please sign in to comment.