Skip to content

Instantly share code, notes, and snippets.

@nrjpoddar
Last active January 20, 2020 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrjpoddar/6133feb248e7c3fd8425bad8b3fe2b4f to your computer and use it in GitHub Desktop.
Save nrjpoddar/6133feb248e7c3fd8425bad8b3fe2b4f to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eExo pipefail
SCRIPTNAME=$(basename $0)
function print_and_exit {
cat << EOF
$SCRIPTNAME <path-to-local-proxy-binary>
EOF
exit 1
}
if [ "$#" -ne 1 ]; then
print_and_exit
fi
localProxyBinary="$1"
if [ ! -f "$localProxyBinary" ]; then
print_and_exit
fi
proxyTmpLocal="/tmp/proxy-local"
proxyBuildLocal="/tmp/proxy-build"
rm -rf $proxyTmpLocal $proxyBuildLocal
mkdir -p $proxyTmpLocal $proxyBuildLocal
make clean
cp $localProxyBinary /$proxyTmpLocal/
make push.docker.proxyv2 \
USE_LOCAL_PROXY=1 \
ISTIO_ENVOY_LINUX_RELEASE_PATH=$proxyTmpLocal/envoy \
ISTIO_ENVOY_LINUX_RELEASE_DIR=$proxyBuildLocal \
ISTIO_ENVOY_LOCAL_PATH=$proxyTmpLocal/envoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment