Skip to content

Instantly share code, notes, and snippets.

@incfly
Last active August 3, 2022 10:16
Show Gist options
  • Save incfly/ccfb614e65a3a87c2074a28cca004227 to your computer and use it in GitHub Desktop.
Save incfly/ccfb614e65a3a87c2074a28cca004227 to your computer and use it in GitHub Desktop.
script to run istio multiplex e2e test
function setup() {
export NS="istio-system"
# export TAG=$(awk 'FNR == 2 {print substr($0,5) } ' .istio.mk)
export TAG="multi-0610-a"
export HUB="gcr.io/jianfeih-test"
echo $NS, $TAG
}
function remove_ns() {
setup
kc delete ns $NS
while kc get ns | grep -q $NS; do
echo "waiting for the deletion"; sleep 3;
done
}
function run_e2e() {
setup
TAG=$TAG ISTIO_PROXY_IMAGE=proxyv2 \
make e2e_pilotv2_v1alpha3 \
E2E_ARGS='--auth_enable=false -run=".*Multiplex.*" --skip_cleanup=true --skip_setup=false --namespace=istio-system HUB="gcr.io/jianfeih-test" --v1alpha1=false --v1alpha3=true'
}
function build_image() {
setup
make && make docker && make docker.push
}
@incfly
Copy link
Author

incfly commented Jun 13, 2018

How to use the script

#edit setup to change the HUB and TAG env var.
source multiplex-test.sh

Checkout the implementation:

git clone https://github.com/incfly/istio
git checkout -b origin/multiplex-master

Build the images and run the test
build_images && run_e2e

Re-apply the authn policy and destination rule

kubectl apply -n istio-system  -f tests/e2e/tests/pilot/testdata/authn/v1alpha1/multiplexing/authn-policy-permissive.yaml
kubectl apply -n istio-system  -f tests/e2e/tests/pilot/testdata/authn/v1alpha1/multiplexing/destination-rule.yaml

Get the pilot lds output

# first terminal
kc port-forward istio-pilot-848b4c589c-fw8zg  -n istio-system   15010
# second terminal
go run ./pilot/tools/debug/pilot_cli.go -res=<pod-d-id>     -type lds -pilot localhost:15010  > d.lds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment