3131# OUT asset dir (default: $PWD/bin/microvm-assets/$ARCH, gitignored).
3232# ATE_INSTALL_KIND "true" for the kind path (stage assets to rustfs + install-ate-kind.sh);
3333# default false uploads assets to GCS + uses install-ate.sh.
34+ #
35+ # Flags:
36+ # --egress Enable actor egress capture via agentgateway (forwarded to
37+ # install-ate.sh / install-ate-kind.sh).
3438
3539set -o errexit -o nounset -o pipefail
3640
3741ROOT=" $( git rev-parse --show-toplevel) "
3842cd " ${ROOT} "
3943
44+ # Parse flags before sourcing the environment so they are available to all steps.
45+ EGRESS_FLAG=" "
46+ for arg in " $@ " ; do
47+ case " ${arg} " in
48+ --egress) EGRESS_FLAG=" --egress" ;;
49+ esac
50+ done
51+
4052# Source the environment (cluster, registry, bucket) like the other hack scripts;
4153# hack/run-microvm-demo-kind.sh sets NO_DEV_ENV to skip this and use kind defaults.
4254if [[ -r .ate-dev-env.sh ]] && [[ -z " ${NO_DEV_ENV:- } " ]]; then
@@ -52,6 +64,7 @@ ATE_API_AUTH_MODE="${ATE_API_AUTH_MODE:-mtls}"
5264
5365while [[ $# -gt 0 ]]; do
5466 case " $1 " in
67+ --egress) EGRESS_FLAG=" --egress" ;;
5568 --auth-mode=* ) ATE_API_AUTH_MODE=" ${1#* =} " ;;
5669 --auth-mode)
5770 if [[ $# -lt 2 ]]; then
131144log " Deploying the ate control plane (--deploy-ate-system)..."
132145if [[ " ${ATE_INSTALL_KIND} " == " true" ]]; then
133146 # install-ate-kind.sh sets NO_DEV_ENV/KO_DOCKER_REPO/ARCH/ATE_INSTALL_KIND itself.
134- KUBECTL_CONTEXT=" ${KUBECTL_CONTEXT} " hack/install-ate-kind.sh --deploy-ate-system --auth-mode=" ${ATE_API_AUTH_MODE} "
147+ KUBECTL_CONTEXT=" ${KUBECTL_CONTEXT} " hack/install-ate-kind.sh --deploy-ate-system --auth-mode=" ${ATE_API_AUTH_MODE} " ${EGRESS_FLAG}
135148else
136149 # GKE path: pass KO_DOCKER_REPO/BUCKET_NAME/KUBECTL_CONTEXT through the env.
137- KUBECTL_CONTEXT=" ${KUBECTL_CONTEXT} " hack/install-ate.sh --deploy-ate-system --auth-mode=" ${ATE_API_AUTH_MODE} "
150+ KUBECTL_CONTEXT=" ${KUBECTL_CONTEXT} " hack/install-ate.sh --deploy-ate-system --auth-mode=" ${ATE_API_AUTH_MODE} " ${EGRESS_FLAG}
138151fi
139152
140153# --- 4. apply the demo ------------------------------------------------------
0 commit comments